From c6868bf2e0c983e68d296e399f709bb9cbd6b8f8 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 3 Apr 2013 15:24:30 +0800 Subject: [PATCH] small fix in select2.js --- app/assets/javascripts/orbitdesktop.js | 15 +++++++++++---- app/assets/javascripts/orbitdesktopAPI.js | 6 ------ app/views/desktop/index.html.erb | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 8f760246..e6b6377a 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -109,7 +109,7 @@ var orbitDesktop = function(dom){ this.themesettings = ""; this.theme = "4f8d3f493b67fcd05f086359"; this.transitionTime = 500; - this.currenthtml = "desktop.html"; + this.currenthtml = "home"; this.currentface = "home"; this.desktopData = {}; this.tp = ""; @@ -632,7 +632,7 @@ var orbitDesktop = function(dom){ } this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles - if(!target)target = "desktop"; + if(!target)target = "home"; var bindHandlers = function(){ // this function will bind all the handlers in the desktop // var groupWrapperWidth = 0; // $("div#desktop .group").each(function(){groupWrapperWidth+=$(this).outerWidth(true);}); @@ -1146,9 +1146,9 @@ var orbitDesktop = function(dom){ }); $.post("/desktop/save_desktop_settings",{"save":"appnewsection","appid":ui.draggable.attr("id"),"newsectionid":$(this).data("content"),"desktopid":o.desktopId}); - if(o.sectionId == $(this).data("content") || o.sectionId == elementParent.attr("id")){ + // if(o.sectionId == $(this).data("content") || o.sectionId == elementParent.attr("id")){ o.desktopData["home"]=""; - } + // } } $(this).find('span.tile').addClass('op06',400); }, @@ -1605,6 +1605,7 @@ var orbitDesktop = function(dom){ }) }; this.initializeWidgets = function(){ // this function will initialize all the widgets in the desktop + var elements = $("#group_wrapper li.widget"); $.each(elements,function(){ var widget = $(this); @@ -1729,6 +1730,12 @@ var orbitDesktop = function(dom){ }); }); } + this.use_select2 = function(){ + $('select:not(.select2-offscreen)').select2({ + minimumResultsForSearch: -1 + // minimumInputLength: -1 + }); + } o.initialize(); } diff --git a/app/assets/javascripts/orbitdesktopAPI.js b/app/assets/javascripts/orbitdesktopAPI.js index 7f5f1f53..9e4700ea 100644 --- a/app/assets/javascripts/orbitdesktopAPI.js +++ b/app/assets/javascripts/orbitdesktopAPI.js @@ -206,12 +206,6 @@ var orbitDesktopAPI = function(){ } } }; - this.use_select2 = function(){ - $('select:not(.select2-offscreen)').select2({ - minimumResultsForSearch: -1 - // minimumInputLength: -1 - }); - } }; orbitDesktopAPI.prototype.notifyImgPath = "temp"; orbitDesktopAPI.prototype.wallpaperPath = "temp"; diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index 613b7cf1..7dd6c3c1 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -1,7 +1,7 @@
    -
  • Home +
  • Home
    • App Manager
    • All Sections