diff options
Diffstat (limited to 'templates/sysconfig')
-rw-r--r-- | templates/sysconfig/_page.html | 34 | ||||
-rw-r--r-- | templates/sysconfig/custom-fileselect.html | 3 | ||||
-rw-r--r-- | templates/sysconfig/custom-upload.html | 1 |
3 files changed, 33 insertions, 5 deletions
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 @@ <td class="slx-nowrap"> <button {{#needrebuild}} - class="btn btn-primary btn-xs" + class="refconf btn btn-primary btn-xs" {{/needrebuild}} {{^needrebuild}} - class="btn btn-default btn-xs" + class="refconf btn btn-default btn-xs" {{/needrebuild}} name="rebuild" value="{{configid}}" title="{{lang_rebuild}}"><span class="glyphicon glyphicon-refresh"></span></button> </td> @@ -88,10 +88,10 @@ <td class="slx-nowrap"> <button {{#needrebuild}} - class="btn btn-primary btn-xs" + class="refmod btn btn-primary btn-xs" {{/needrebuild}} {{^needrebuild}} - class="btn btn-default btn-xs" + class="refmod btn btn-default btn-xs" {{/needrebuild}} name="rebuild" value="{{moduleid}}" title="{{lang_rebuild}}"><span class="glyphicon glyphicon-refresh"></span></button> <a class="btn btn-success btn-xs" href="?do=SysConfig&action=addmodule&step={{moduletype}}_Start&edit={{moduleid}}" title="{{lang_edit}}"><span class="glyphicon glyphicon-edit"></span></a> @@ -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); // --></script>
\ 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 @@ <form role="form" method="post" action="?do=SysConfig&action=addmodule&step={{step}}"> <input type="hidden" name="modid" value="{{modid}}"> <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="edit" value="{{edit}}"> <div class="input-group"> <span class="input-group-addon">{{lang_moduleName}}</span> - <input type="text" name="title" class="form-control" placeholder="Mein Konfigurationsmodul" autofocus="autofocus"> + <input type="text" name="title" value="{{title}}" class="form-control" placeholder="Mein Konfigurationsmodul" autofocus="autofocus"> </div> <div class="pull-right"> <button type="submit" class="btn btn-primary">{{lang_next}} »</button> diff --git a/templates/sysconfig/custom-upload.html b/templates/sysconfig/custom-upload.html index 9ab71eaa..02f813f6 100644 --- a/templates/sysconfig/custom-upload.html +++ b/templates/sysconfig/custom-upload.html @@ -4,6 +4,7 @@ <form role="form" enctype="multipart/form-data" method="post" action="?do=SysConfig&action=addmodule&step={{step}}"> <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="edit" value="{{edit}}"> <div class="input-group"> <span class="input-group-addon">{{lang_file}}</span> <input class="form-control" type="file" name="modulefile"> |