From 43bc68c732338be2e82c5c516f20704e12d82a7c Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Wed, 4 Feb 2015 17:58:01 +0100
Subject: Finish config module editing
---
templates/sysconfig/_page.html | 34 ++++++++++++++++++++++++++----
templates/sysconfig/custom-fileselect.html | 3 ++-
templates/sysconfig/custom-upload.html | 1 +
3 files changed, 33 insertions(+), 5 deletions(-)
(limited to 'templates/sysconfig')
diff --git a/templates/sysconfig/_page.html b/templates/sysconfig/_page.html
index 93169e6a..2f46f2cf 100644
--- a/templates/sysconfig/_page.html
+++ b/templates/sysconfig/_page.html
@@ -30,10 +30,10 @@
|
@@ -88,10 +88,10 @@
@@ -187,4 +187,30 @@
$(e).addClass("slx-bold");
}
}
+
+ var statusChecks = 0;
+ function checkBuildStatus() {
+ var mods = [];
+ var confs = [];
+ $(".refmod.btn-primary").each(function (index) {
+ mods.push($(this).val());
+ });
+ $(".refconf.btn-primary").each(function (index) {
+ confs.push($(this).val());
+ });
+ if (mods.length === 0 && confs.length === 0) return;
+ if (++statusChecks < 10) setTimeout(checkBuildStatus, 200 + 50 * statusChecks);
+ console.log("POSTING");
+ $.post('?do=SysConfig', { mods: mods.join(), confs: confs.join(), token: TOKEN, action: 'status' }, function (data) {
+ if (typeof data === 'undefined') return;
+ if (typeof data.mods === 'object') updateButtonColor($(".refmod.btn-primary"), data.mods);
+ if (typeof data.confs === 'object') updateButtonColor($(".refconf.btn-primary"), data.confs);
+ }, 'json');
+ }
+ function updateButtonColor(list,ids) {
+ list.each(function() {
+ if (ids.indexOf($(this).val()) >= 0) $(this).removeClass('btn-primary').addClass('btn-default');
+ });
+ }
+ setTimeout(checkBuildStatus, 300);
// -->
\ No newline at end of file
diff --git a/templates/sysconfig/custom-fileselect.html b/templates/sysconfig/custom-fileselect.html
index 0c2d88e9..000c8d10 100644
--- a/templates/sysconfig/custom-fileselect.html
+++ b/templates/sysconfig/custom-fileselect.html
@@ -1,9 +1,10 @@
|