mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-29 12:50:55 +02:00
add static files
This commit is contained in:
13
static/admin/js/cancel.js
Normal file
13
static/admin/js/cancel.js
Normal file
@ -0,0 +1,13 @@
|
||||
(function($) {
|
||||
'use strict';
|
||||
$(function() {
|
||||
$('.cancel-link').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (window.location.search.indexOf('&_popup=1') === -1) {
|
||||
window.history.back(); // Go back if not a popup.
|
||||
} else {
|
||||
window.close(); // Otherwise, close the popup.
|
||||
}
|
||||
});
|
||||
});
|
||||
})(django.jQuery);
|
Reference in New Issue
Block a user