Fixed delete modal not dismissed when clicking 'cancel' button.
parent
47a3d66d5c
commit
e3811e2609
|
|
@ -0,0 +1,16 @@
|
||||||
|
(function($) {
|
||||||
|
'use strict';
|
||||||
|
$(function() {
|
||||||
|
$('.cancel-link').click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var parentWindow = window.parent;
|
||||||
|
if (parentWindow && typeof(parentWindow.dismissRelatedObjectModal) === 'function') {
|
||||||
|
parentWindow.dismissRelatedObjectModal();
|
||||||
|
} else {
|
||||||
|
// fallback to default behavior
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})(django.jQuery);
|
||||||
Loading…
Reference in New Issue