forked from 0x2620/pandora
fix #2245 (Documents Dialog: Disable 'Add to Current Item' if not in items section)
This commit is contained in:
parent
c452fa6298
commit
5f8d7e707e
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
pandora.ui.documentsPanel = function(options) {
|
||||
|
||||
var ui = pandora.user.ui,
|
||||
hasItemView = false, // FIXME
|
||||
hasItemView = ui.section == 'items' && ui.item,
|
||||
isItemView = options.isItemView,
|
||||
listLoaded = false,
|
||||
|
||||
|
@ -810,7 +810,7 @@ pandora.ui.documentsPanel = function(options) {
|
|||
))
|
||||
.setItemTitle('replace', Ox._('Replace ' + string + '...'))
|
||||
.setItemTitle('delete', Ox._('Delete ' + string + '...'))
|
||||
[selected.length ? 'enableItem' : 'disableItem']('add')
|
||||
[selected.length && hasItemView ? 'enableItem' : 'disableItem']('add')
|
||||
[selected.length ? 'enableItem' : 'disableItem']('embed')
|
||||
[selected.length == 1 ? 'enableItem' : 'disableItem']('replace')
|
||||
[selected.length ? 'enableItem' : 'disableItem']('delete');
|
||||
|
|
Loading…
Reference in a new issue