<div dir="ltr"><div><div><div>I am trying to get RT::Extensions::Hotkeys working and I am facing several<br><br>ReferenceError: jQuery is not defined<br><br></div>Errors in my Javascript console.<br><br></div>I suspect the errors come from the fact that jQuery is being loaded in the squished JS file and the file is loaded after the Callback that has a first jquery call in that plugin, like this:<br><br><pre id="line1"><span class=""><!-- Site CSS from theme editor --></span><span>
<span id="line33"></span></span><span><<span class="">style</span> <span class="">type</span>="<a class="">text/css</a>" <span class="">media</span>="<a class="">all</a>" <span class="">id</span>="<a class="">sitecss</a>"></span><span>
<span id="line34"></span></span><span></<span class="">style</span>></span><span>
<span id="line35"></span></span><span><<span class="">LINK</span> <span class="">REL</span>="<a class="">StyleSheet</a>" <span class="">HREF</span>="<a href="view-source:https://tracker.poli.io/Reports/Activity/style.css" class="">/Reports/Activity/style.css</a>" <span class="">TYPE</span>="<a class="">text/css</a>" <span class="">MEDIA</span>="<a class="">screen</a>"></span><span>
<span id="line36"></span></span><span><<span class="">script</span> <span class="">type</span>="<a class="">text/javascript</a>"></span><span>
<span id="line37"></span>jQuery( function() {
<span id="line38"></span> hotkeys.help = function () {
<span id="line39"></span> var string = 'RT::Extension::Hotkeys version 0.01\n\n' +
<span id="line40"></span> '===== /Search/ =====\n\na -> advanced\nc -> chart\ne -> edit\nf -> rss\ni -> ical\nr -> bulk\ns -> advanced\nu -> bulk\nx -> excel\n\n===== global =====\n\ng ->\n a -> approvals\n c ->\n c -> admin\n g -> admin global\n d -> dashboards\n h -> home\n l -> logout\n n -> create ticket in default queue\n p ->\n h -> customize hotkeys\n p -> customize options\n r -> reload\n s -> search builder\n t -> goto ticket\n u ->\n d -> my day\n m -> my reminders\n o -> offline\n u -> tools\nshift+/ -> help\nv -> version\n\n===== /Ticket/ =====\n\na ->\n c -> comment\n e -> forward\n f -> forward\n j -> reject\n l -> resolve\n o -> open\n r -> reply\n s -> stall\n shift+c -> comment based on the last message\n shift+f -> forward the last message\n shift+r -> reply based on the last message\n t -> open\nb -> toggle bookmark\nd -> display\nh -> history\nm ->\n a -> modify all\n b -> modify basics\n d -> modify dates\n l -> modify links\n p -> modify people\nr -> reminders\n\n';
<span id="line41"></span> hotkeys.show(string);
<span id="line42"></span> };
<span id="line43"></span> hotkeys.version = function () {
<span id="line44"></span> var string = 'RT::Extension::Hotkeys version 0.01\n';
<span id="line45"></span> hotkeys.show(string);
<span id="line46"></span> };
<span id="line47"></span> hotkeys.bind( {'v': function() { hotkeys.version() },
<span id="line48"></span>'g': {'u': {'u': function() { hotkeys.openLink("/Tools") },
<span id="line49"></span>'d': function() { hotkeys.openLink("/Tools/MyDay.html") },
<span id="line50"></span>'m': function() { hotkeys.openLink("/Tools/MyReminders") },
<span id="line51"></span>'o': function() { hotkeys.openLink("/Tools/Offline.html") }},
<span id="line52"></span>'c': {'c': function() { hotkeys.openLink("/Admin/") },
<span id="line53"></span>'g': function() { hotkeys.openLink("/Admin/Global.html") }},
<span id="line54"></span>'t': function() { hotkeys.ticket() },
<span id="line55"></span>'p': {'h': function() { hotkeys.openLink("/Prefs/Hotkeys.html") },
<span id="line56"></span>'p': function() { hotkeys.openLink("/Prefs/Other.html") }},
<span id="line57"></span>'n': function() { hotkeys.submit('#CreateTicketInQueue') },
<span id="line58"></span>'a': function() { hotkeys.openLink("/Approvals") },
<span id="line59"></span>'l': function() { hotkeys.openLink("/NoAuth/Logout.html") },
<span id="line60"></span>'h': function() { hotkeys.openLink("/") },
<span id="line61"></span>'d': function() { hotkeys.openLink("/Dashboards/index.html") },
<span id="line62"></span>'r': function() { location.reload() },
<span id="line63"></span>'s': function() { hotkeys.openLink('/Search/Build.html') }},
<span id="line64"></span>'shift+/': function() { hotkeys.help() }} );
<span id="line65"></span>});
<span id="line66"></span></span><span></<span class="">script</span>></span><span>
<span id="line67"></span>
<span id="line68"></span>
<span id="line69"></span>
<span id="line70"></span></span><span><<span class="">script</span> <span class="">type</span>="<a class="">text/javascript</a>" <span class="">src</span>="<a href="view-source:https://tracker.poli.io/NoAuth/js/squished-df31249edb647af0d681ec8ca6d9fd40.js" class="">/NoAuth/js/squished-df31249edb647af0d681ec8ca6d9fd40.js</a>"></span><span></span><span></<span class="">script</span>></span><span>
<span id="line71"></span>
<span id="line72"></span></span><span><<span class="">script</span> <span class="">type</span>="<a class="">text/javascript</a>"></span><span></span><span><!</span><span>--
<span id="line73"></span>jQuery( loadTitleBoxStates );
<span id="line74"></span>--></span><span></<span class="">script</span>></span><span><br><br><br></span></pre>I tried to find some other Callback that would be loaded after the squish, but even Javascript->Data gets loaded before it.<br><br><br></div><div>Is that something particular to my installation? If not, how can I make jquery load before the Header Callback? <br><br></div><div>Thanks!<br><br></div></div>