1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-22 15:52:47 +00:00

fix turnitoff being called before its defined

This commit is contained in:
AJ Slater 2020-02-21 22:25:15 -08:00 committed by evilhero
parent d691c05de4
commit 2e7d4b500f
No known key found for this signature in database
GPG key ID: 3E12C51E39D91142
2 changed files with 13 additions and 5 deletions

View file

@ -26,6 +26,7 @@
${next.headIncludes()} ${next.headIncludes()}
<script src="js/libs/modernizr-2.8.3.min.js"></script> <script src="js/libs/modernizr-2.8.3.min.js"></script>
<script src="js/libs/jquery-1.7.2.min.js"></script>
</head> </head>
<body> <body>
<% <%
@ -109,7 +110,6 @@
<a href="#main" id="toTop"><span>Back to top</span></a> <a href="#main" id="toTop"><span>Back to top</span></a>
</div> </div>
<script src="js/libs/jquery-1.7.2.min.js"></script>
<script src="js/libs/jquery-ui.min.js"></script> <script src="js/libs/jquery-ui.min.js"></script>
<script src="js/common.js"></script> <script src="js/common.js"></script>

View file

@ -32,17 +32,23 @@
%if mylar.IMPORT_STATUS == 'Import completed.': %if mylar.IMPORT_STATUS == 'Import completed.':
<input type="text" name="importstatus" id="importstatus" style="text-align:center; font-size:11px;" size="60" DISABLED /></br> <input type="text" name="importstatus" id="importstatus" style="text-align:center; font-size:11px;" size="60" DISABLED /></br>
<script> <script>
turnitoff(); $(function() {
turnitoff();
}):
</script> </script>
%else: %else:
<input type="text" name="importstatus" id="importstatus" style="text-align:center; font-size:11px;" size="60" DISABLED /></br> <input type="text" name="importstatus" id="importstatus" style="text-align:center; font-size:11px;" size="60" DISABLED /></br>
<script> <script>
turniton(); $(function() {
turniton();
});
</script> </script>
%endif %endif
%else: %else:
<script> <script>
turnitoff(); $(function() {
turnitoff();
});
</script> </script>
<input type="text" name="importstatus" id="importstatus" style="text-align:center; font-size:11px;" size="60" value="Import is currently not running" DISABLED /></br> <input type="text" name="importstatus" id="importstatus" style="text-align:center; font-size:11px;" size="60" value="Import is currently not running" DISABLED /></br>
%endif %endif
@ -277,7 +283,9 @@
}; };
function turnitoff() { function turnitoff() {
CheckEnabled = false; CheckEnabled = false;
clearInterval(ImportTimer); if (typeof ImportTimer !== 'undefined') {
clearInterval(ImportTimer);
};
}; };
function turniton() { function turniton() {
if (CheckEnabled == false) { if (CheckEnabled == false) {