Allow popups to set just a message without refreshing before closing

This commit is contained in:
Nathan Gray 2014-01-15 14:40:42 +00:00
parent 1b72d90ec5
commit 6792b9831c

View File

@ -131,6 +131,15 @@
{ {
alert(window_close); alert(window_close);
} }
// If there's a message & opener, set it
if(window.opener && egw_script.getAttribute('data-message'))
{
var data = {};
if ((data = egw_script.getAttribute('data-message')) && (data = JSON.parse(data)))
{
window.opener.egw_message.apply(window.opener, data);
}
}
window.close(); window.close();
} }