This commit is contained in:
Harry Bomrah committed 2012-04-11 15:36:32 +08:00
commit 68803c0c97
57 files changed
+766 -468

No files matched your search

+84 -16
View File
@@ -138,12 +138,14 @@ var orbitDesktop = function(dom){
}
});
$('#holder').tinyscrollbar({ axis: 'x'});
$('.tinycanvas').tinyscrollbar({ axis: 'x'});
$("div.scrollbar").hover(function(){
$(this).removeClass('op01');
}, function(){
$(this).addClass('op01');
});
// simple dropdown menu
var $sdm = $('.sdm');
if( !$sdm.children('.sdm_o') ){
@@ -216,9 +218,10 @@ var orbitDesktop = function(dom){
bindSecondaryHandlers();
}
};
this.tempFunc = function(){
this.tempFunc = function(th){
//o.notify("This is test notification!!","alert",2)
$.post("/desktop/save_desktop_settings",{"id":o.desktopId,"theme":$("#change_theme").val()},function(){
console.log(th);
$.post("/desktop/save_desktop_settings",{"id":o.desktopId,"theme":th},function(){
o.notify("Settings Saved!!","success");
})
}
@@ -261,7 +264,7 @@ var orbitDesktop = function(dom){
$(".group_search").html(allApps);
return false;
})
$('#holder').tinyscrollbar({ axis: 'x'});
$('.tinycanvas').tinyscrollbar({ axis: 'x'});
}
if(!o.desktopData[o.currentface]){
$(o.contentHolder).empty().load("/desktop/"+target,function(){
@@ -296,14 +299,15 @@ var orbitDesktop = function(dom){
}
else
$("#"+$(this).attr("data-category")).append(element);
},over:function(){
},
over:function(){
$(this).find('span.tile').removeClass('op06');
},
out:function(){
out:function(){
$(this).find('span.tile').addClass('op06');
}
}
});
$('#holder').tinyscrollbar({ axis: 'x'});
$('.tinycanvas').tinyscrollbar({ axis: 'x'});
var $sdm = $('.sdm');
if( !$sdm.children('.sdm_o') ){
@@ -331,18 +335,82 @@ var orbitDesktop = function(dom){
o.currenthtml = target;
o.currentface = "settings";
var bindHandlers = function(){
$("select#change_theme").change(function(){
o.changeTheme($(this).val());
})
$(".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'});
});
// 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 = '';
}
$(this)
.removeClass(c)
.find('.theme_name')
.removeClass(t);
});
}
// if(!o.desktopData[o.currentface]){
$(o.contentHolder).empty().load("/desktop/"+target,function(){
bindHandlers();
});
// }else{
// $(o.contentHolder).html(o.desktopData[o.currentface]);
// bindHandlers();
// }
// }else{
// $(o.contentHolder).html(o.desktopData[o.currentface]);
// bindHandlers();
// }
};
this.loadWallpaper = function(wallpaper){
if(!wallpaper)wallpaper = o.themesettings.background;