Dock change and getting values from db
This commit is contained in:
1 parent
b2c9229099
commit
7309d9c446
145 files changed
+218
-55
No files matched your search
@@ -10,5 +10,4 @@
|
||||
//= require jquery.tinyscrollbar.min
|
||||
//= require bootstrap
|
||||
//= require orbitdesktopAPI
|
||||
//= require orbitdesktop
|
||||
//= require desktopload
|
||||
//= require orbitdesktop
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
orbitDesktop.prototype.themefolder = "desktop_themes";
|
||||
orbitDesktopAPI.prototype.notifyImgPath = "/assets/";
|
||||
alert("<%= @desktop.inspect %>")
|
||||
var od = new orbitDesktop("#ajax_container");
|
||||
|
||||
@@ -13,7 +13,13 @@ var orbitDesktop = function(dom){
|
||||
this.desktopData = {"home":"","fun":"","work":"","favorite":"","apps_manager":"","sections":""};
|
||||
this.tp = "";
|
||||
this.initialize = function(){
|
||||
var theme = o.theme;
|
||||
var theme = o.theme;
|
||||
$.getJSON("/desktop/get_desktop_settings",{id:o.desktopId},function(desktopSettings){
|
||||
if(desktopSettings){
|
||||
theme = desktopSettings.theme
|
||||
}
|
||||
})
|
||||
|
||||
$.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));
|
||||
@@ -75,6 +81,15 @@ var orbitDesktop = function(dom){
|
||||
$("#holder").animate({scrollLeft:0},1000);
|
||||
}*/
|
||||
});
|
||||
var $widget_fn = $('.widget_fn'),$fn_des = $('.fn_des');
|
||||
$widget_fn.hover(function(){
|
||||
var fn_name = $(this).find('img').attr('alt'),nth = $(this).parents('.d_cate').index(),des_left = $('.dock_child').eq(nth).width();
|
||||
$(this).addClass('thmc1');
|
||||
$fn_des.text(fn_name).css({'top':nth * 60,'left': des_left + 60}).stop(true, true).fadeIn();
|
||||
},function(){
|
||||
$(this).removeClass('thmc1');
|
||||
$fn_des.stop(true, true).fadeOut();
|
||||
});
|
||||
};
|
||||
this.initializeDesktop = function(target){
|
||||
if(!target)target = "desktop";
|
||||
@@ -134,7 +149,10 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
};
|
||||
this.tempFunc = function(){
|
||||
o.notify("This is test notification!!","alert",2)
|
||||
//o.notify("This is test notification!!","alert",2)
|
||||
$.post("/desktop/save_desktop_settings",{"theme":$("#change_theme").val()},function(){
|
||||
o.notify("Settings Saved!!","success");
|
||||
})
|
||||
}
|
||||
this.initializeAppSearch = function(target){
|
||||
o.currenthtml = target;
|
||||
@@ -239,43 +257,18 @@ var orbitDesktop = function(dom){
|
||||
$("div#bgover").css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","width":ww,"height":wh});
|
||||
};
|
||||
this.loadIconCache = function(){
|
||||
$("#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);
|
||||
$("#settings_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.settings);
|
||||
$("#publication_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.publication);
|
||||
$("#journal_p_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.journal_p);
|
||||
$("#seminar_p_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.seminar_p);
|
||||
$("#books_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.books);
|
||||
$("#research_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.research);
|
||||
$("#research_d_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.research_d);
|
||||
$("#research_p_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.research_p);
|
||||
$("#patents_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.patents);
|
||||
$("#labs_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.labs);
|
||||
$("#experience_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.experience);
|
||||
$("#working_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.working);
|
||||
$("#education_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.education);
|
||||
$("#honors_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.honors);
|
||||
$("#activities_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.activities);
|
||||
$("#clubs_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.clubs);
|
||||
$("#landt_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.landt);
|
||||
$("#courses_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.courses);
|
||||
$("#homework_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.homework);
|
||||
$("#certification_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.certification);
|
||||
$("#personal_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.personal);
|
||||
$("#mypage_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.mypage);
|
||||
$("#blog_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.blog);
|
||||
$("#album_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.album);
|
||||
$("#calendar_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.calendar);
|
||||
$("#files_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.files);
|
||||
$("#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);
|
||||
var imgs = $("ul.docklist img");
|
||||
$.each(imgs,function(){
|
||||
var setting_name = $(this).attr("id").replace("_icon","");
|
||||
$(this).attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons[setting_name])
|
||||
})
|
||||
}
|
||||
o.initialize();
|
||||
}
|
||||
|
||||
orbitDesktop.prototype.themefolder = "themes";
|
||||
orbitDesktop.prototype.desktopId = "1";
|
||||
orbitDesktop.prototype.notifyImgPath = "temp";
|
||||
|
||||
// devin
|
||||
(function(){
|
||||
@@ -307,4 +300,4 @@ orbitDesktop.prototype.themefolder = "themes";
|
||||
});
|
||||
|
||||
|
||||
}());
|
||||
}());
|
||||
@@ -33,11 +33,9 @@ var orbitDesktopAPI = function(){
|
||||
img = "note_alert.png";
|
||||
break;
|
||||
}
|
||||
$notify.find("img#note_img").attr("src","/assets/"+img);
|
||||
$notify.find("img#note_img").attr("src",o.notifyImgPath+img);
|
||||
$notify.find(".note_message").text(msg);
|
||||
if(!time)time=5000; else time=time*1000;
|
||||
$notify.slideDown().delay(time).slideUp();
|
||||
};
|
||||
};
|
||||
|
||||
orbitDesktopAPI.prototype.notifyImgPath = "";
|
||||
};
|
||||
Reference in new issue
Block a user