From 6bba226ac96bbd0d64a62f13bf58f5eebe234544 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 4 Aug 2015 12:09:23 -0500 Subject: [PATCH] Fix stutter when rendering pulling up a ticket --- include/client/header.inc.php | 1 + include/staff/footer.inc.php | 1 + js/redactor-plugins.js | 8 -------- scp/js/thread.js | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/client/header.inc.php b/include/client/header.inc.php index 4ec070f17..245edf61a 100644 --- a/include/client/header.inc.php +++ b/include/client/header.inc.php @@ -49,6 +49,7 @@ if ($lang) { <script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/redactor-plugins.js"></script> <script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/redactor-osticket.js"></script> <script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/select2.min.js"></script> + <script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/fabric.min.js"></script> <?php if($ost && ($headers=$ost->getExtraHeaders())) { echo "\n\t".implode("\n\t", $headers)."\n"; diff --git a/include/staff/footer.inc.php b/include/staff/footer.inc.php index e8cf2dbb4..a646f5eea 100644 --- a/include/staff/footer.inc.php +++ b/include/staff/footer.inc.php @@ -53,6 +53,7 @@ if(is_object($thisstaff) && $thisstaff->isStaff()) { ?> <script type="text/javascript" src="./js/jquery.translatable.js"></script> <script type="text/javascript" src="./js/jquery.dropdown.js"></script> <script type="text/javascript" src="./js/bootstrap-tooltip.js"></script> +<script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/fabric.min.js"></script> <link type="text/css" rel="stylesheet" href="./css/tooltip.css"> <script type="text/javascript"> getConfig().resolve(<?php diff --git a/js/redactor-plugins.js b/js/redactor-plugins.js index cfa931f96..ba446ca00 100644 --- a/js/redactor-plugins.js +++ b/js/redactor-plugins.js @@ -908,14 +908,6 @@ RedactorPlugins.imageannotate = function() { init: function() { var redactor = this, self = this.imageannotate; - if (typeof window.fabric === 'undefined' && !loadedFabric) { - $.ajax({ - dataType: 'script', - cache: true, - url: '../js/fabric.min.js' - }); - loadedFabric = true; - } $(document).on('click', '.redactor-box img', function() { var $image = $(this), image_box = $('#redactor-image-box'); diff --git a/scp/js/thread.js b/scp/js/thread.js index c59032316..b4bd2a435 100644 --- a/scp/js/thread.js +++ b/scp/js/thread.js @@ -22,10 +22,10 @@ var thread = { if (!entry) return; var frame = 0; - $('html, body').delay(500).animate({ + $('html, body').animate({ scrollTop: entry.offset().top - 50, }, { - duration: 750, + duration: 400, step: function(now, fx) { // Recalc end target every few frames if (++frame % 6 == 0) -- GitLab