diff --git a/css/osticket.css b/css/osticket.css new file mode 100644 index 0000000000000000000000000000000000000000..7417c890e8fb10ac8e7a0011d59bc53a593c39b8 --- /dev/null +++ b/css/osticket.css @@ -0,0 +1,25 @@ +/* Overlay */ +#overlay { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #000; + z-index: 1000; + -webkit-transform: translate3d(0,0,0); +} + +#loading { + border:1px solid #2a67ac; + padding: 10px 10px 10px 60px; + width: 300px; + height: 100px; + background: rgb( 255, 255, 255) url('../images/FhHRx-Spinner.gif') 10px 50% no-repeat; + position: fixed; + display: none; + z-index: 3000; +} + +#loading h4 { margin: 3px 0 0 0; padding: 0; color: #d80; } diff --git a/images/FhHRx-Spinner.gif b/images/FhHRx-Spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..574b1d4a161707c6c7f0ba9d2bc531bead4a3028 Binary files /dev/null and b/images/FhHRx-Spinner.gif differ diff --git a/include/client/footer.inc.php b/include/client/footer.inc.php index 4b3d902c61a603f43e6a70a39fd44e469b1a7d6e..3398d1b93414fbdc978efb85e6d99d0893c95b18 100644 --- a/include/client/footer.inc.php +++ b/include/client/footer.inc.php @@ -4,5 +4,10 @@ <p>Copyright © <?php echo date('Y'); ?> <a href="http://osticket.com" target="_blank" title="osTicket">osTicket.com</a> - All rights reserved.</p> <a id="poweredBy" href="http://osticket.com" target="_blank">Powered by osTicket</a> </div> +<div id="overlay"></div> +<div id="loading"> + <h4>Please Wait!</h4> + <p>Please wait... it will take a second!</p> +</div> </body> </html> diff --git a/include/client/header.inc.php b/include/client/header.inc.php index 2e9906b0b1ed9f5f5ea16da2f11908746d043d70..d4c90ff1fcec0a0bb4ba179dd675c738cbc5a06e 100644 --- a/include/client/header.inc.php +++ b/include/client/header.inc.php @@ -10,6 +10,7 @@ header("Content-Type: text/html; charset=UTF-8\r\n"); <meta name="description" content="customer support platform"> <meta name="keywords" content="osTicket, Customer support system, support ticket system"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + <link rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/osticket.css" media="screen"> <link rel="stylesheet" href="<?php echo ASSETS_PATH; ?>css/theme.css" media="screen"> <link rel="stylesheet" href="<?php echo ASSETS_PATH; ?>css/print.css" media="print"> <script src="<?php echo ROOT_PATH; ?>js/jquery-1.7.2.min.js"></script> diff --git a/js/osticket.js b/js/osticket.js index 4057b04b84a25e0cc7d2e249e17cac5efaa5c9e5..ceca388f0d15339967933876f29f43688d5854cf 100644 --- a/js/osticket.js +++ b/js/osticket.js @@ -8,18 +8,31 @@ $(document).ready(function(){ $("input:not(.dp):visible:enabled:first").focus(); $('table.list tbody tr:odd').addClass('odd'); - $("form#save :input").change(function() { + //Overlay + $('#overlay').css({ + opacity : 0.3, + top : 0, + left : 0 + }); + + /* loading ... */ + $("#loading").css({ + top : ($(window).height() / 3), + left : ($(window).width() / 2 - 160) + }); + + $("form :input").change(function() { var fObj = $(this).closest('form'); if(!fObj.data('changed')){ fObj.data('changed', true); $('input[type=submit]', fObj).css('color', 'red'); $(window).bind('beforeunload', function(e) { - return 'Are you sure you want to leave? Any changes or info you\'ve entered will be discarded!'; + return "Are you sure you want to leave? Any changes or info you've entered will be discarded!"; }); } }); - $("form#save :input[type=reset]").click(function() { + $("form :input[type=reset]").click(function() { var fObj = $(this).closest('form'); if(fObj.data('changed')){ $('input[type=submit]', fObj).removeAttr('style'); @@ -30,8 +43,9 @@ $(document).ready(function(){ } }); - $('form#save').submit(function() { + $('form').submit(function() { $(window).unbind('beforeunload'); + $('#overlay, #loading').show(); return true; });