mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Merge pull request #657 from romainneutron/jquery-move-to-top
Fix #1484 : Fix jquery dialog moveToTop non working call
This commit is contained in:
@@ -35,36 +35,22 @@
|
|||||||
url: $this.attr('href'),
|
url: $this.attr('href'),
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
beforeSend:function(){
|
beforeSend:function(){
|
||||||
if($('#user_adder_dialog').length === 0)
|
var options = {
|
||||||
{
|
size : 'Medium',
|
||||||
$('body').append('<div id="user_adder_dialog" title="' + $this.html() + '" style="display:none;"></div>');
|
title : $this.html()
|
||||||
}
|
};
|
||||||
$('#user_adder_dialog').addClass('loading').empty().dialog({
|
p4.Dialog.Create(options, 2).getDomElement().addClass('loading');
|
||||||
buttons:{},
|
|
||||||
draggable:false,
|
|
||||||
resizable:false,
|
|
||||||
closeOnEscape:true,
|
|
||||||
modal:true,
|
|
||||||
width:'400',
|
|
||||||
height:'400'
|
|
||||||
}).dialog( "moveToTop" );
|
|
||||||
},
|
},
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$('#user_adder_dialog').removeClass('loading').empty().append(data);
|
p4.Dialog.get(2).getDomElement().removeClass('loading').empty().append(data);
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
if ($('#user_adder_dialog').data("ui-dialog")) {
|
p4.Dialog.get(2).Close();
|
||||||
$('#user_adder_dialog').dialog('destroy');
|
|
||||||
}
|
|
||||||
$('#user_adder_dialog').remove();
|
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
timeout: function(){
|
timeout: function(){
|
||||||
if ($('#user_adder_dialog').data("ui-dialog")) {
|
p4.Dialog.get(2).Close();
|
||||||
$('#user_adder_dialog').dialog('destroy');
|
|
||||||
}
|
|
||||||
$('#user_adder_dialog').remove();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -469,36 +455,21 @@
|
|||||||
url: $this.attr('href'),
|
url: $this.attr('href'),
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
beforeSend:function(){
|
beforeSend:function(){
|
||||||
if($('#user_adder_dialog').length === 0)
|
var options = {
|
||||||
{
|
size : 'Medium',
|
||||||
$('body').append('<div id="user_adder_dialog" style="display:none;"></div>');
|
title : $this.html()
|
||||||
}
|
};
|
||||||
$('#user_adder_dialog').addClass('loading').empty().dialog({
|
p4.Dialog.Create(options, 2).getDomElement().addClass('loading'); },
|
||||||
buttons:{},
|
|
||||||
draggable:false,
|
|
||||||
resizable:false,
|
|
||||||
closeOnEscape:true,
|
|
||||||
modal:true,
|
|
||||||
width:'400',
|
|
||||||
height:'400'
|
|
||||||
}).dialog( "moveToTop" );
|
|
||||||
},
|
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$('#user_adder_dialog').removeClass('loading').empty().append(data);
|
p4.Dialog.get(2).getDomElement().removeClass('loading').empty().append(data);
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
if ($('#user_adder_dialog').data("ui-dialog")) {
|
p4.Dialog.get(2).Close();
|
||||||
$('#user_adder_dialog').dialog('destroy');
|
|
||||||
}
|
|
||||||
$('#user_adder_dialog').remove();
|
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
timeout: function(){
|
timeout: function(){
|
||||||
if ($('#user_adder_dialog').data("ui-dialog")) {
|
p4.Dialog.get(2).Close();
|
||||||
$('#user_adder_dialog').dialog('destroy');
|
|
||||||
}
|
|
||||||
$('#user_adder_dialog').remove();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -739,4 +710,4 @@
|
|||||||
window.Feedback = Feedback;
|
window.Feedback = Feedback;
|
||||||
window.ListManager = ListManager;
|
window.ListManager = ListManager;
|
||||||
|
|
||||||
}(window));
|
}(window));
|
||||||
|
Reference in New Issue
Block a user