mybuddy/static/admin/js/cancel.a2c3149a1c5e.js

14 lines
409 B
JavaScript
Raw Normal View History

2019-07-11 02:25:40 +00:00
(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);