Commit 8721aec3 authored by Ted Trask's avatar Ted Trask
Browse files

Only load js libraries if not already loaded

parent c759b4ae
...@@ -2,8 +2,18 @@ ...@@ -2,8 +2,18 @@
<% require("htmlviewfunctions") %> <% require("htmlviewfunctions") %>
<% html = require("acf.html") %> <% html = require("acf.html") %>
<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> <script type="text/javascript">
<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"></script> if (typeof jQuery == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
}
</script>
<script type="text/javascript">
if (typeof $.tablesorter == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
}
</script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
<% if data.value.groupby.value == "clientip" then %> <% if data.value.groupby.value == "clientip" then %>
......
...@@ -28,8 +28,18 @@ function string_highlight(txtvalue, searchval, fcolour, bcolour) ...@@ -28,8 +28,18 @@ function string_highlight(txtvalue, searchval, fcolour, bcolour)
end end
%> %>
<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> <script type="text/javascript">
<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"></script> if (typeof jQuery == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
}
</script>
<script type="text/javascript">
if (typeof $.tablesorter == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
}
</script>
<script type="text/javascript"> <script type="text/javascript">
function clickhead(e) { function clickhead(e) {
var selectdata = ""; var selectdata = "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment