diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php index 4c518ba5d51b8f6ca3be8de18ce97b4b80a002d0..fff7e85dad6f77e8a1c4bd593f1ea7ba7af670e4 100644 --- a/include/staff/tpl.inc.php +++ b/include/staff/tpl.inc.php @@ -100,7 +100,7 @@ $tpl=$msgtemplates[$selected]; <div style="padding-bottom:3px;" class="faded"><strong>Email Subject and Body:</strong></div> <div id="toolbar"></div> -<div style="padding-top:5px;"> +<div id="save" style="padding-top:5px;"> <input type="text" name="subject" size="65" value="<?php echo $info['subject']; ?>" style="font-size:14pt;width:100%;box-sizing:border-box"> <div style="margin-bottom:0.5em;margin-top:0.5em"> diff --git a/scp/js/scp.js b/scp/js/scp.js index 6cc4dd1c18cb02ef72fe5fed24ecb80a2108981b..d0833da5432e736a7c8b07289ed78cfa7f8d5708 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -639,12 +639,16 @@ $(document).on('pjax:click', function(options) { $.autoLock.releaseLock(); // Stop all animations $(document).stop(false, true); +}); + +$(document).on('pjax:start', function() { // Cancel save-changes warning banner $(document).unbind('pjax:beforeSend.changed'); $(window).unbind('beforeunload'); }); $(document).on('pjax:send', function(event) { + if ($('#loadingbar').length !== 0) { $('#loadingbar').remove(); } diff --git a/scp/js/ticket.js b/scp/js/ticket.js index 7e697f24a9964c2c09e8361b626cd0b728fec739..e6f3f06e8a30874122f91d9411bb3051ba402037 100644 --- a/scp/js/ticket.js +++ b/scp/js/ticket.js @@ -51,6 +51,9 @@ var autoLock = { } if(!autoLock.lasteventTime) { //I hate nav away warnings..but + $(document).on('pjax:beforeSend.changed', function(e) { + return confirm("Any changes or info you've entered will be discarded!"); + }); $(window).bind('beforeunload', function(e) { return "Any changes or info you've entered will be discarded!"; });