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);
|
uhr.setTheme(theme);
|
||||||
$('#layoutswitcher').val(layout);
|
$('#layoutswitcher').val(layout);
|
||||||
uhr.setLayout(layout);
|
uhr.setLayout(layout);
|
||||||
|
|
||||||
if (status == 'on') {
|
if (status == 'on') {
|
||||||
uhr.start();
|
|
||||||
if(!isOn()) {
|
if(!isOn()) {
|
||||||
uhr.stop();
|
|
||||||
$('#onoffswitch').click();
|
$('#onoffswitch').click();
|
||||||
}
|
}
|
||||||
|
uhr.start();
|
||||||
} else {
|
} else {
|
||||||
uhr.stop();
|
|
||||||
if(isOn()) {
|
if(isOn()) {
|
||||||
uhr.start();
|
|
||||||
$('#onoffswitch').click();
|
$('#onoffswitch').click();
|
||||||
}
|
}
|
||||||
|
uhr.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
29
index.html
29
index.html
|
@ -4,6 +4,7 @@
|
||||||
<title>Die Zeit als Wort - in HTML, CSS und JS</title>
|
<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-2.0.3.min.js"></script>
|
||||||
<script type="text/javascript" src="jquery.cookie.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.js"></script>
|
||||||
<script type="text/javascript" src="uhr-de_CH.js"></script>
|
<script type="text/javascript" src="uhr-de_CH.js"></script>
|
||||||
<script type="text/javascript" src="uhr-de.js"></script>
|
<script type="text/javascript" src="uhr-de.js"></script>
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
<option value="en">English</option>
|
<option value="en">English</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="onoffswitch">
|
<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">
|
<label class="onoffswitch-label" for="onoffswitch">
|
||||||
<div class="onoffswitch-inner"></div>
|
<div class="onoffswitch-inner"></div>
|
||||||
<div class="onoffswitch-switch"></div>
|
<div class="onoffswitch-switch"></div>
|
||||||
|
@ -43,12 +44,16 @@
|
||||||
</div>
|
</div>
|
||||||
<p id="disclaimer">Created by fritteli, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>.
|
<p id="disclaimer">Created by fritteli, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>.
|
||||||
<script type="text/javascript">
|
<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() {
|
$(document).ready(function() {
|
||||||
$('#themeswitcher').on('change', function() {
|
|
||||||
switchTheme(this.value);
|
|
||||||
});
|
|
||||||
$('#layoutswitcher').on('change', function() {
|
$('#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.expires = 365;
|
||||||
$.cookie.defaults.path = '/';
|
$.cookie.defaults.path = '/';
|
||||||
|
@ -65,17 +70,15 @@
|
||||||
status = 'on';
|
status = 'on';
|
||||||
}
|
}
|
||||||
$('#themeswitcher').val(theme);
|
$('#themeswitcher').val(theme);
|
||||||
switchTheme(theme);
|
uhr.setTheme(theme);
|
||||||
$('#layoutswitcher').val(layout);
|
$('#layoutswitcher').val(layout);
|
||||||
switchLayout(layout);
|
uhr.setLayout(layout);
|
||||||
if (status == 'on') {
|
if (status == 'on') {
|
||||||
if(!isOn()) {
|
uhr.start();
|
||||||
$('#onoffswitch').click();
|
$('#onoffswitch').prop('checked', 'checked');
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if(isOn()) {
|
uhr.stop();
|
||||||
$('#onoffswitch').click();
|
$('#onoffswitch').removeProp('checked');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -136,6 +136,7 @@ UhrRenderer.prototype.render = function(uhr) {
|
||||||
renderer.renderarea.append('<br/>');
|
renderer.renderarea.append('<br/>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
uhr.currentMinute = -1;
|
||||||
uhr.update();
|
uhr.update();
|
||||||
renderer.renderarea.fadeIn('fast');
|
renderer.renderarea.fadeIn('fast');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue