mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Upgrade code to Phraseanet Alerts
This commit is contained in:
@@ -439,6 +439,7 @@ function disconnected()
|
|||||||
function showModal(cas, options){
|
function showModal(cas, options){
|
||||||
|
|
||||||
var content = '';
|
var content = '';
|
||||||
|
var callback = null;
|
||||||
var button = {
|
var button = {
|
||||||
"OK": function(e)
|
"OK": function(e)
|
||||||
{
|
{
|
||||||
@@ -459,45 +460,15 @@ function showModal(cas, options){
|
|||||||
case 'disconnected':
|
case 'disconnected':
|
||||||
content = language.serverDisconnected;
|
content = language.serverDisconnected;
|
||||||
escape=false;
|
escape=false;
|
||||||
button = {"OK":function(e){
|
callback = function(e){ self.location.replace(self.location.href)};
|
||||||
self.location.replace(self.location.href);
|
|
||||||
}};
|
|
||||||
onClose = function(){
|
|
||||||
self.location.replace(self.location.href);
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case 'prompt':
|
|
||||||
content = "<input type='text' value='' id='" + options.id + "' />";
|
|
||||||
escape=false;
|
|
||||||
button = {
|
|
||||||
"OK":function(e){
|
|
||||||
(options.callback)();
|
|
||||||
hideOverlay(3);
|
|
||||||
$(this).dialog("close");
|
|
||||||
},
|
|
||||||
"Cancel":function(e){
|
|
||||||
hideOverlay(3);
|
|
||||||
$(this).dialog("close");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var buttons = {"OK": function(e){$(this).dialog('close');}};
|
p4.Alerts(options.title, content, callback);
|
||||||
|
|
||||||
$('#DIALOG').empty().append(content).attr('title',options.title).dialog({
|
|
||||||
autoOpen:false,
|
|
||||||
buttons: button,
|
|
||||||
closeOnEscape :escape,
|
|
||||||
resizable:false,
|
|
||||||
draggable:false,
|
|
||||||
modal:true,
|
|
||||||
close:onClose
|
|
||||||
}).dialog('open').dialog('option','buttons',buttons);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOverlay(n,appendto,callback, zIndex){
|
function showOverlay(n,appendto,callback, zIndex){
|
||||||
|
Reference in New Issue
Block a user