Add link to Alarm Clock
This commit is contained in:
parent
be769dc479
commit
287995110b
@ -9,7 +9,8 @@
|
||||
<script>
|
||||
//configuration
|
||||
var isMusicBox = {{musicbox}}; // Remove MusicBox only content (e.g. settings, system pages)
|
||||
var websocketUrl = '{{websocket_url}}'
|
||||
var websocketUrl = '{{websocket_url}}';
|
||||
var hasAlarmClock = {{alarmclock}}; // Add Alarm Clock icons
|
||||
|
||||
$(document).bind("mobileinit", function () {
|
||||
$.extend($.mobile, {
|
||||
@ -96,6 +97,10 @@
|
||||
<a href="#search" onclick="switchContent('search' ); return false;">
|
||||
<span class="navtxt">Search </span><i class="fa fa-search"></i></a>
|
||||
</li>
|
||||
<li id="navAlarmClock" data-icon="false">
|
||||
<a href="/alarmclock/">
|
||||
<span class="navtxt"> Alarm Clock </span><i class="fa fa-clock-o"></i></a>
|
||||
</li>
|
||||
<li id="navEnterFullscreen" data-icon="false">
|
||||
<a href="#">
|
||||
<span class="navtxt"> Fullscreen </span><i class="fa fa-desktop"></i></a>
|
||||
@ -266,6 +271,12 @@
|
||||
<h4>Search</h4>
|
||||
</div>
|
||||
</a>
|
||||
<a id="homeAlarmClock" href="/alarmclock/">
|
||||
<div class="ui-block-a">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
<h4>Alarm Clock</h4>
|
||||
</div>
|
||||
</a>
|
||||
<a id="homesettings" href="/settings/">
|
||||
<div class="ui-block-a">
|
||||
<i class="fa fa-gear"></i>
|
||||
|
||||
@ -521,6 +521,12 @@ $(document).ready(function(event) {
|
||||
$('#homeshutdown').hide();
|
||||
}
|
||||
|
||||
// remove Alarm Clock if it is not present
|
||||
if (!hasAlarmClock) {
|
||||
$('#navAlarmClock').hide();
|
||||
$('#homeAlarmClock').hide();
|
||||
}
|
||||
|
||||
//navigation stuff
|
||||
|
||||
$(document).keypress( function (event) {
|
||||
|
||||
@ -44,7 +44,8 @@ class IndexHandler(tornado.web.RequestHandler):
|
||||
self.__dict = {
|
||||
'version': MusicBoxExtension.version,
|
||||
'musicbox': int(ext_config['musicbox'] or False),
|
||||
'websocket_url': ws_url
|
||||
'websocket_url': ws_url,
|
||||
'alarmclock': int(config['alarmclock']['enabled'])
|
||||
}
|
||||
self.__path = path
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user