forked from 0x2620/pandora
main menu: add show/hide document entry
This commit is contained in:
parent
6b63239cf7
commit
efe15c3e3b
1 changed files with 20 additions and 3 deletions
|
@ -135,6 +135,11 @@ pandora.ui.mainMenu = function() {
|
|||
title: Ox._((ui.showBrowser ? 'Hide': 'Show') + ' {0} Browser', [Ox._(pandora.site.itemName.singular)]),
|
||||
disabled: !ui.item, keyboard: 'shift b'
|
||||
},
|
||||
{
|
||||
id: 'showdocument',
|
||||
title: Ox._((ui.showTimeline ? 'Hide' : 'Show') + ' Document'),
|
||||
disabled: !hasDocument(), keyboard: 'shift d'
|
||||
},
|
||||
{
|
||||
id: 'showtimeline',
|
||||
title: Ox._((ui.showTimeline ? 'Hide' : 'Show') + ' Timeline'),
|
||||
|
@ -438,6 +443,8 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.UI.set({showFilters: !ui.showFilters});
|
||||
} else if (data.id == 'showbrowser') {
|
||||
pandora.UI.set({showBrowser: !ui.showBrowser});
|
||||
} else if (data.id == 'showdocument') {
|
||||
pandora.UI.set({showDocument: !ui.showDocument});
|
||||
} else if (data.id == 'showtimeline') {
|
||||
pandora.UI.set({showTimeline: !ui.showTimeline});
|
||||
} else if (data.id == 'showannotations') {
|
||||
|
@ -596,12 +603,15 @@ pandora.ui.mainMenu = function() {
|
|||
key_shift_b: function() {
|
||||
ui.item && pandora.UI.set({showBrowser: !ui.showBrowser});
|
||||
},
|
||||
key_shift_c: function() {
|
||||
hasClips && pandora.UI.set({showClips: !ui.showClips});
|
||||
},
|
||||
key_shift_backtick: function() {
|
||||
changeFocus(-1);
|
||||
},
|
||||
key_shift_c: function() {
|
||||
hasClips() && pandora.UI.set({showClips: !ui.showClips});
|
||||
},
|
||||
key_shift_d: function() {
|
||||
hasDocument() && pandora.UI.set({showDocument: !ui.showDocument});
|
||||
}
|
||||
key_shift_f: function() {
|
||||
!ui.item && pandora.UI.set({showFilters: !ui.showFilters});
|
||||
},
|
||||
|
@ -742,6 +752,9 @@ pandora.ui.mainMenu = function() {
|
|||
pandora_showclips: function(data) {
|
||||
that.setItemTitle('showclips', Ox._((data.value ? 'Hide' : 'Show') + ' Clips'));
|
||||
},
|
||||
pandora_showdocument: function(data) {
|
||||
that.setItemTitle('showdocument', Ox._((data.value ? 'Hide' : 'Show') + ' Document'));
|
||||
}
|
||||
pandora_showfilters: function(data) {
|
||||
that.setItemTitle('showfilters', Ox._((data.value ? 'Hide' : 'Show') + ' Filters'));
|
||||
},
|
||||
|
@ -1042,6 +1055,10 @@ pandora.ui.mainMenu = function() {
|
|||
return ui.section == 'edits' && ui.edit;
|
||||
}
|
||||
|
||||
function hasDocument() {
|
||||
return ui.section == 'items' && ui.item && ui.itemView == 'documents';
|
||||
}
|
||||
|
||||
function hasTimeline() {
|
||||
return (
|
||||
ui.section == 'items' && ui.item && ui.itemView == 'player'
|
||||
|
|
Loading…
Reference in a new issue