summaryrefslogtreecommitdiffstats
path: root/script/custom.js
diff options
context:
space:
mode:
authorSimon Rettberg2014-06-05 20:41:32 +0200
committerSimon Rettberg2014-06-05 20:41:32 +0200
commitda5ae919f868d1da90548d7cbafec55a06d2a62b (patch)
tree9af9d1933f03c518875d672cdc1ac87dd13273ad /script/custom.js
parentAdd functions to add script includes to the beginning or end of the document ... (diff)
downloadslx-admin-da5ae919f868d1da90548d7cbafec55a06d2a62b.tar.gz
slx-admin-da5ae919f868d1da90548d7cbafec55a06d2a62b.tar.xz
slx-admin-da5ae919f868d1da90548d7cbafec55a06d2a62b.zip
Started "System Status" page
Diffstat (limited to 'script/custom.js')
-rw-r--r--script/custom.js37
1 files changed, 7 insertions, 30 deletions
diff --git a/script/custom.js b/script/custom.js
index 12e760af..12fe817e 100644
--- a/script/custom.js
+++ b/script/custom.js
@@ -1,34 +1,11 @@
-/*
function loadContent(elem, source)
{
- $(elem).html('<div class="progress progress-striped active"><div class="progress-bar" style="width:100%"><span class="sr-only">In Progress....</span></div></div>');
- $(elem).load(source);
-}
-
-function selectDir(obj)
-{
- dirname = $(obj).parent().parent().find('td.isdir').text() + '/';
- console.log("CALLED! Dirname: " + dirname);
- $('td.fileEntry').each(function() {
- var text = $(this).text();
- if (text.length < dirname.length) return;
- if (text.substr(0, dirname.length) !== dirname) return;
- $(this).parent().find('.fileBox')[0].checked = obj.checked;
- });
-}
-*/
-
-function updater(url, postdata, callback)
-{
- var updateTimer = setInterval(function () {
- if (typeof $ === 'undefined')
+ var waitForIt = function() {
+ if (typeof $ === 'undefined') {
+ setTimeout(waitForIt, 50);
return;
- $.post(url, postdata, function (data, status) {
- if (!callback(data, status))
- clearInterval(updateTimer);
- }, 'json').fail(function (jqXHR, textStatus, errorThrown) {
- if (!callback(errorThrown, textStatus))
- clearInterval(updateTimer);
- });
- }, 1000);
+ }
+ $(elem).load(source);
+ }
+ waitForIt();
}