From da5ae919f868d1da90548d7cbafec55a06d2a62b Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Thu, 5 Jun 2014 20:41:32 +0200
Subject: Started "System Status" page
---
script/custom.js | 37 +++++++------------------------------
1 file changed, 7 insertions(+), 30 deletions(-)
(limited to 'script/custom.js')
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('
');
- $(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();
}
--
cgit v1.2.3-55-g7522