From 4a8725b8dcac3bd0e7afe463968d281e4cf8df6c Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Tue, 20 May 2014 19:20:02 +0200
Subject: JS Stuff for Taskmanager interaction More work on AD wizard
---
script/custom.js | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
(limited to 'script/custom.js')
diff --git a/script/custom.js b/script/custom.js
index 3269749e..12e760af 100644
--- a/script/custom.js
+++ b/script/custom.js
@@ -1,3 +1,4 @@
+/*
function loadContent(elem, source)
{
$(elem).html('
');
@@ -14,4 +15,20 @@ function selectDir(obj)
if (text.substr(0, dirname.length) !== dirname) return;
$(this).parent().find('.fileBox')[0].checked = obj.checked;
});
-}
\ No newline at end of file
+}
+*/
+
+function updater(url, postdata, callback)
+{
+ var updateTimer = setInterval(function () {
+ if (typeof $ === 'undefined')
+ 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);
+}
--
cgit v1.2.3-55-g7522