2018-10-12 03:11:57 +00:00
|
|
|
/*global opener */
|
2020-10-24 02:58:05 +00:00
|
|
|
'use strict';
|
|
|
|
{
|
|
|
|
const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
|
2018-10-12 03:11:57 +00:00
|
|
|
switch(initData.action) {
|
|
|
|
case 'change':
|
|
|
|
opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value);
|
|
|
|
break;
|
|
|
|
case 'delete':
|
|
|
|
opener.dismissDeleteRelatedObjectPopup(window, initData.value);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj);
|
|
|
|
break;
|
|
|
|
}
|
2020-10-24 02:58:05 +00:00
|
|
|
}
|