verschiedene bugfixes und auf index.html umgestellt
This commit is contained in:
parent
d69c6ecfab
commit
8ca4777a7c
3 changed files with 19 additions and 19 deletions
|
@ -73,22 +73,18 @@
|
|||
uhr.setTheme(theme);
|
||||
$('#layoutswitcher').val(layout);
|
||||
uhr.setLayout(layout);
|
||||
|
||||
if (status == 'on') {
|
||||
uhr.start();
|
||||
if(!isOn()) {
|
||||
uhr.stop();
|
||||
$('#onoffswitch').click();
|
||||
}
|
||||
} else {
|
||||
uhr.stop();
|
||||
if(isOn()) {
|
||||
uhr.start();
|
||||
} else {
|
||||
if(isOn()) {
|
||||
$('#onoffswitch').click();
|
||||
}
|
||||
uhr.stop();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
29
index.html
29
index.html
|
@ -4,6 +4,7 @@
|
|||
<title>Die Zeit als Wort - in HTML, CSS und JS</title>
|
||||
<script type="text/javascript" src="jquery-2.0.3.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.cookie.js"></script>
|
||||
<script type="text/javascript" src="uhr-object.js"></script>
|
||||
<script type="text/javascript" src="uhr.js"></script>
|
||||
<script type="text/javascript" src="uhr-de_CH.js"></script>
|
||||
<script type="text/javascript" src="uhr-de.js"></script>
|
||||
|
@ -35,7 +36,7 @@
|
|||
<option value="en">English</option>
|
||||
</select>
|
||||
<div class="onoffswitch">
|
||||
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="onoffswitch" checked="checked" onclick="updateClockState()" />
|
||||
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="onoffswitch" checked="checked" onclick="uhr.toggle()" />
|
||||
<label class="onoffswitch-label" for="onoffswitch">
|
||||
<div class="onoffswitch-inner"></div>
|
||||
<div class="onoffswitch-switch"></div>
|
||||
|
@ -43,12 +44,16 @@
|
|||
</div>
|
||||
<p id="disclaimer">Created by fritteli, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>.
|
||||
<script type="text/javascript">
|
||||
var uhr = new Uhr($('#renderarea'), $('#theme'));
|
||||
uhr.register('de_CH', layout['de_CH']);
|
||||
uhr.register('de', layout['de']);
|
||||
uhr.register('en', layout['en']);
|
||||
$(document).ready(function() {
|
||||
$('#themeswitcher').on('change', function() {
|
||||
switchTheme(this.value);
|
||||
});
|
||||
$('#layoutswitcher').on('change', function() {
|
||||
switchLayout(this.value);
|
||||
uhr.setLayout(this.value);
|
||||
});
|
||||
$('#themeswitcher').on('change', function() {
|
||||
uhr.setTheme(this.value);
|
||||
});
|
||||
$.cookie.defaults.expires = 365;
|
||||
$.cookie.defaults.path = '/';
|
||||
|
@ -65,17 +70,15 @@
|
|||
status = 'on';
|
||||
}
|
||||
$('#themeswitcher').val(theme);
|
||||
switchTheme(theme);
|
||||
uhr.setTheme(theme);
|
||||
$('#layoutswitcher').val(layout);
|
||||
switchLayout(layout);
|
||||
uhr.setLayout(layout);
|
||||
if (status == 'on') {
|
||||
if(!isOn()) {
|
||||
$('#onoffswitch').click();
|
||||
}
|
||||
uhr.start();
|
||||
$('#onoffswitch').prop('checked', 'checked');
|
||||
} else {
|
||||
if(isOn()) {
|
||||
$('#onoffswitch').click();
|
||||
}
|
||||
uhr.stop();
|
||||
$('#onoffswitch').removeProp('checked');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -136,6 +136,7 @@ UhrRenderer.prototype.render = function(uhr) {
|
|||
renderer.renderarea.append('<br/>');
|
||||
}
|
||||
}
|
||||
uhr.currentMinute = -1;
|
||||
uhr.update();
|
||||
renderer.renderarea.fadeIn('fast');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue