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:
parent
d691c05de4
commit
2e7d4b500f
2 changed files with 13 additions and 5 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue