mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 23:43:12 +00:00
PHRAS-601 - fix behavior in delete records modal
This commit is contained in:

committed by
Benoît Burnichon

parent
15634e1cd4
commit
236c036f9c
@@ -31,8 +31,10 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var $dialog = p4.Dialog.get(1);
|
var $dialog = p4.Dialog.get(1);
|
||||||
var $dialogBox = $dialog.getDomElement();
|
var $dialogBox = $dialog.getDomElement();
|
||||||
|
var $closeButton = $("button.ui-dialog-titlebar-close", $dialogBox.parent());
|
||||||
|
var $cancelButton = $("button.cancel", $dialogBox);
|
||||||
|
|
||||||
$("button.cancel", $dialogBox).bind("click", function(){
|
$cancelButton.bind("click", function(){
|
||||||
$dialog.Close();
|
$dialog.Close();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -47,7 +49,10 @@
|
|||||||
data: form.serializeArray(),
|
data: form.serializeArray(),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
beforeSend:function(){
|
beforeSend:function(){
|
||||||
$this.attr("disabled", true);
|
$this.prop('disabled', true);
|
||||||
|
$closeButton.prop('disabled', true);
|
||||||
|
$cancelButton.prop('disabled', true);
|
||||||
|
$dialog.setOption('closeOnEscape', false);
|
||||||
loader.show();
|
loader.show();
|
||||||
},
|
},
|
||||||
success: function(data){
|
success: function(data){
|
||||||
@@ -80,7 +85,10 @@
|
|||||||
viewNbSelect();
|
viewNbSelect();
|
||||||
},
|
},
|
||||||
complete: function(){
|
complete: function(){
|
||||||
$this.attr("disabled", false);
|
$this.prop('disabled', false);
|
||||||
|
$closeButton.prop('disabled', false);
|
||||||
|
$cancelButton.prop('disabled', false);
|
||||||
|
$dialog.setOption('closeOnEscape', true);
|
||||||
loader.hide();
|
loader.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user