background image…

This commit is contained in:
Harry Bomrah 2012-04-18 18:20:39 +08:00
commit b4bf81d40a
26 changed files with 99 additions and 74 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -169,12 +169,11 @@ var orbitDesktop = function(dom){
} }
} }
}); });
$('div#desktop .tinycanvas').tinyscrollbar({ axis: 'x'}); $('div#desktop .tinycanvas')
$("div#desktop div.scrollbar").hover(function(){ .tinyscrollbar({ axis: 'x' })
$(this).removeClass('op01'); .find('.scrollbar')
}, function(){ .delay(1500)
$(this).addClass('op01'); .addClass('op00', 500);
});
// simple dropdown menu // simple dropdown menu
var $sdm = $('.sdm'); var $sdm = $('.sdm');
@ -305,7 +304,11 @@ var orbitDesktop = function(dom){
$("div#app_manager .group_search").html(allApps); $("div#app_manager .group_search").html(allApps);
return false; return false;
}) })
$('.tinycanvas').tinyscrollbar({ axis: 'x'}); $('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
} }
var loadApps = function(){ var loadApps = function(){
$.getJSON("/desktop/getapplist",{desktopid:o.desktopId},function(appss){ $.getJSON("/desktop/getapplist",{desktopid:o.desktopId},function(appss){
@ -371,7 +374,11 @@ var orbitDesktop = function(dom){
$(this).find('span.tile').addClass('op06'); $(this).find('span.tile').addClass('op06');
} }
}); });
$('.tinycanvas').tinyscrollbar({ axis: 'x'}); $('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
var $sdm = $('.sdm'); var $sdm = $('.sdm');
if( !$sdm.children('.sdm_o') ){ if( !$sdm.children('.sdm_o') ){
@ -431,34 +438,43 @@ var orbitDesktop = function(dom){
o.currenthtml = target; o.currenthtml = target;
o.currentface = "settings"; o.currentface = "settings";
var bindHandlers = function(){ var bindHandlers = function(){
$("div#settings ul#setting_left_nav li a").click(function(){ $("div#settings ul#setting_left_nav li a").on({
if(!$(this).data("clicked")){ click: function(){
var tfunc = $(this).attr("href"); if(!$(this).data("clicked")){
switch(tfunc){ var tfunc = $(this).attr("href");
case "themes": switch(tfunc){
themes(); case "themes":
break; themes();
case "sections": break;
sections(); case "sections":
break; sections();
} break;
$("div#settings ul#setting_left_nav li a").removeClass('thmc1 thmtxt').data('clicked',null); }
$(this).addClass('thmc1 thmtxt').data('clicked',true); $("div#settings ul#setting_left_nav li a").removeClass('thmc1 thmtxt').data('clicked',null);
$(this).addClass('thmc1 thmtxt').data('clicked',true);
}
},
mouseenter: function(){
$(this).removeClass('admtxt').addClass('thmc1 thmtxt');
},
mouseleave: function(){
var t = $(this).data('clicked') ? '' : 'thmc1 thmtxt';
$(this).removeClass(t).addClass('admtxt');
} }
}); });
$("div#settings ul#setting_left_nav li a").hover(function(){
$(this).removeClass('admtxt').addClass('thmc1 thmtxt');
}, function(){
var t = $(this).data('clicked') ? '' : 'thmc1 thmtxt';
$(this).removeClass(t).addClass('admtxt');
});
} }
var sections = function(){ var sections = function(){
var bindHandlers = function(){ var bindHandlers = function(){
$('.tinycanvas').each(function(){ $('.tinycanvas').each(function(){
var h = $(this).parent().height(), var h = $(this).parent().height(),
sh = $(this).siblings('.s_tab').height(); sh = $(this).siblings('.s_tab').height();
$(this).css({'height': h-sh-24}).tinyscrollbar({ axis: 'y'}); $(this)
.css({'height': h-sh-24})
.tinyscrollbar({ axis: 'y'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
}); });
$("a#name_save_btn").click(function(){ $("a#name_save_btn").click(function(){
@ -493,40 +509,51 @@ var orbitDesktop = function(dom){
} }
var themes = function(){ var themes = function(){
var bindHandlers = function(){ var bindHandlers = function(){
$(".theme_list > li").click(function(){ // live change theme
$(".theme_list > .ssl_item").click(function(){
o.changeTheme($(this).attr("id")); o.changeTheme($(this).attr("id"));
// $(".theme_list > li").removeClass('thmc1').data('clicked',null).find('.theme_name').removeClass('thmtxt'); // $(".theme_list > li").removeClass('thmc1').data('clicked',null).find('.theme_name').removeClass('thmtxt');
// $(this).addClass('thmc1').data('clicked',true).find('.theme_name').addClass('thmtxt'); // $(this).addClass('thmc1').data('clicked',true).find('.theme_name').addClass('thmtxt');
$.post("/desktop/save_desktop_settings",{"save":"theme","desktopid":o.desktopId,"theme":$(this).attr("id")},function(result,status){ $.post("/desktop/save_desktop_settings",{"save":"theme","desktopid":o.desktopId,"theme":$(this).attr("id")},function(result,status){
if(status=="success"){ if(status=="success"){
if(result[0].success=="true") if(result[0].success=="true"){
o.notify("Theme Saved!!","success",2); o.notify("Theme Saved!!","success",2);
else loadthmc();
} else {
o.notify("Theme saving failed!!","imp",2); o.notify("Theme saving failed!!","imp",2);
}
}else{ }else{
o.notify("Connection problem!!","alert",2); o.notify("Connection problem!!","alert",2);
} }
}); });
}); });
$('.ssl .ssl_item').each(function(){ // single select
$(this).on({ $('.ssl .ssl_item').each(function(){
click: function(){ $(this).on({
$(this).switchClass('','thmc1 active',300); click: function(){
$(this).siblings('.thmc1').switchClass('thmc1 active','',100); $(this).switchClass('','thmc1 active',300);
$(this).siblings('.thmc1').switchClass('thmc1 active','',100);
if( $(this).find('.ssl_des') ){ if( $(this).find('.ssl_des') ){
$(this).parents('.ssl').find('.ssl_des').removeClass('thmtxt'); $(this).parents('.ssl').find('.ssl_des').removeClass('thmtxt');
$(this).find('.ssl_des').addClass('thmtxt'); $(this).find('.ssl_des').addClass('thmtxt');
}
} }
}); }
}); });
});
$('.tinycanvas').each(function(){ $('.tinycanvas').each(function(){
var h = $(this).parent().height(), var h = $(this).parent().height(),
sh = $(this).siblings('.s_tab').height(); sh = $(this).siblings('.s_tab').height();
$(this).css({'height': h-sh-24}).tinyscrollbar({ axis: 'y'}); $(this)
.css({'height': h-sh-24})
.tinyscrollbar({ axis: 'y'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
}); });
// tab
var $anchor = $('.s_tab a[href*=#]'), var $anchor = $('.s_tab a[href*=#]'),
$tabcontent = $('.st_c'); $tabcontent = $('.st_c');
@ -541,11 +568,6 @@ var orbitDesktop = function(dom){
return false; return false;
}); });
}); });
/* $("tr#color_inputs input").each(function(){
var what = $(this).attr("for");
alert($("#theme_preview_area ."+what).css("background-color"))
$(this).val()
}) */
$('.color-picker').miniColors({ $('.color-picker').miniColors({
change:function(hex){ change:function(hex){
@ -568,6 +590,8 @@ var orbitDesktop = function(dom){
} }
} }
}); });
$('.theme_list li:first-child').data('clicked',true); // this line just for demo $('.theme_list li:first-child').data('clicked',true); // this line just for demo
$('.theme_list li').hover(function(){ $('.theme_list li').hover(function(){
$(this).addClass('thmc1').find('.theme_name').addClass('thmtxt'); $(this).addClass('thmc1').find('.theme_name').addClass('thmtxt');
@ -598,32 +622,33 @@ var orbitDesktop = function(dom){
}) })
} }
var loadthmc = function(){ var loadthmc = function(){
$('.color-picker').each(function(){ $('.color-picker').each(function(){
var cc = $(this).attr('for'), hex, color; var cc = $(this).attr('for'), hex, color;
switch(cc){ switch(cc){
case 'thmtxt': case 'thmtxt':
case 'thmtxth': case 'thmtxth':
hex = 'color'; hex = 'color';
break; break;
case 'g_sep': case 'g_sep':
hex = 'border-left-color'; hex = 'border-left-color';
break; break;
default: default:
hex = 'background-color'; hex = 'background-color';
break; break;
} }
if(cc=="background") if(cc=="background")
color = $("#theme_preview_area").css("background-color"); color = $("#theme_preview_area").css("background-color");
else else
color = $('#theme_preview_area .'+cc).css(hex); color = $('#theme_preview_area .'+cc).css(hex);
$(this).miniColors("value", o.rgb2hex(color)); $(this).miniColors("value", o.rgb2hex(color));
}); });
} }
$("div#settings div#panel_r").load("/desktop/settingthemes",function(){ $("div#settings div#panel_r").load("/desktop/settingthemes",function(){
$.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){ $.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){
$("#st1 ul.theme_list li#"+theme).addClass("thmc1").find("span").addClass("thmtxt"); $("#st1 ul.theme_list li#"+theme).addClass("thmc1").find("span").addClass("thmtxt");
bindHandlers(); bindHandlers();
loadthmc();
}) })
}) })
} }
@ -664,7 +689,7 @@ var orbitDesktop = function(dom){
} }
}) })
} };
o.initialize(); o.initialize();
} }

View File

@ -15,7 +15,7 @@
</div> </div>
<div id="holder"> <div id="holder">
<div class="tinycanvas"> <div class="tinycanvas">
<div class="scrollbar sb_h op01"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> <div class="viewport">
<div id="group_wrapper" class="overview"> <div id="group_wrapper" class="overview">