mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			409 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			409 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
(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);
 |