Setting page update
This commit is contained in:
1 parent
c55cd5c9bb
commit
5a6541a592
6 files changed
+137
-152
No files matched your search
@@ -335,82 +335,58 @@ var orbitDesktop = function(dom){
|
||||
o.currenthtml = target;
|
||||
o.currentface = "settings";
|
||||
var bindHandlers = function(){
|
||||
$(".theme_list > li").click(function(){
|
||||
o.changeTheme($(this).find('.theme_name').text());
|
||||
$(".theme_list > li")
|
||||
.removeClass('thmc1')
|
||||
.data('clicked',null)
|
||||
.find('.theme_name')
|
||||
.removeClass('thmtxt');
|
||||
$(this)
|
||||
.addClass('thmc1')
|
||||
.data('clicked',true)
|
||||
.find('.theme_name')
|
||||
.addClass('thmtxt');
|
||||
od.tempFunc($(this).text());
|
||||
});
|
||||
|
||||
}
|
||||
var loadThemePage = function(){
|
||||
var bindHandlers = function(){
|
||||
$(".theme_list > li").click(function(){
|
||||
o.changeTheme($(this).find('.theme_name').text());
|
||||
$(".theme_list > li").removeClass('thmc1').data('clicked',null).find('.theme_name').removeClass('thmtxt');
|
||||
$(this).addClass('thmc1').data('clicked',true).find('.theme_name').addClass('thmtxt');
|
||||
od.tempFunc($(this).text());
|
||||
});
|
||||
$('.tinycanvas').each(function(){
|
||||
var h = $(this).parent().height(),
|
||||
sh = $(this).siblings('.s_tab').height();
|
||||
$(this).css({'height': h-sh-24}).tinyscrollbar({ axis: 'y'});
|
||||
});
|
||||
|
||||
$('.tinycanvas').each(function(){
|
||||
var h = $(this).parent().height(),
|
||||
sh = $(this).siblings('.s_tab').height();
|
||||
$(this).css({'height': h-sh-24}).tinyscrollbar({ axis: 'y'});
|
||||
var $anchor = $('.s_tab a[href*=#]'),
|
||||
$tabcontent = $('.st_c');
|
||||
|
||||
});
|
||||
|
||||
// simple tab navgation
|
||||
var $anchor = $('.s_tab a[href*=#]'),
|
||||
$tabcontent = $('.st_c');
|
||||
|
||||
$anchor.each(function(){
|
||||
$(this).click(function(){
|
||||
var target = $(this).attr('href');
|
||||
|
||||
$anchor
|
||||
.removeClass('thmc2 thmtxt admtxt admbg')
|
||||
.addClass('admtxt admbg');
|
||||
$(this).toggleClass('thmc2 thmtxt admtxt admbg');
|
||||
$tabcontent.hide();
|
||||
$(target).show();
|
||||
$('.tinycanvas').tinyscrollbar_update();
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
// simple menu
|
||||
|
||||
// miniColors
|
||||
$('.color-picker').miniColors({
|
||||
|
||||
});
|
||||
|
||||
$('.theme_list li:first-child').data('clicked',true); // this line just for demo
|
||||
$('.theme_list li').hover(function(){
|
||||
$(this)
|
||||
.addClass('thmc1')
|
||||
.find('.theme_name')
|
||||
.addClass('thmtxt');
|
||||
}, function(){
|
||||
var c = 'thmc1',
|
||||
t = 'thmtxt';
|
||||
if( $(this).data('clicked') ){
|
||||
t = '', c = '';
|
||||
$anchor.each(function(){
|
||||
$(this).click(function(){
|
||||
var target = $(this).attr('href');
|
||||
$anchor.removeClass('thmc2 thmtxt admtxt admbg').addClass('admtxt admbg');
|
||||
$(this).toggleClass('thmc2 thmtxt admtxt admbg');
|
||||
$tabcontent.hide();
|
||||
$(target).show();
|
||||
$('.tinycanvas').tinyscrollbar_update();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
$('.color-picker').miniColors();
|
||||
$('.theme_list li:first-child').data('clicked',true); // this line just for demo
|
||||
$('.theme_list li').hover(function(){
|
||||
$(this).addClass('thmc1').find('.theme_name').addClass('thmtxt');
|
||||
}, function(){
|
||||
var c = 'thmc1',
|
||||
t = 'thmtxt';
|
||||
if( $(this).data('clicked') ){
|
||||
t = '', c = '';
|
||||
}
|
||||
$(this).removeClass(c).find('.theme_name').removeClass(t);
|
||||
});
|
||||
|
||||
}
|
||||
$(this)
|
||||
.removeClass(c)
|
||||
.find('.theme_name')
|
||||
.removeClass(t);
|
||||
});
|
||||
|
||||
$("div#panel_r").load("/desktop/settingthemes/",function(){
|
||||
bindHandlers();
|
||||
})
|
||||
}
|
||||
|
||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
||||
bindHandlers();
|
||||
});
|
||||
// }else{
|
||||
// $(o.contentHolder).html(o.desktopData[o.currentface]);
|
||||
// bindHandlers();
|
||||
// }
|
||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
||||
loadThemePage();
|
||||
});
|
||||
};
|
||||
this.loadWallpaper = function(wallpaper){
|
||||
if(!wallpaper)wallpaper = o.themesettings.background;
|
||||
|
||||
Reference in new issue
Block a user