function update
This commit is contained in:
1 parent
7b391904f7
commit
b743413be9
4 files changed
+148
-79
No files matched your search
@@ -169,12 +169,11 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
}
|
||||
});
|
||||
$('div#desktop .tinycanvas').tinyscrollbar({ axis: 'x'});
|
||||
$("div#desktop div.scrollbar").hover(function(){
|
||||
$(this).removeClass('op01');
|
||||
}, function(){
|
||||
$(this).addClass('op01');
|
||||
});
|
||||
$('div#desktop .tinycanvas')
|
||||
.tinyscrollbar({ axis: 'x' })
|
||||
.find('.scrollbar')
|
||||
.delay(1500)
|
||||
.addClass('op00', 500);
|
||||
|
||||
// simple dropdown menu
|
||||
var $sdm = $('.sdm');
|
||||
@@ -305,7 +304,11 @@ var orbitDesktop = function(dom){
|
||||
$("div#app_manager .group_search").html(allApps);
|
||||
return false;
|
||||
})
|
||||
$('.tinycanvas').tinyscrollbar({ axis: 'x'});
|
||||
$('.tinycanvas')
|
||||
.tinyscrollbar({ axis: 'x'})
|
||||
.find('.scrollbar')
|
||||
.delay(1500)
|
||||
.addClass('op00', 500);
|
||||
}
|
||||
var loadApps = function(){
|
||||
$.getJSON("/desktop/getapplist",{desktopid:o.desktopId},function(appss){
|
||||
@@ -371,7 +374,11 @@ var orbitDesktop = function(dom){
|
||||
$(this).find('span.tile').addClass('op06');
|
||||
}
|
||||
});
|
||||
$('.tinycanvas').tinyscrollbar({ axis: 'x'});
|
||||
$('.tinycanvas')
|
||||
.tinyscrollbar({ axis: 'x'})
|
||||
.find('.scrollbar')
|
||||
.delay(1500)
|
||||
.addClass('op00', 500);
|
||||
var $sdm = $('.sdm');
|
||||
|
||||
if( !$sdm.children('.sdm_o') ){
|
||||
@@ -431,34 +438,43 @@ var orbitDesktop = function(dom){
|
||||
o.currenthtml = target;
|
||||
o.currentface = "settings";
|
||||
var bindHandlers = function(){
|
||||
$("div#settings ul#setting_left_nav li a").click(function(){
|
||||
if(!$(this).data("clicked")){
|
||||
var tfunc = $(this).attr("href");
|
||||
switch(tfunc){
|
||||
case "themes":
|
||||
themes();
|
||||
break;
|
||||
case "sections":
|
||||
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").on({
|
||||
click: function(){
|
||||
if(!$(this).data("clicked")){
|
||||
var tfunc = $(this).attr("href");
|
||||
switch(tfunc){
|
||||
case "themes":
|
||||
themes();
|
||||
break;
|
||||
case "sections":
|
||||
sections();
|
||||
break;
|
||||
}
|
||||
$("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 bindHandlers = function(){
|
||||
$('.tinycanvas').each(function(){
|
||||
var h = $(this).parent().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(){
|
||||
@@ -493,27 +509,51 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
var themes = function(){
|
||||
var bindHandlers = function(){
|
||||
$(".theme_list > li").click(function(){
|
||||
// live change theme
|
||||
$(".theme_list > .ssl_item").click(function(){
|
||||
o.changeTheme($(this).attr("id"));
|
||||
$(".theme_list > li").removeClass('thmc1').data('clicked',null).find('.theme_name').removeClass('thmtxt');
|
||||
$(this).addClass('thmc1').data('clicked',true).find('.theme_name').addClass('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');
|
||||
$.post("/desktop/save_desktop_settings",{"save":"theme","desktopid":o.desktopId,"theme":$(this).attr("id")},function(result,status){
|
||||
if(status=="success"){
|
||||
if(result[0].success=="true")
|
||||
if(result[0].success=="true"){
|
||||
o.notify("Theme Saved!!","success",2);
|
||||
else
|
||||
loadthmc();
|
||||
} else {
|
||||
o.notify("Theme saving failed!!","imp",2);
|
||||
}
|
||||
}else{
|
||||
o.notify("Connection problem!!","alert",2);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// single select
|
||||
$('.ssl .ssl_item').each(function(){
|
||||
$(this).on({
|
||||
click: function(){
|
||||
$(this).switchClass('','thmc1 active',300);
|
||||
$(this).siblings('.thmc1').switchClass('thmc1 active','',100);
|
||||
|
||||
if( $(this).find('.ssl_des') ){
|
||||
$(this).parents('.ssl').find('.ssl_des').removeClass('thmtxt');
|
||||
$(this).find('.ssl_des').addClass('thmtxt');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
$('.tinycanvas').each(function(){
|
||||
var h = $(this).parent().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*=#]'),
|
||||
$tabcontent = $('.st_c');
|
||||
|
||||
@@ -528,12 +568,38 @@ var orbitDesktop = function(dom){
|
||||
return false;
|
||||
});
|
||||
});
|
||||
/* $("tr#color_inputs input").each(function(){
|
||||
var what = $(this).attr("for");
|
||||
alert($("#theme_preview_area ."+what).css("background-color"))
|
||||
$(this).val()
|
||||
}) */
|
||||
|
||||
|
||||
loadthmc();
|
||||
function loadthmc(){
|
||||
$('#color_input .color-picker').each(function(){
|
||||
var cc = $(this).attr('for'), hex, color;
|
||||
|
||||
switch(cc){
|
||||
case 'thmtxt':
|
||||
case 'thmtxth':
|
||||
hex = 'color';
|
||||
break;
|
||||
case 'g_sep':
|
||||
hex = 'borderColor';
|
||||
break;
|
||||
default:
|
||||
hex = 'backgroundColor';
|
||||
break;
|
||||
}
|
||||
|
||||
color = $('.'+cc).css( hex );
|
||||
$(this).val(rgb2hex(color));
|
||||
|
||||
});
|
||||
}
|
||||
// Awesome RGBA to HEX (alpha ignored)
|
||||
function rgb2hex(rgb) {
|
||||
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||
function hex(x) {
|
||||
return ("0" + parseInt(x).toString(16)).slice(-2);
|
||||
}
|
||||
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
||||
}
|
||||
$('.color-picker').miniColors({
|
||||
change:function(hex){
|
||||
var changewhat = $(this).attr("for");
|
||||
@@ -546,7 +612,7 @@ var orbitDesktop = function(dom){
|
||||
case "g_sep":
|
||||
previewarea.find("."+changewhat).css({"border-color":hex});
|
||||
break;
|
||||
case "background":
|
||||
case "thmbgc":
|
||||
previewarea.css({"background-color":hex});
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user