Modified confirm box…

This commit is contained in:
Harry Bomrah committed 2012-04-19 15:36:03 +08:00
1 parent 4bad25e682
commit 3c5b7a5de3
2 files changed
+31 -27

No files matched your search

+22 -18
View File
@@ -619,25 +619,29 @@ var orbitDesktop = function(dom){
});
$("a#theme_submit").click(function(){
o.confirm("Are you sure that you want to set this custom theme?",["Yes","No"],3,function(reply){
o.confirm({
message : "Are you sure that you want to save custom theme?",
highlighted : 1,
buttons : ["Yes","No"]
},function(reply){
if(reply){
var colors = new Array;
$("#color_input input").each(function(){
colors[$(this).attr("for")] = $(this).val();
})
var dhtml ="<style> .thmc1 { background: "+colors['thmc1']+"; }.thmc2 { background: "+colors['thmc2']+"; }.thmc3 { background: #FFFFFF; }.thmc4 { background: "+colors['thmc4']+"; }.thmtxt { color: "+colors['thmtxt']+"; }.thmtxth { color: "+colors['thmtxth']+"; }.g_sep { border-color: "+colors['g_sep']+";} body{background-color: "+colors['background']+"} </style>";
$("head").find("#dyn_css").remove();
$("head").append(dhtml);
$.post("/desktop/save_desktop_settings",{"save":"customtheme","desktopid":o.desktopId,"theme":dhtml},function(result,status){
if(status=="success"){
if(result[0].success=="true")
o.notify("Custom theme saved!!","success",2);
else
o.notify("Custom theme saving failed!!","imp",2);
}else{
o.notify("Connection problem!!","alert",2);
}
})
var colors = new Array;
$("#color_input input").each(function(){
colors[$(this).attr("for")] = $(this).val();
})
var dhtml ="<style> .thmc1 { background: "+colors['thmc1']+"; }.thmc2 { background: "+colors['thmc2']+"; }.thmc3 { background: #FFFFFF; }.thmc4 { background: "+colors['thmc4']+"; }.thmtxt { color: "+colors['thmtxt']+"; }.thmtxth { color: "+colors['thmtxth']+"; }.g_sep { border-color: "+colors['g_sep']+";} body{background-color: "+colors['background']+"} </style>";
$("head").find("#dyn_css").remove();
$("head").append(dhtml);
$.post("/desktop/save_desktop_settings",{"save":"customtheme","desktopid":o.desktopId,"theme":dhtml},function(result,status){
if(status=="success"){
if(result[0].success=="true")
o.notify("Custom theme saved!!","success",2);
else
o.notify("Custom theme saving failed!!","imp",2);
}else{
o.notify("Connection problem!!","alert",2);
}
})
}
})
});