diff options
author | Simon Rettberg | 2017-04-13 18:08:31 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-13 18:08:31 +0200 |
commit | faf18b816b6fecce5ab5023a2d87fe1f2d44f132 (patch) | |
tree | 7f48d583c9efe5b4d7e528654e69f1123e88dd70 /modules-available/locationinfo/templates/config.html | |
parent | [locations] Return recursive list of children in getLocationsAssoc() (diff) | |
download | slx-admin-faf18b816b6fecce5ab5023a2d87fe1f2d44f132.tar.gz slx-admin-faf18b816b6fecce5ab5023a2d87fe1f2d44f132.tar.xz slx-admin-faf18b816b6fecce5ab5023a2d87fe1f2d44f132.zip |
[locationinfo] Refactor the main view
- Simplify javascript
- Remove client count and locationid column from view, not useful for
the average user
- Remove/simplify queries, use Location helper more to deal with locations
Diffstat (limited to 'modules-available/locationinfo/templates/config.html')
-rw-r--r-- | modules-available/locationinfo/templates/config.html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules-available/locationinfo/templates/config.html b/modules-available/locationinfo/templates/config.html index 0c970f2a..e97b72fc 100644 --- a/modules-available/locationinfo/templates/config.html +++ b/modules-available/locationinfo/templates/config.html @@ -18,7 +18,7 @@ <select class="form-control" name="serverid"> <option value="0">{{lang_noServer}}</option> {{#serverlist}} - <option value="{{sid}}" {{selected}}>{{servername}}</option> + <option value="{{serverid}}" {{selected}}>{{servername}}</option> {{/serverlist}} </select> </div> @@ -319,17 +319,21 @@ </form> <script type="text/javascript"><!-- - - var customURL = window.location.protocol + "//" + window.location.hostname + "/slx-admin/modules/locationinfo/frontend/doorsign.html?id={{id}}"; - $('#custom-url').val(customURL); + // Get list of form elements which affect the generated custom URL var $inputs = $('.modify-inputs input, .modify-inputs select'); + // Base for displaying the custom URL + var customURL = window.location.protocol + "//" + window.location.hostname + "/slx-admin/modules/locationinfo/frontend/doorsign.html?id={{id}}"; + // Initialize fancy tooltips $('a.helptext').tooltip(); + // Add listener to range sliders so their label can be updated $('input[type="range"]').change(function () { $(this).siblings().find('.range-display').text($(this).val()); }); + // Set state of input controls that aren't statically initialized server side loadValues(); + // Update the custom URL buildCustomUrl(); - + // Add listener to all the elements affecting custom URL $inputs.change(function () { $this = $(this); if ($this.attr('type') === 'hidden') |