Skip to content

Commit

Permalink
Add js to new options for app module mviewer#157
Browse files Browse the repository at this point in the history
  • Loading branch information
Agath21 authored and Gaetanbrl committed Jun 21, 2023
1 parent 857f2f9 commit 8aaf0c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ <h1><i class="ri-equalizer-line"></i> <span i18n="tabs.app.title">Application</s
<div class="list-flex">
<span i18n="tabs.app.opt_studio">Ouvrir la carte dans le studio</span>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="checkboxes" id="opt-geoloc">
<label class="custom-control-label" for="opt-geoloc"></label>
<input type="checkbox" class="custom-control-input" name="checkboxes" id="opt-studio">
<label class="custom-control-label" for="opt-studio"></label>
</div>
</div>
</li>
Expand Down Expand Up @@ -434,7 +434,7 @@ <h2 class="accordion-header" id="accordionHomePage">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="opt-titlehelp" class="form-label"><span i18n="tabs.app.help_title">Titre de la fenêtre d'aide au survol</span></label>
<label for="opt-titlehelp" class="form-label"><span i18n="tabs.app.help_title">Titre de la fenêtre d'aide / accueil</span></label>
<input class="form-control" id="opt-titlehelp" placeholder="Accueil">
</div>
</div>
Expand Down
14 changes: 11 additions & 3 deletions js/mviewerstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ var map2 = new ol.Map({
var config;

var newConfiguration = function () {
["opt-title", "opt-logo", "opt-help", "theme-edit-icon", "theme-edit-title"].forEach(function (param, id) {
["opt-title", "opt-logo", "opt-favicon", "opt-help", "opt-titlehelp", "opt-home", "theme-edit-icon", "theme-edit-title"].forEach(function (param, id) {
$("#"+param).val("");
});
["opt-exportpng", "opt-measuretools", "theme-edit-collapsed", "opt-mini", "opt-showhelp", "opt-coordinates",
["opt-exportpng","opt-zoom","opt-geoloc","opt-mouseposition","opt-studio","opt-measuretools","opt-initialextent","theme-edit-collapsed", "opt-mini", "opt-showhelp", "opt-coordinates",
"opt-togglealllayersfromtheme", "SwitchAdressSearch","SwitchAdvanced"].forEach(function (param, id) {
$("#"+param).prop('checked', false);
});
Expand Down Expand Up @@ -536,12 +536,20 @@ var saveApplicationParameters = function (option) {
var application = ['<application',
'title="'+$("#opt-title").val()+'"',
'logo="'+$("#opt-logo").val()+'"',
'favicon="'+$("#opt-favicon").val()+'"',
'help="'+$("#opt-help").val()+'"',
'titlehelp="'+$("#opt-titlehelp").val()+'"',
'home="'+$("#opt-home").val()+'"',
'style="'+$("#opt-style").val()+'"',
'exportpng="'+($('#opt-exportpng').prop('checked')=== true)+'"',
'zoomtools="'+($('#opt-zoom').prop('checked')=== true)+'"',
'initialextenttool="'+($('#opt-initialextent').prop('checked')=== true)+'"',
'exportpng="'+($('#opt-exportpng').prop('checked')=== true)+'"',
'showhelp="'+($('#opt-showhelp').prop('checked')=== true)+'"',
'coordinates="'+($('#opt-coordinates').prop('checked')=== true)+'"',
'measuretools="'+($('#opt-measuretools').prop('checked')=== true)+'"',
'mouseposition="'+($('#opt-mouseposition').prop('checked')=== true)+'"',
'geoloc="'+($('#opt-geoloc').prop('checked')=== true)+'"',
'studio="'+($('#opt-studio').prop('checked')=== true)+'"',
'togglealllayersfromtheme="'+($('#opt-togglealllayersfromtheme').prop('checked')=== true)+'"'];

config.title = $("#opt-title").val();
Expand Down
2 changes: 1 addition & 1 deletion mviewerstudio.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"tabs.app.bg.startup_bg": "Fond de plan au démarrage",
"tabs.app.home_title": "Page d'accueil",
"tabs.app.home_text": "Paramétrer la page d'accueil / documentation",
"tabs.app.help_title": "Titre de la fenêtre d'aide au survol",
"tabs.app.help_title": "Titre de la fenêtre d'aide / accueil",
"tabs.app.help_icon": "Icône du bouton",
"tabs.app.help_link": "Lien vers la page d'accueil",
"tabs.app.opt_help": "Afficher la page d'accueil au démarrage",
Expand Down

0 comments on commit 8aaf0c5

Please sign in to comment.