new setting page

This commit is contained in:
Harry Bomrah committed 2012-04-05 20:09:11 +08:00
1 parent f7997bbd85
commit 39e1bc8948
4 files changed
+29 -2

No files matched your search

+23 -2
View File
@@ -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();
}