Fixed #42 - Related modal does not dismiss on popup response.
parent
cf76fd412e
commit
3f7b1e54e9
|
|
@ -1,16 +1,24 @@
|
||||||
(function($) {
|
if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
|
||||||
'use strict';
|
{
|
||||||
$(function() {
|
(function($) {
|
||||||
$('.cancel-link').click(function(e) {
|
|
||||||
e.preventDefault();
|
'use strict';
|
||||||
var parentWindow = window.parent;
|
|
||||||
if (parentWindow && typeof(parentWindow.dismissRelatedObjectModal) === 'function') {
|
$(document).ready(function() {
|
||||||
parentWindow.dismissRelatedObjectModal();
|
|
||||||
} else {
|
$('.cancel-link').click(function(e) {
|
||||||
// fallback to default behavior
|
e.preventDefault();
|
||||||
history.back();
|
var parentWindow = window.parent;
|
||||||
}
|
if (parentWindow && typeof(parentWindow.dismissRelatedObjectModal) === 'function') {
|
||||||
return false;
|
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';
|
'use strict';
|
||||||
|
|
||||||
function getModalWindowData()
|
function getModalWindowData()
|
||||||
|
|
@ -48,5 +48,5 @@
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})(django.jQuery);
|
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
@ -129,5 +129,4 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
|
||||||
});
|
});
|
||||||
|
|
||||||
})(django.jQuery);
|
})(django.jQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue