settings application
.env db params+global settings in admin model ECVI plugin module
This commit is contained in:
17
staticfiles/admin/js/cancel.js
Normal file
17
staticfiles/admin/js/cancel.js
Normal file
@@ -0,0 +1,17 @@
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.cancel-link').click(function(e) {
|
||||
e.preventDefault();
|
||||
const parentWindow = window.parent;
|
||||
if (parentWindow && typeof(parentWindow.dismissRelatedObjectModal) === 'function' && parentWindow !== window) {
|
||||
parentWindow.dismissRelatedObjectModal();
|
||||
} else {
|
||||
// fallback to default behavior
|
||||
window.history.back();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
})(django.jQuery);
|
||||
Reference in New Issue
Block a user