diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 62556aec..6060bcb2 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -218,6 +218,16 @@ var orbitDesktop = function(dom){ bindHandlers(); o.initializeWidgets(); bindSecondaryHandlers(); + $("div#desktop ul#section_list").empty(); + $.each(o.sectionList,function(i,section){ + var tempstyle=""; + if(i==0){ + tempstyle = "style='display:none;'"; + $("div#desktop span#section_heading").text(section.name); + } + $("div#desktop ul#section_list").append($('
  • '+section.name+'
  • ')); + }) + bindSecondaryHandlers(); } }; this.tempFunc = function(th){ @@ -291,10 +301,10 @@ var orbitDesktop = function(dom){ o.currentface = "sections"; var elementParent,element,groupWrapperWidth; var bindHandlers = function(){ - $("div#sections .group").width(530); + $("div#sections .group").width(400); $("div#sections .group").each(function(){groupWrapperWidth+=$(this).width();}) groupWrapperWidth+=200; - // groupWrapperHeight = $(".group").height() + 20; + groupWrapperHeight = $(".group").height() + 20; // groupWrapperHeight = (groupWrapperHeight > ($(window).height()-extraspace))? $(window).height()-extraspace:groupWrapperHeight; $("div#sections #group_wrapper").css("width",groupWrapperWidth); $("div#sections #group_wrapper .to_drop").sortable({ @@ -340,7 +350,7 @@ var orbitDesktop = function(dom){ $group = $('
    '); for(x=0;x<4;x++){ if(x==0){ - $li = $('
  • '+o.sectionList[z].name+'
  • '); + $li = $('
  • '+o.sectionList[z].name+'
  • '); $group.find("ul.section_grp").append($li); } if(z!=x){ @@ -355,7 +365,6 @@ var orbitDesktop = function(dom){ $.each(appss,function(i,apps){ $.each(apps,function(i,app){ - // alert(yy); $li = $('
  • '+app.title+'

  • '); $("ul#section"+yy).append($li); }) @@ -427,6 +436,9 @@ var orbitDesktop = function(dom){ o.notify("Connection problem!!","alert",2); } }) + $.each(o.sectionList,function(i,sec){ + sec.name = desktopnm[i]; + }) }) } $("div#settings div#panel_r").load("/desktop/settingsections",function(){ diff --git a/app/views/desktop/settings/sections.html.erb b/app/views/desktop/settings/sections.html.erb index 02e538d8..ede6b2cf 100644 --- a/app/views/desktop/settings/sections.html.erb +++ b/app/views/desktop/settings/sections.html.erb @@ -5,10 +5,10 @@
    Sections Name
    Confirm