Fixed delete modal not dismissed when clicking 'cancel' button.
This commit is contained in:
@@ -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);
|
||||||
Reference in New Issue
Block a user