some update
This commit is contained in:
1 parent
c3eef6eaa6
commit
19750d69e0
4 files changed
+75
-35
No files matched your search
@@ -352,7 +352,7 @@ var orbitDesktop = function(dom){
|
||||
this.initializeSectionsManager = function(target){
|
||||
o.currenthtml = target;
|
||||
o.currentface = "sections";
|
||||
var elementParent,element;
|
||||
var elementParent,element,slabel;
|
||||
var bindHandlers = function(){
|
||||
var groupWrapperWidth = 0;
|
||||
$("div#sections .group").width(400);
|
||||
@@ -360,26 +360,27 @@ var orbitDesktop = function(dom){
|
||||
groupWrapperWidth+=200;
|
||||
groupWrapperHeight = $(".group").height() + 20;
|
||||
$("#group_wrapper").width(groupWrapperWidth);
|
||||
$("div#sections #group_wrapper .to_drop").sortable({
|
||||
$("div#sections #group_wrapper .grp").sortable({
|
||||
start:function(){
|
||||
var $elementParent = $(this).parent().parent();
|
||||
elementParent = $elementParent;
|
||||
element = $(this);
|
||||
$elementParent.find("div.section_label ul li").fadeIn(500);
|
||||
slabel = $(this).siblings('.section_label');
|
||||
slabel.find('li:hidden').fadeIn(500);
|
||||
},
|
||||
stop:function(){
|
||||
elementParent.find("div.section_label ul li:not(:nth-child(1))").fadeOut(500);
|
||||
slabel.find('li:not(:nth-child(1))').fadeOut(500);
|
||||
}
|
||||
});
|
||||
$("div#sections .section_label ul li:not(:nth-child(1))").droppable({
|
||||
drop:function(){
|
||||
if($("#"+$(this).attr("data-category")+" .element").length>=24){
|
||||
$("div#sections .section_label li:not(:nth-child(1))").droppable({
|
||||
drop:function(event, ui){
|
||||
element = ui.draggable;
|
||||
elementParent = ui.draggable.parent();
|
||||
if($("#"+$(this).data("category")+" .element").length>=24){
|
||||
o.notify("Section is full.","alert");
|
||||
}
|
||||
else{
|
||||
$("#"+$(this).attr("data-category")).append(element);
|
||||
$.post("/desktop/save_desktop_settings",{"save":"appnewsection","appid":element.attr("id"),"newsectionid":$(this).attr("data-content"),"desktopid":o.desktopId})
|
||||
if(o.sectionId == $(this).attr("data-content") || o.sectionId == elementParent.attr("id")){
|
||||
element.appendTo('body');
|
||||
// .appendTo("#"+$(this).data("category"));
|
||||
$.post("/desktop/save_desktop_settings",{"save":"appnewsection","appid":element.attr("id"),"newsectionid":$(this).data("content"),"desktopid":o.desktopId})
|
||||
if(o.sectionId == $(this).data("content") || o.sectionId == elementParent.attr("id")){
|
||||
o.desktopData["home"]="";
|
||||
}
|
||||
}
|
||||
@@ -555,6 +556,24 @@ var orbitDesktop = function(dom){
|
||||
$(this).parents('.ssl').find('.ssl_des').removeClass('thmtxt');
|
||||
$(this).find('.ssl_des').addClass('thmtxt');
|
||||
}
|
||||
},
|
||||
mouseenter: function(){
|
||||
if( !$(this).hasClass('active') ){
|
||||
$(this).addClass('thmc1');
|
||||
|
||||
if( $(this).find('.ssl_des') ){
|
||||
$(this).find('.ssl_des').addClass('thmtxt');
|
||||
}
|
||||
}
|
||||
},
|
||||
mouseleave: function(){
|
||||
if( !$(this).hasClass('active') ){
|
||||
$(this).removeClass('thmc1');
|
||||
|
||||
if( $(this).find('.ssl_des') ){
|
||||
$(this).find('.ssl_des').removeClass('thmtxt');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -607,16 +626,6 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.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 = $(this).data('clicked') ? '' : 'thmc1',
|
||||
t = $(this).data('clicked') ? '' : 'thmtxt';
|
||||
$(this).removeClass(c).find('.theme_name').removeClass(t);
|
||||
});
|
||||
|
||||
$("a#theme_submit").click(function(){
|
||||
o.confirm({
|
||||
@@ -675,7 +684,11 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
$("div#settings div#panel_r").load("/desktop/settingthemes",function(){
|
||||
$.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 .theme_list [id='+theme+']')
|
||||
.addClass("thmc1 active", 300)
|
||||
.find("span")
|
||||
.addClass("thmtxt");
|
||||
|
||||
bindHandlers();
|
||||
loadthmc();
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user