Commit 2e501175 authored by Michael Dombrowski's avatar Michael Dombrowski

update to work with 1.1.0

parent 3534576e
......@@ -28,6 +28,18 @@
Copy the text after /locations/ and before /tides/latest from the URL (Including the dashes)<br/>If you enter it incorrectly tides cannot be fetched!
<br/>Example: Washington-DC or Sydney or Berwick-Upon-Tweed</p>
<div data-role="fieldcontain">
<label for="configText">Show the Current Configuration on the App ?</label>
<select name="configText" id="configText" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
<label for="hourFormat">What Time Format Do You Prefer?</label>
<select name="hourFormat" id="hourFormat" data-role="slider">
<option value="12h">12h</option>
<option value="24h">24h</option>
</select>
</div>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<legend>Enter up to 7 Exact Location Names</legend>
<label for="name">Location 1:</label>
......@@ -58,10 +70,6 @@ Copy the text after /locations/ and before /tides/latest from the URL (Including
</div>
</div>
<script>
var iPhon = false;
if(/iP([ao]d|hone)/.test(navigator.userAgent)){
iPhon=true;
}
var options = location.search.slice(1).split("&");
options[0] = options[0].split("=")[1];
options[1] = options[1].split("=")[1];
......@@ -70,6 +78,11 @@ Copy the text after /locations/ and before /tides/latest from the URL (Including
options[4] = options[4].split("=")[1];
options[5] = options[5].split("=")[1];
options[6] = options[6].split("=")[1];
options[7] = options[7].split("=")[1];
options[8] = options[8].split("=")[1];
for(option in options){
options[option] = decodeURIComponent(options[option]);
}
for(loc in options){
if(options[loc]===null || options[loc]=="undefined" || options[loc] == "null"){
options[loc]="";
......@@ -82,6 +95,8 @@ Copy the text after /locations/ and before /tides/latest from the URL (Including
$("#location5").val(options[4]);
$("#location6").val(options[5]);
$("#location7").val(options[6]);
$("#configText").val(options[8]);
$("#hourFormat").val(options[9]);
function saveOptions() {
var options = {
'location1': $("#location1").val(),
......@@ -91,7 +106,8 @@ Copy the text after /locations/ and before /tides/latest from the URL (Including
'location5': $("#location5").val(),
'location6': $("#location6").val(),
'location7': $("#location7").val(),
'iPhone' : iPhon
'configText': $("#configText").val(),
'hourFormat': $("#hourFormat").val()
}
return options;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment