make debug menu depend on capability; make sure info view doesn't throw errors for movies without H/S/L
This commit is contained in:
parent
188dc1a6ab
commit
72e831e5b2
3 changed files with 132 additions and 125 deletions
|
@ -18,6 +18,7 @@
|
|||
"canPlayClips": {"guest": 1, "member": 2, "friend": 3, "staff": 4, "admin": 4},
|
||||
"canPlayVideo": {"guest": 0, "member": 1, "friend": 3, "staff": 4, "admin": 4},
|
||||
"canReloadMetadata": {"staff": true, "admin": true},
|
||||
"canSeeDebugMenu": {"admin": true},
|
||||
"canSeeFiles": {"staff": true, "admin": true},
|
||||
"canSeeItem": {"guest": 2, "member": 2, "friend": 3, "staff": 4, "admin": 4},
|
||||
"canSeeExtraItemViews": {"friend": true, "staff": true, "admin": true}
|
||||
|
|
|
@ -355,7 +355,7 @@ pandora.ui.infoView = function(data) {
|
|||
$('<div>')
|
||||
.css({marginBottom: '4px'})
|
||||
.append(formatKey(key, true))
|
||||
.append(Ox.formatColor(data[key], key))
|
||||
.append(Ox.formatColor(data[key] || 0, key))
|
||||
.appendTo($statistics);
|
||||
});
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ pandora.ui.mainMenu = function() {
|
|||
})
|
||||
],
|
||||
id: 'mainMenu',
|
||||
menus: [
|
||||
menus: Ox.merge(
|
||||
[
|
||||
{ id: pandora.site.site.id + 'Menu', title: pandora.site.site.name, items: [
|
||||
{ id: 'home', title: 'Home' },
|
||||
{},
|
||||
|
@ -136,12 +137,17 @@ pandora.ui.mainMenu = function() {
|
|||
] },
|
||||
{ id: 'helpMenu', title: 'Help', items: [
|
||||
{ id: 'help', title: pandora.site.site.name + ' Help', keyboard: 'shift ?' }
|
||||
] },
|
||||
] }
|
||||
],
|
||||
pandora.site.capabilities.canSeeDebugMenu[pandora.user.level]
|
||||
? [
|
||||
{ id: 'debugMenu', title: 'Debug', items: [
|
||||
{ id: 'clearcache', title: 'Clear cache'},
|
||||
{ id: 'resetui', title: 'Reset UI Settings'}
|
||||
] }
|
||||
]
|
||||
: []
|
||||
)
|
||||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
|
|
Loading…
Reference in a new issue