Skip to content
Snippets Groups Projects
Commit 36d95b3c authored by Jared Hancock's avatar Jared Hancock
Browse files

pjax: No pjax for some links

parent 72280ec5
Branches
Tags
No related merge requests found
......@@ -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>
......
......@@ -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';
?>
......
......@@ -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'));
......
......@@ -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 {
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment