new setting page
This commit is contained in:
parent
f7997bbd85
commit
39e1bc8948
|
@ -10,7 +10,7 @@ var orbitDesktop = function(dom){
|
|||
this.transitionTime = 500;
|
||||
this.currenthtml = "desktop.html";
|
||||
this.currentface = "home";
|
||||
this.desktopData = {"home":"","fun":"","work":"","favorite":"","apps_manager":"","sections":""};
|
||||
this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":""};
|
||||
this.tp = "";
|
||||
this.initialize = function(){
|
||||
var theme = o.theme;
|
||||
|
@ -60,6 +60,15 @@ var orbitDesktop = function(dom){
|
|||
});
|
||||
}
|
||||
});
|
||||
$("a#d_settings").click(function(){
|
||||
var target = $(this).attr("href");
|
||||
if(o.currenthtml!=target){
|
||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
||||
$("#content").hide("drop",o.transitionTime,function(){
|
||||
o.initializeSectionsManager(target);
|
||||
});
|
||||
}
|
||||
});
|
||||
$("select#change_theme").change(function(){
|
||||
o.changeTheme($(this).val());
|
||||
})
|
||||
|
@ -188,7 +197,7 @@ var orbitDesktop = function(dom){
|
|||
};
|
||||
this.initializeSectionsManager = function(target){
|
||||
o.currenthtml = target;
|
||||
o.currentface = "settings";
|
||||
o.currentface = "sections";
|
||||
var elementParent,element;
|
||||
var bindHandlers = function(){
|
||||
$(".group").width(530);
|
||||
|
@ -271,6 +280,18 @@ var orbitDesktop = function(dom){
|
|||
$("#orbit_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.orbit);
|
||||
$("#connection_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.connection);
|
||||
$("#appstore_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.appstore);
|
||||
};
|
||||
this.initializeSettings = function(target){
|
||||
o.currenthtml = target;
|
||||
o.currentface = "sections";
|
||||
if(!o.desktopData[o.currentface]){
|
||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
||||
// bindHandlers();
|
||||
});
|
||||
}else{
|
||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
||||
// bindHandlers();
|
||||
}
|
||||
}
|
||||
o.initialize();
|
||||
}
|
||||
|
|
|
@ -16,4 +16,8 @@ class DesktopController< ApplicationController
|
|||
def sections
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def settings
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
settings
|
|
@ -98,6 +98,7 @@ Orbit::Application.routes.draw do
|
|||
match '/desktop/desktop'=>'desktop#desktop'
|
||||
match '/desktop/app_manager'=>'desktop#app_manager'
|
||||
match '/desktop/sections'=>'desktop#sections'
|
||||
match '/desktop/settings'=>'desktop#settings'
|
||||
match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
|
||||
!request.query_string.include?("inner=true")
|
||||
}
|
||||
|
|
Reference in New Issue