Stupid theme
This commit is contained in:
1 parent
2e283a039d
commit
176597f5af
43 files changed
+833
-42
No files matched your search
@@ -1,10 +1,4 @@
|
||||
|
||||
//orbitDesktop.prototype.themesfolder = "<%= "#{Rails.root}/lib/desktop_themes" %>";
|
||||
orbitDesktop.prototype.themefolder = "desktop_themes";
|
||||
var od = new orbitDesktop("#ajax_container");
|
||||
// alert(od.themefolder);
|
||||
$(document).ready(function(){
|
||||
alert("something");
|
||||
|
||||
// od.initializeDesktop();
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ var orbitDesktop = function(dom){
|
||||
this.contentHolder = dom;
|
||||
this.themesettings = "";
|
||||
this.theme = "default";
|
||||
this.themefolder = "themes";
|
||||
// this.themefolder = "themes";
|
||||
this.transitionTime = 500;
|
||||
this.currenthtml = "desktop.html";
|
||||
this.currentface = "home";
|
||||
@@ -14,18 +14,20 @@ var orbitDesktop = function(dom){
|
||||
this.tp = "";
|
||||
this.initialize = function(){
|
||||
var theme = o.theme;
|
||||
$.getJSON(o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){
|
||||
$.getJSON("/"+o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){
|
||||
o.themesettings = eval(ts);
|
||||
$('head').append( $('<link rel="stylesheet" id="dyn_css" type="text/css" />').attr('href', o.themefolder+"/"+theme+"/css/"+ts.css));
|
||||
$('head').append( $('<link rel="stylesheet" id="dyn_css" type="text/css" />').attr('href', "/"+o.themefolder+"/"+theme+"/css/"+ts.css));
|
||||
$(document).ready(function(){o.loadWallpaper();o.bindDesktopEvents();o.loadIconCache();o.initializeDesktop();});
|
||||
return;
|
||||
})
|
||||
$(document).ready(function(){o.loadWallpaper();o.bindDesktopEvents();o.loadIconCache();});
|
||||
|
||||
};
|
||||
this.changeTheme = function(theme){
|
||||
o.theme = theme;
|
||||
$.getJSON(o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){
|
||||
$.getJSON("/"+o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){
|
||||
o.themesettings = eval(ts);
|
||||
$('head').find("#dyn_css").remove();
|
||||
$('head').append( $('<link rel="stylesheet" id="dyn_css" type="text/css" />').attr('href', o.themefolder+"/"+theme+"/css/"+ts.css));
|
||||
$('head').append( $('<link rel="stylesheet" id="dyn_css" type="text/css" />').attr('href', "?"+o.themefolder+"/"+theme+"/css/"+ts.css));
|
||||
o.loadWallpaper();
|
||||
o.loadIconCache();
|
||||
})
|
||||
@@ -76,7 +78,7 @@ var orbitDesktop = function(dom){
|
||||
});
|
||||
};
|
||||
this.initializeDesktop = function(target){
|
||||
if(!target)target = "desktop.html";
|
||||
if(!target)target = "desktop";
|
||||
o.currenthtml = target;
|
||||
o.currentface = "home";
|
||||
var groupWrapperWidth = 0;
|
||||
@@ -123,7 +125,7 @@ var orbitDesktop = function(dom){
|
||||
});
|
||||
}
|
||||
if(!o.desktopData[o.currentface]){
|
||||
$(o.contentHolder).empty().load("pages/"+target,function(){
|
||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
||||
bindHandlers();
|
||||
});
|
||||
}else{
|
||||
@@ -175,7 +177,7 @@ var orbitDesktop = function(dom){
|
||||
})
|
||||
}
|
||||
if(!o.desktopData[o.currentface]){
|
||||
$(o.contentHolder).empty().load("pages/"+target,function(){
|
||||
$(o.contentHolder).empty().load("desktop_pages/"+target,function(){
|
||||
bindHandlers();
|
||||
});
|
||||
}else{
|
||||
@@ -213,7 +215,7 @@ var orbitDesktop = function(dom){
|
||||
})//.mouseleave(function(){$(this).addClass("op06");});
|
||||
};
|
||||
if(!o.desktopData[o.currentface]){
|
||||
$(o.contentHolder).empty().load("pages/"+target,function(){
|
||||
$(o.contentHolder).empty().load("desktop_pages/"+target,function(){
|
||||
bindHandlers();
|
||||
});
|
||||
}else{
|
||||
@@ -227,16 +229,19 @@ var orbitDesktop = function(dom){
|
||||
var ww = $(window).width();
|
||||
var wh = $(window).height();
|
||||
if(o.themesettings.background)
|
||||
$("img#thmbackground").attr({"src":o.themefolder+"/"+o.theme+"/images/"+wallpaper,"width":ww}).css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","height":"auto"});
|
||||
$("img#thmbackground").attr({"src":"/"+o.themefolder+"/"+o.theme+"/images/"+wallpaper,"width":ww}).css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","height":"auto"});
|
||||
else
|
||||
$("img#thmbackground").attr({"src":"images/"+wallpaper,"width":ww}).css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","height":"auto"});
|
||||
$("img#thmbackground").attr({"src":"/"+"images/"+wallpaper,"width":ww}).css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","height":"auto"});
|
||||
|
||||
$("div#bgover").css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","width":ww,"height":wh});
|
||||
};
|
||||
this.loadIconCache = function(){
|
||||
$("#home_icon").attr("src","themes/"+o.theme+"/images/"+o.themesettings.icons.home);
|
||||
$("#app_manager_icon").attr("src","themes/"+o.theme+"/images/"+o.themesettings.icons.app_manager);
|
||||
$("#sections_icon").attr("src","themes/"+o.theme+"/images/"+o.themesettings.icons.sections);
|
||||
$("#home_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.home);
|
||||
$("#app_manager_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.app_manager);
|
||||
$("#sections_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.sections);
|
||||
}
|
||||
o.initialize();
|
||||
}
|
||||
|
||||
orbitDesktop.prototype.themefolder = "themes";
|
||||
|
||||
Reference in new issue
Block a user