Fix pagination controls, move mixin to common app, fix pagination invocation on all views, and other random bug fixes
This commit is contained in:
parent
7edefe23c3
commit
6a61b79bbe
425 changed files with 51656 additions and 243 deletions
23
staticfiles/admin/js/popup_response.js
Normal file
23
staticfiles/admin/js/popup_response.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*global opener */
|
||||
|
||||
'use strict';
|
||||
{
|
||||
try {
|
||||
const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
|
||||
|
||||
switch (initData.action) {
|
||||
case 'change':
|
||||
window.parent.dismissChangeRelatedObjectPopup(initData.value, initData.obj, initData.new_value);
|
||||
break;
|
||||
case 'delete':
|
||||
window.parent.dismissDeleteRelatedObjectPopup(initData.value);
|
||||
break;
|
||||
default:
|
||||
window.parent.dismissAddRelatedObjectPopup(initData.value, initData.obj);
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
window.parent.fallbackDismissChangeRelatedObjectPopup(e);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue