summaryrefslogtreecommitdiffstats
path: root/script/custom.js
diff options
context:
space:
mode:
authorSimon Rettberg2014-05-20 19:20:02 +0200
committerSimon Rettberg2014-05-20 19:20:02 +0200
commit4a8725b8dcac3bd0e7afe463968d281e4cf8df6c (patch)
tree8d1374edd2a1e74ed3a99813210ca84e999fb82c /script/custom.js
parentOO style modules (diff)
downloadslx-admin-4a8725b8dcac3bd0e7afe463968d281e4cf8df6c.tar.gz
slx-admin-4a8725b8dcac3bd0e7afe463968d281e4cf8df6c.tar.xz
slx-admin-4a8725b8dcac3bd0e7afe463968d281e4cf8df6c.zip
JS Stuff for Taskmanager interaction
More work on AD wizard
Diffstat (limited to 'script/custom.js')
-rw-r--r--script/custom.js19
1 files changed, 18 insertions, 1 deletions
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('<div class="progress progress-striped active"><div class="progress-bar" style="width:100%"><span class="sr-only">In Progress....</span></div></div>');
@@ -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);
+}