1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-21 23:32:23 +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()}
<script src="js/libs/modernizr-2.8.3.min.js"></script>
<script src="js/libs/jquery-1.7.2.min.js"></script>
</head>
<body>
<%
@ -109,7 +110,6 @@
<a href="#main" id="toTop"><span>Back to top</span></a>
</div>
<script src="js/libs/jquery-1.7.2.min.js"></script>
<script src="js/libs/jquery-ui.min.js"></script>
<script src="js/common.js"></script>

View file

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