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:
parent
d691c05de4
commit
2e7d4b500f
2 changed files with 13 additions and 5 deletions
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
$(function() {
|
||||||
turnitoff();
|
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>
|
||||||
|
$(function() {
|
||||||
turniton();
|
turniton();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
%endif
|
%endif
|
||||||
%else:
|
%else:
|
||||||
<script>
|
<script>
|
||||||
|
$(function() {
|
||||||
turnitoff();
|
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,8 +283,10 @@
|
||||||
};
|
};
|
||||||
function turnitoff() {
|
function turnitoff() {
|
||||||
CheckEnabled = false;
|
CheckEnabled = false;
|
||||||
|
if (typeof ImportTimer !== 'undefined') {
|
||||||
clearInterval(ImportTimer);
|
clearInterval(ImportTimer);
|
||||||
};
|
};
|
||||||
|
};
|
||||||
function turniton() {
|
function turniton() {
|
||||||
if (CheckEnabled == false) {
|
if (CheckEnabled == false) {
|
||||||
CheckEnabled = true;
|
CheckEnabled = true;
|
||||||
|
|
Loading…
Reference in a new issue