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) {
|
pandora.ui.documentsPanel = function(options) {
|
||||||
|
|
||||||
var ui = pandora.user.ui,
|
var ui = pandora.user.ui,
|
||||||
hasItemView = false, // FIXME
|
hasItemView = ui.section == 'items' && ui.item,
|
||||||
isItemView = options.isItemView,
|
isItemView = options.isItemView,
|
||||||
listLoaded = false,
|
listLoaded = false,
|
||||||
|
|
||||||
|
@ -810,7 +810,7 @@ pandora.ui.documentsPanel = function(options) {
|
||||||
))
|
))
|
||||||
.setItemTitle('replace', Ox._('Replace ' + string + '...'))
|
.setItemTitle('replace', Ox._('Replace ' + string + '...'))
|
||||||
.setItemTitle('delete', Ox._('Delete ' + string + '...'))
|
.setItemTitle('delete', Ox._('Delete ' + string + '...'))
|
||||||
[selected.length ? 'enableItem' : 'disableItem']('add')
|
[selected.length && hasItemView ? 'enableItem' : 'disableItem']('add')
|
||||||
[selected.length ? 'enableItem' : 'disableItem']('embed')
|
[selected.length ? 'enableItem' : 'disableItem']('embed')
|
||||||
[selected.length == 1 ? 'enableItem' : 'disableItem']('replace')
|
[selected.length == 1 ? 'enableItem' : 'disableItem']('replace')
|
||||||
[selected.length ? 'enableItem' : 'disableItem']('delete');
|
[selected.length ? 'enableItem' : 'disableItem']('delete');
|
||||||
|
|
Loading…
Reference in a new issue