From 2e0697d3f1faa48cf45c1d6c5e5f713f8cf7bc0b Mon Sep 17 00:00:00 2001 From: Squidly271 Date: Sat, 28 Sep 2019 12:17:56 -0400 Subject: [PATCH] Allow outside click to close popups Drives me nuts having to click the "x". Only allows an outside click if when closing the window nothing happens --- plugins/dynamix/include/DefaultPageLayout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/include/DefaultPageLayout.php b/plugins/dynamix/include/DefaultPageLayout.php index 5b93650f2..2b7192233 100644 --- a/plugins/dynamix/include/DefaultPageLayout.php +++ b/plugins/dynamix/include/DefaultPageLayout.php @@ -174,7 +174,7 @@ function chkDelete(form, button) { function openBox(cmd,title,height,width,load,func,id) { // open shadowbox window (run in foreground) var run = cmd.split('?')[0].substr(-4)=='.php' ? cmd : '/logging.htm?cmd='+cmd+'&csrf_token='; - var options = load ? (func ? {modal:true,onClose:function(){setTimeout(func+'('+'"'+(id||'')+'")',0);}} : {modal:true,onClose:function(){location=location;}}) : {modal:true}; + var options = load ? (func ? {modal:true,onClose:function(){setTimeout(func+'('+'"'+(id||'')+'")',0);}} : {modal:true,onClose:function(){location=location;}}) : {modal:false}; Shadowbox.open({content:run, player:'iframe', title:title, height:Math.min(height,screen.availHeight), width:Math.min(width,screen.availWidth), options:options}); } function openWindow(cmd,title,height,width) {