Skip to content

Commit

Permalink
var
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson committed Feb 28, 2024
1 parent 941cb6b commit 9a7e865
Show file tree
Hide file tree
Showing 16 changed files with 132 additions and 127 deletions.
1 change: 1 addition & 0 deletions admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Wählen Sie Land aus",
"Serbia": "Serbien",
"SetPosition": "2. Definieren Sie Ihre Position",
"SetPosition1": "1. Definieren Sie Ihre Position",
"Slovakia": "Slowakei",
"Slovenia": "Slowenien",
"Spain": "Spanien",
Expand Down
5 changes: 3 additions & 2 deletions admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Greece": "Greece",
"Hungary": "Hungary",
"Iceland": "Iceland",
"InstructionGeoCode": "3. Load geocode for your position",
"InstructionGeoCode": "2. Load geocode for your position",
"Ireland": "Ireland",
"Israel": "Israel",
"Italy": "Italy",
Expand All @@ -45,7 +45,8 @@
"Romania": "Romania",
"SelectCountry": "1. Select country",
"Serbia": "Serbia",
"SetPosition": "2. Define your position",
"SetPosition": "",
"SetPosition1": "1. Define your position",
"Slovakia": "Slovakia",
"Slovenia": "Slovenia",
"Spain": "Spain",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Seleccione País",
"Serbia": "Serbia",
"SetPosition": "2. Define tu posición",
"SetPosition1": "1. Define tu posición",
"Slovakia": "Eslovaquia",
"Slovenia": "Eslovenia",
"Spain": "España",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Sélectionnez un pays",
"Serbia": "Serbie",
"SetPosition": "2. Définissez votre position",
"SetPosition1": "1. Définissez votre position",
"Slovakia": "Slovaquie",
"Slovenia": "Slovénie",
"Spain": "Espagne",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Seleziona Paese",
"Serbia": "Serbia",
"SetPosition": "2. Definisci la tua posizione",
"SetPosition1": "1. Definisci la tua posizione",
"Slovakia": "Slovacchia",
"Slovenia": "Slovenia",
"Spain": "Spagna",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Selecteer Land",
"Serbia": "Servië",
"SetPosition": "2. Bepaal uw standpunt",
"SetPosition1": "1. Bepaal uw standpunt",
"Slovakia": "Slowakije",
"Slovenia": "Slovenië",
"Spain": "Spanje",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Wybierz Kraj",
"Serbia": "Serbia",
"SetPosition": "2. Określ swoje stanowisko",
"SetPosition1": "1. Określ swoje stanowisko",
"Slovakia": "Słowacja",
"Slovenia": "Słowenia",
"Spain": "Hiszpania",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Selecione o país",
"Serbia": "Sérvia",
"SetPosition": "2. Defina sua posição",
"SetPosition1": "1. Defina sua posição",
"Slovakia": "Eslováquia",
"Slovenia": "Eslovênia",
"Spain": "Espanha",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Выберите страну",
"Serbia": "Сербия",
"SetPosition": "2. Определите свою позицию",
"SetPosition1": "1. Определите свою позицию",
"Slovakia": "Словакия",
"Slovenia": "Словения",
"Spain": "Испания",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/uk/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. Виберіть країну",
"Serbia": "Сербія",
"SetPosition": "2. Визначте свою позицію",
"SetPosition1": "1. Визначте свою позицію",
"Slovakia": "Словаччина",
"Slovenia": "Словенія",
"Spain": "Іспанія",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SelectCountry": "1. 选择国家",
"Serbia": "塞尔维亚",
"SetPosition": "2. 明确你的立场",
"SetPosition1": "1. 明确你的立场",
"Slovakia": "斯洛伐克",
"Slovenia": "斯洛文尼亚",
"Spain": "西班牙",
Expand Down
112 changes: 38 additions & 74 deletions admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@


console.log('Settings loaded')
//console.log('Val country: ' + $("#geocodeCountry").val())

}

Expand Down Expand Up @@ -143,15 +144,19 @@

locationArray = []
var geocodeNameArray = []
var country = ''

for(let i = 0; i < crs.length; i++) {
var loccode = crs[i].properties.code
let polygon = JSON.stringify(crs[i].geometry.coordinates)
let type = JSON.stringify(crs[i].properties.type)
let geocodeLocation = crs[i].properties.name
let countryFound = crs[i].properties.country
if (checkIfInPoly(polygon)){
locationArray.push(loccode)
geocodeNameArray.push(geocodeLocation)
country = countryFound
console.log('Country: ' + country)
}

//console.log('Code: ' + loccode)
Expand All @@ -165,6 +170,8 @@
// geocode gefunden
$("#geocode").val(locationArray);
$("#geocodeLocation").val(geocodeNameArray);
$("#geocodeCountry").val(country);

}
else{
console.log('Geocode not found')
Expand Down Expand Up @@ -397,7 +404,7 @@
// This will be called by the admin adapter when the user presses the save button
function save(callback) {
// example: select elements with class=value and build settings object
console.log('saving country ' + $('#country').children("option:selected").val())
console.log('saving country ' + $('#geocodeCountry').val())
if (!checksetup()){
console.log('No errors found')
var obj = {};
Expand All @@ -416,7 +423,7 @@
}
});

obj.regionName = $('#region').children("option:selected").text()
//obj.regionName = $('#region').children("option:selected").text()

callback(obj);

Expand All @@ -425,7 +432,6 @@
//wait till errors are fixed
console.log('Errors found')
}
//settings.regionName = $('#region').children("option:selected").text()

}

Expand All @@ -441,6 +447,10 @@
padding-left: 0.75rem;
}

.headline {
font-weight: bold;
}

#loader {
position: absolute;
display: none;
Expand Down Expand Up @@ -470,7 +480,7 @@

#mapWrap {
width: 50%;
height: 300px;
height: 400px;
margin-right: 1rem;
z-index: 2;
}
Expand Down Expand Up @@ -509,58 +519,11 @@ <h6 class="title translate" data-lang="regionsetup">chooseAlarmLocation</h6>
</div>
<div class="row" style="display: flex;">
<div class="wrapper" >
<div class="input-field ">
<div class="translate">SelectCountry</div>
</div>

<div class="column"><select class="value select-country" id="country">
<option value="" class="translate">ChooseCountry</option>
<option value="AT" class="translate">Austria</option>
<option value="CH" class="translate">Switzerland</option>
<option value="DE" class="translate">Germany</option>
<option value="BE" class="translate">Belgium</option>
<option value="BA" class="translate">BosniaHerzegovina</option>
<!--<option value="BG" class="translate">Bulgaria</option> Auskommentiert da falsch in geocodes.json-->
<option value="HR" class="translate">Croatia</option>
<option value="CY" class="translate">Cyprus</option>
<option value="CZ" class="translate">Czech Republic</option>
<option value="DK" class="translate">Denmark</option>
<option value="EE" class="translate">Estonia</option>
<option value="FI" class="translate">Finland</option>
<option value="FR" class="translate">France</option>
<option value="GR" class="translate">Greece</option>
<option value="HU" class="translate">Hungary</option>
<option value="IE" class="translate">Ireland</option>
<option value="IS" class="translate">Iceland</option>
<option value="IL" class="translate">Israel</option>
<option value="IT" class="translate">Italy</option>
<option value="LV" class="translate">Latvia</option>
<option value="LT" class="translate">Lithuania</option>
<option value="LU" class="translate">Luxembourg</option>
<option value="MK" class="translate">North Macedonia</option>
<option value="MT" class="translate">Malta</option>
<option value="NL" class="translate">Netherlands</option>
<option value="NO" class="translate">Norway</option>
<option value="PL" class="translate">Poland</option>
<!--<option value="PT" class="translate">Portugal</option> Auskommentiert da falsch in geocodes.json-->
<option value="RO" class="translate">Romania</option>
<option value="RS" class="translate">Serbia</option>
<option value="SK" class="translate">Slovakia</option>
<option value="SI" class="translate">Slovenia</option>
<option value="ES" class="translate">Spain</option>
<option value="SE" class="translate">Sweden</option>
<option value="UK" class="translate">UK</option>
</select></div>
<div class="column"></div>



<div class="input-field">
<div class="translate">SetPosition</div>
<div class="input-field col headLine" >
<div class="translate">SetPosition1</div>
</div>
<div>

<div class="column ">
<div class="column col ">
<input type="text" id="lat" class="value" />
<label for="lat" class="translate">lattitude</label>
</div>
Expand All @@ -570,34 +533,35 @@ <h6 class="title translate" data-lang="regionsetup">chooseAlarmLocation</h6>
</div>
</div>

<div style="margin-top: 0.75rem;">


<div style="margin-top: 0.75rem; " class="col">
<a id="loadSetup" class="waves-effect waves-light btn"><i class="material-icons left">sync</i><span class="translate">loadSetup</span></a>
</div>
</div>

<div id="mapWrap"></div>

</div>
<div id="loader"></div>
<div class="input-field col headLine">
<div class="translate">InstructionGeoCode</div>
</div>

<div class="row" style="display: flex; flex-direction: column;">

<div class="input-field col">
<div class="translate">InstructionGeoCode</div>
</div>
<div class="col">
<a id="loadLocationCode" class="waves-effect waves-light btn"><i class="material-icons left">map</i><span class="translate">LoadGeocode</span></a>
</div>
<div class="col" style="width:80%">
<input type="text" id="geocodeLocation" class="value" readonly/>
</div>
<div class="col" style="width:20%" hidden>
<input type="text" id="geocode" class="value" readonly/>
</div>
<div class="col" style="width:20%" hidden>
<input type="text" id="geocodeCountry" class="value" readonly/>
</div>

<div class="col">
<a id="loadLocationCode" class="waves-effect waves-light btn"><i class="material-icons left">map</i><span class="translate">LoadGeocode</span></a>
</div>

<div class="col" style="width:20%">
<input type="text" id="geocodeLocation" class="value" readonly/>
</div>
<div class="col" style="width:20%" hidden>
<input type="text" id="geocode" class="value" readonly/>
</div>

<div id="mapWrap"></div>

</div>
<div id="loader"></div>

</div>

Expand Down
Loading

0 comments on commit 9a7e865

Please sign in to comment.