2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-12-12 19:42:18 +00:00
troggle/media/admin/js/popup_response.js

17 lines
551 B
JavaScript
Raw Normal View History

/*global opener */
'use strict';
{
const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
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;
}
}