musicbox config option controls which navigation links are shown
This commit is contained in:
parent
b94db6bfcc
commit
0bd7eff8d6
@ -19,6 +19,7 @@ class MusicBoxExtension(ext.Extension):
|
||||
|
||||
def get_config_schema(self):
|
||||
schema = super(MusicBoxExtension, self).get_config_schema()
|
||||
schema['musicbox'] = config.Boolean()
|
||||
return schema
|
||||
|
||||
def setup(self, registry):
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
[musicbox_webclient]
|
||||
enabled = true
|
||||
musicbox = false
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
if (wsLocation == location.hostname) {
|
||||
wsLocation = location.hostname + ':6680';
|
||||
}
|
||||
var isMusicBox = true; //set to true to remove buttons only for musicbox
|
||||
var isMusicBox = {{musicbox}}; // Remove MusicBox only content (e.g. settings, system pages)
|
||||
|
||||
$(document).bind("mobileinit", function () {
|
||||
$.extend($.mobile, {
|
||||
|
||||
@ -30,7 +30,8 @@ class IndexHandler(tornado.web.RequestHandler):
|
||||
def initialize(self, config, path):
|
||||
ext_config = config[MusicBoxExtension.ext_name]
|
||||
self.__dict = {
|
||||
'version': MusicBoxExtension.version
|
||||
'version': MusicBoxExtension.version,
|
||||
'musicbox': int(ext_config['musicbox'])
|
||||
}
|
||||
self.__path = path
|
||||
self.__title = string.Template('MusicBox on $hostname')
|
||||
|
||||
@ -16,8 +16,7 @@ def test_get_config_schema():
|
||||
ext = MusicBoxExtension()
|
||||
|
||||
schema = ext.get_config_schema()
|
||||
|
||||
# TODO Test the content of your config schema
|
||||
assert 'musicbox' in schema
|
||||
|
||||
|
||||
# TODO Write more tests
|
||||
|
||||
Loading…
Reference in New Issue
Block a user