summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates/server-settings.html
diff options
context:
space:
mode:
authorJannik Schönartz2017-03-21 13:52:23 +0100
committerJannik Schönartz2017-03-21 13:52:23 +0100
commit2040275191f2e808d1c721f98342506fc955ba43 (patch)
treec93515242ffe82e31c47f8554967c2a08efaa1ed /modules-available/locationinfo/templates/server-settings.html
parentAdmin-panel: Redesigned config. Added helpboxes. (diff)
downloadslx-admin-2040275191f2e808d1c721f98342506fc955ba43.tar.gz
slx-admin-2040275191f2e808d1c721f98342506fc955ba43.tar.xz
slx-admin-2040275191f2e808d1c721f98342506fc955ba43.zip
Locationinfo: Added Comments to the functions.
Diffstat (limited to 'modules-available/locationinfo/templates/server-settings.html')
-rw-r--r--modules-available/locationinfo/templates/server-settings.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules-available/locationinfo/templates/server-settings.html b/modules-available/locationinfo/templates/server-settings.html
index f885c0c1..641873ef 100644
--- a/modules-available/locationinfo/templates/server-settings.html
+++ b/modules-available/locationinfo/templates/server-settings.html
@@ -82,12 +82,20 @@
loadCredentials();
initalizeBootstrap();
+ /**
+ * Initialize the bootstrap elements.
+ */
function initalizeBootstrap() {
$('#help-name').tooltip();
$('#help-url').tooltip();
$('#help-type').tooltip();
}
+ /**
+ * Loads the dynamic credentials forms.
+ *
+ * @param {bool} useValue If false the form elements will be empty. Default = true.
+ */
function loadCredentials(useValue = true) {
// {{name}} name of auth {{type}} type of auth (string, int etc.) {{value}} value from the db
{{#backendList}}
@@ -145,6 +153,11 @@
}
+ /**
+ * After the servertype switch changed, the new credentials needs to be loaded.
+ *
+ * @param {string} value The new type of the server which credentials needs to be loaded.
+ */
function servertype_changed(value) {
type = value;
$('#credentials-div').fadeOut('fast', function() {