From 36d95b3c00313377555e2e2ae5f235f0903d61c8 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 21 Apr 2014 11:45:45 -0500 Subject: [PATCH] pjax: No pjax for some links --- include/staff/footer.inc.php | 5 +++-- include/staff/org-view.inc.php | 2 +- js/redactor-osticket.js | 3 ++- scp/css/scp.css | 1 + scp/js/scp.js | 10 ---------- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/include/staff/footer.inc.php b/include/staff/footer.inc.php index d112e157a..3887138ad 100644 --- a/include/staff/footer.inc.php +++ b/include/staff/footer.inc.php @@ -24,8 +24,9 @@ if(is_object($thisstaff) && $thisstaff->isStaff()) { ?> <script type="text/javascript"> if ($.support.pjax) { $(document).on('click', 'a', function(event) { - if (!$(this).hasClass('no-pjax')) - $.pjax.click(event, {container: $('#content'), timeout: 2000}) + if (!$(this).hasClass('no-pjax') + && !$(this).closest('.no-pjax').length) + $.pjax.click(event, {container: $('#content'), timeout: 2000}); }) } </script> diff --git a/include/staff/org-view.inc.php b/include/staff/org-view.inc.php index 7951460c2..7f6403765 100644 --- a/include/staff/org-view.inc.php +++ b/include/staff/org-view.inc.php @@ -59,7 +59,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path') include STAFFINC_DIR . 'templates/users.tmpl.php'; ?> </div> -<div class="tab_content" id="tickets" style="display:none;"> +<div class="tab_content no-pjax" id="tickets" style="display:none;"> <?php include STAFFINC_DIR . 'templates/tickets.tmpl.php'; ?> diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 80f0b0586..0d4c202db 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -224,7 +224,8 @@ $(function() { 'syncBeforeCallback': captureImageSizes, 'linebreaks': true, 'tabFocus': false, - 'toolbarFixedBox': true + 'toolbarFixedBox': true, + 'focusCallback': function() { this.$box.addClass('no-pjax'); } }; if (el.data('redactor')) return; var reset = $('input[type=reset]', el.closest('form')); diff --git a/scp/css/scp.css b/scp/css/scp.css index 2dec22ec0..9e2c2201f 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -1502,6 +1502,7 @@ ul.progress li.no small {color:red;} background: #000; z-index: 101; -webkit-transform: translate3d(0,0,0); + opacity: 0.5; } #loading, #upgrading { diff --git a/scp/js/scp.js b/scp/js/scp.js index 77b2b8688..b93151a2f 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -342,13 +342,6 @@ var scp_prep = function() { property: "username" }); - //Overlay - $('#overlay').css({ - opacity : 0.5, - top : 0, - left : 0 - }); - //Dialog $('.dialog').each(function() { var w = $(window), $this=$(this); @@ -639,9 +632,6 @@ $(document).on('pjax:start', function() { if (event instanceof PopStateEvent) return; - //if ($(event.target).closest('redactor_editor').length()) - // return; - clearInterval(window.ticket_refresh); // Clear all timeouts var id = window.setTimeout(function() {}, 0); -- GitLab