From ea7e5a3d15eac8baed1fe1c2c207118cc6350364 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Tue, 21 Mar 2017 03:38:38 +0100 Subject: Admin-panel: Redesigned config. Added helpboxes. --- .../locationinfo/templates/server-settings.html | 83 ++++++++++++++-------- 1 file changed, 55 insertions(+), 28 deletions(-) (limited to 'modules-available/locationinfo/templates/server-settings.html') diff --git a/modules-available/locationinfo/templates/server-settings.html b/modules-available/locationinfo/templates/server-settings.html index b42f4c15..f885c0c1 100644 --- a/modules-available/locationinfo/templates/server-settings.html +++ b/modules-available/locationinfo/templates/server-settings.html @@ -15,9 +15,12 @@
-
+
+
+ +
@@ -26,9 +29,12 @@
-
+
+
+ +
@@ -37,14 +43,15 @@
-
- - {{#backendList}} -
+
+
@@ -71,8 +78,17 @@ if (type == "") { type = $('#input-type-{{id}}').val(); } + loadCredentials(); - function loadCredentials() { + initalizeBootstrap(); + + function initalizeBootstrap() { + $('#help-name').tooltip(); + $('#help-url').tooltip(); + $('#help-type').tooltip(); + } + + function loadCredentials(useValue = true) { // {{name}} name of auth {{type}} type of auth (string, int etc.) {{value}} value from the db {{#backendList}} if (type == "{{typ}}") { @@ -81,33 +97,44 @@ if ("{{type}}" == "string") { $("#credentials-list").append('
\ -
\ -
\ - \ -
'); +
\ +
\ +
\ +
\ + '); } else if ("{{type}}" == "int") { $("#credentials-list").append('
\ -
\ -
\ - \ -
'); +
\ +
\ +
\ +
\ + '); } else if ("{{type}}" == "bool") { $("#credentials-list").append('
\ -
\ -
\ - \ -
'); - $('#bs-{{uid}}').bootstrapSwitch(); +
\ +
\ +
\ +
\ + '); + $('#bs-{{uid}}').bootstrapSwitch({ + size: "small" + }); } else if ("{{type}}" == "array") { $("#credentials-list").append('
\ -
\ -
\ - \ {{#array}}\ \ {{/array}}\ - \ -
'); + \ +
\ + '); + } + + $('#help-{{uid}}').tooltip(); + if (!useValue) { + $('#input-{{uid}}').val(""); } {{/credentials}} {{^credentials}} @@ -122,7 +149,7 @@ type = value; $('#credentials-div').fadeOut('fast', function() { $('#credentials-list').empty(); - loadCredentials(); + loadCredentials(false); }); } -- cgit v1.2.3-55-g7522