NEW FEATURE CREATED
I added a property displaytabclosebutton to pfcGlobalConfig.class .
This way you will not see the dialog box to confirm leaving room.
This is not official code. pfcGlobalConfig.class code:
/**
* <p>New Parameter to abort the confirmation before closing tab
* (Default value: false)</p>
*/
var $displaytabconfirmclose = false;
* * * * * * * *
index.php
$params["displaytabconfirmclose"] = false; // New Parameter to abort the confirmation before closing tab
* * * * * * * *
public/js/pfcgui.js (L 253 the IF block changed):
if (pfc_displaytabclosebutton || type == 'pv')
{
var a2 = document.createElement('a');
a2.pfc_tabid = tabid;
a2.pfc_tabname = name;
a2.pfc_tabtype = type;
a2.onclick = function(){
var msg = (type == 'pv' ? 'Are you sure you want to close this tab ?' :
'Do you really want to leave this room ?');
if (pfc_displaytabconfirmclose) var res = confirm(pfc.res.getLabel(msg));
else var res = true;
if (res == true)
pfc.sendRequest('/leave',this.pfc_tabid);
return false;
}
* * * * * *
themes/default/chat.js.tpl.php (L 57 added):
var pfc_displaytabconfirmclose = <?php echo $json->encode($displaytabconfirmclose); ?>;