diff options
-rw-r--r-- | health-networkstats-html.lsp | 20 | ||||
-rw-r--r-- | interfaces-update-html.lsp | 7 | ||||
-rw-r--r-- | logfiles-tail-html.lsp | 7 |
3 files changed, 30 insertions, 4 deletions
diff --git a/health-networkstats-html.lsp b/health-networkstats-html.lsp index 78401d9..c068503 100644 --- a/health-networkstats-html.lsp +++ b/health-networkstats-html.lsp @@ -37,8 +37,24 @@ } </style> <!--[if IE]><script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/excanvas.js"></script><![endif]--> -<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> -<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.flot.js"></script> +<script type="text/javascript"> + 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 $.plot == 'undefined') { + document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.flot.js"><\/script>'); + } +</script> + +<script type="text/javascript"> + if (typeof $.plot.formatDate == 'undefined') { + document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.flot.time.js"><\/script>'); + } +</script> + <script type="text/javascript"> var interval = 1000; var duration = 60000; diff --git a/interfaces-update-html.lsp b/interfaces-update-html.lsp index 579b9b2..23ef31d 100644 --- a/interfaces-update-html.lsp +++ b/interfaces-update-html.lsp @@ -11,7 +11,12 @@ for name,value in pairs(iface.optional) do end %> -<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> +<script type="text/javascript"> + 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"> var methodoptions = <%= json.encode(iface.method_options) %>; diff --git a/logfiles-tail-html.lsp b/logfiles-tail-html.lsp index c88b7a2..40a81a7 100644 --- a/logfiles-tail-html.lsp +++ b/logfiles-tail-html.lsp @@ -2,7 +2,12 @@ <% require("htmlviewfunctions") %> <% html = require("acf.html") %> -<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> +<script type="text/javascript"> + 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"> var currentoffset = -1024 var ID |