url fixed and edit form fixed for tinyscrollbar

This commit is contained in:
Harry Bomrah committed 2012-11-28 18:12:00 +08:00
1 parent 796dcc4dc6
commit 2f67a96532
6 files changed
+88 -44

No files matched your search

@@ -57,6 +57,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
success : function(data){
var prev_data = $("div[container=true]").html();
$("div[container=true]").html(data);
o.tinyscrollbar_ext({
main: '.tinycanvas',
fill: '.s_grid_con'
})
$(".bt-cancel").click(function(){
$("div[container=true]").html(prev_data);
})
+74 -35
View File
@@ -65,15 +65,28 @@ var orbitDesktop = function(dom){
o.loadWallpaper(customwallpaper);
o.bindDesktopEvents();
o.loadIconCache();
$(o.contentHolder).empty().load("/desktop/desktop",function(){
o.desktopData["d_desktop"] = "";
o.initializeDesktop("d_desktop","",false);
})
var custom_load = window.location.hash;
if(!custom_load){
$(o.contentHolder).empty().load("/desktop/desktop",function(){
o.desktopData["d_desktop"] = "";
o.initializeDesktop("d_desktop","",false);
})
}else{
o.customPage(custom_load);
}
});
})
}
}
this.customPage = function(customload){
customload = customload.replace("#","");
if(customload.search("-") != -1){
customload = customload.split("-");
o.menu_item($(".docklist a[custom-load="+customload[0]+"]"),true,customload[1]);
}else{
o.menu_item($(".docklist a[custom-load="+customload+"]"),true);
}
}
this.changeTheme = function(theme){ // this function is used for changing theme
o.theme = theme;
$.getJSON("/"+o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){
@@ -84,38 +97,10 @@ var orbitDesktop = function(dom){
o.loadIconCache();
})
};
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
$(".docklist a").click(function(){
var target = $(this).attr("id");
var url = $(this).attr("href");
o.data_method = $(this).attr("callback-method");
if(o.currenthtml!=target){
if(o.desktopData[o.currentface] == "undefined")
o.desktopData[o.currentface] = "";
o.desktopData[o.currentface] = $(o.contentHolder).html();
$("#content").hide("drop",o.transitionTime,function(){
o.currenthtml = target;
o.currentface = target;
var cache = false;
if(!o.desktopData[o.currentface]){
$(o.contentHolder).empty().load(url,function(){
if(typeof o.data_method != "undefined"){
if(o.data_method != "")
window.o[o.data_method](target,url,cache);
}
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"));
})
}else{
$(o.contentHolder).html(o.desktopData[o.currentface]);
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"));
cache = true;
if(typeof o.data_method != "undefined"){
if(o.data_method != "")
window.o[o.data_method](target,url,cache);
}
}
});
}
o.menu_item($(this));
return false;
})
@@ -223,6 +208,58 @@ var orbitDesktop = function(dom){
})
};
this.menu_item = function(dom,customload,submenuitem){
if(!customload)customload=false;
var target = dom.attr("id");
var url = dom.attr("href");
o.data_method = dom.attr("callback-method");
if(o.currenthtml!=target){
if(o.desktopData[o.currentface] == "undefined")
o.desktopData[o.currentface] = "";
o.desktopData[o.currentface] = $(o.contentHolder).html();
if(customload){
$(o.contentHolder).html("<div id='content'></div>");
}
$("#content").hide("drop",o.transitionTime,function(){
o.currenthtml = target;
o.currentface = target;
var cache = false;
if(!o.desktopData[o.currentface]){
$(o.contentHolder).empty().load(url,function(){
if(typeof o.data_method != "undefined"){
if(o.data_method != "")
window.o[o.data_method](target,url,cache);
}
if(!customload)
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"));
else{
if(submenuitem)
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"));
else
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"));
}
})
}else{
$(o.contentHolder).html(o.desktopData[o.currentface]);
if(!customload)
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"));
else{
if(submenuitem)
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"));
else
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"));
}
cache = true;
if(typeof o.data_method != "undefined"){
if(o.data_method != "")
window.o[o.data_method](target,url,cache);
}
}
});
}
}
this.sub_menu_item = function(dom){
if(!dom.hasClass('active')){
var sub_data_method = dom.attr('callback-method');
@@ -623,6 +660,8 @@ var orbitDesktop = function(dom){
};
this.initializeSettings = function(target,url,cache){ //this is to initialize setting page
this.initializeSettings.account = function(){}
this.initializeSettings.sections = function(){ // this load section page in setting page
var bindHandlers = function(){ // binding handlers in section page
$('.tinycanvas').each(function(){