You've already forked intuiclock
Closes #2
This commit is contained in:
@@ -11,20 +11,12 @@
|
||||
<body>
|
||||
<form id="main-form">
|
||||
<div class="item-container">
|
||||
<div class="item-container-header">Features</div>
|
||||
<div class="item-container-header">Time & Date</div>
|
||||
<div class="item-container-content">
|
||||
<label class="item">
|
||||
Seconds Hand
|
||||
<input id="input-seconds-hand" type="checkbox" class="item-toggle" name="seconds-hand" checked>
|
||||
</label>
|
||||
<label class="item">
|
||||
Battery Indicator
|
||||
<input id="input-battery-indicator" type="checkbox" class="item-toggle" name="battery-indicator" checked>
|
||||
</label>
|
||||
<label class="item">
|
||||
Wide Window
|
||||
<input id="input-wide-layout" type="checkbox" class="item-toggle" name="wide-layout">
|
||||
</label>
|
||||
<label class="item">
|
||||
Date Format
|
||||
<select id="input-date-format" name="date-format" class="item-select">
|
||||
@@ -37,6 +29,24 @@
|
||||
<div class="item-container-footer">Disable the seconds hand to reduce battery use.</div>
|
||||
</div>
|
||||
|
||||
<div class="item-container">
|
||||
<div class="item-container-header">Appearance</div>
|
||||
<div class="item-container-content">
|
||||
<label class="item">
|
||||
Battery Indicator
|
||||
<input id="input-battery-indicator" type="checkbox" class="item-toggle" name="battery-indicator" checked>
|
||||
</label>
|
||||
<label class="item">
|
||||
Wide Window
|
||||
<input id="input-wide-layout" type="checkbox" class="item-toggle" name="wide-layout">
|
||||
</label>
|
||||
<label class="item">
|
||||
XEN Style
|
||||
<input id="input-xen-style" type="checkbox" class="item-toggle" name="xen-style">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-container">
|
||||
<div class="button-container">
|
||||
<input id="button-submit" type="button" class="item-button" value="SAVE">
|
||||
@@ -50,13 +60,15 @@
|
||||
var input_seconds_hand = document.getElementById('input-seconds-hand'),
|
||||
input_battery_indicator = document.getElementById('input-battery-indicator'),
|
||||
input_date_format = document.getElementById('input-date-format'),
|
||||
input_wide_layout = document.getElementById('input-wide-layout');
|
||||
input_wide_layout = document.getElementById('input-wide-layout'),
|
||||
input_xen_style = document.getElementById('input-xen-style');
|
||||
|
||||
var options = {
|
||||
'seconds_hand': input_seconds_hand.checked,
|
||||
'battery_indicator': input_battery_indicator.checked,
|
||||
'date_format': input_date_format.value,
|
||||
'wide_layout': input_wide_layout.checked
|
||||
'wide_layout': input_wide_layout.checked,
|
||||
'xen_style': input_xen_style.checked
|
||||
};
|
||||
|
||||
// Save for next launch
|
||||
@@ -64,8 +76,9 @@
|
||||
localStorage['battery_indicator'] = options['battery_indicator'];
|
||||
localStorage['date_format'] = options['date_format'];
|
||||
localStorage['wide_layout'] = options['wide_layout'];
|
||||
localStorage['xen_style'] = options['xen_style'];
|
||||
|
||||
console.log('Got options: ' + JSON.stringify(options));
|
||||
// console.log('Got options: ' + JSON.stringify(options));
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -85,7 +98,7 @@
|
||||
|
||||
var button_submit = document.getElementById('button-submit');
|
||||
button_submit.addEventListener('click', function() {
|
||||
console.log('Submit');
|
||||
// console.log('Submit');
|
||||
|
||||
// Set the return URL depending on the runtime environment
|
||||
var return_to = getQueryParam('return_to', 'pebblejs://close#');
|
||||
@@ -96,7 +109,8 @@
|
||||
var input_seconds_hand = document.getElementById('input-seconds-hand'),
|
||||
input_battery_indicator = document.getElementById('input-battery-indicator'),
|
||||
input_date_format = document.getElementById('input-date-format'),
|
||||
input_wide_layout = document.getElementById('input-wide-layout');
|
||||
input_wide_layout = document.getElementById('input-wide-layout'),
|
||||
input_xen_style = document.getElementById('input-xen-style');
|
||||
|
||||
if (localStorage['seconds_hand']) {
|
||||
input_seconds_hand.checked = JSON.parse(localStorage['seconds_hand']);
|
||||
@@ -113,6 +127,10 @@
|
||||
if (localStorage['wide_layout']) {
|
||||
input_wide_layout.checked = JSON.parse(localStorage['wide_layout']);
|
||||
}
|
||||
|
||||
if (localStorage['xen_style']) {
|
||||
input_xen_style.checked = JSON.parse(localStorage['xen_style']);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user