Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7137cbab08 | |||
| 3f7b1e54e9 |
@@ -1,16 +1,24 @@
|
||||
(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;
|
||||
if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
|
||||
{
|
||||
(function($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
$(document).ready(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);
|
||||
|
||||
})(django.jQuery);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* global opener */
|
||||
(function($) {
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
function getModalWindowData()
|
||||
@@ -48,5 +48,5 @@
|
||||
}
|
||||
break;
|
||||
}
|
||||
})(django.jQuery);
|
||||
|
||||
})();
|
||||
@@ -129,5 +129,4 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
|
||||
});
|
||||
|
||||
})(django.jQuery);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = '0.8.0'
|
||||
__version__ = '0.8.1'
|
||||
|
||||
Reference in New Issue
Block a user