forked from 0x2620/pandora
fix adding items to empty list
This commit is contained in:
parent
e54c5a018c
commit
b4b8e08231
2 changed files with 3 additions and 3 deletions
|
@ -169,7 +169,7 @@ def findDocuments(request):
|
||||||
Sum('size')
|
Sum('size')
|
||||||
)
|
)
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
response['data']['size'] = r['size__sum']
|
response['data']['size'] = r['size__sum'] or 0
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(findDocuments)
|
actions.register(findDocuments)
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,7 @@ pandora.ui.documentsPanel = function(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function editDocuments() {
|
function editDocuments() {
|
||||||
pandora.UI.set('documentSelection.', $list.options('selected'));
|
pandora.UI.set('documentsSelection.', $list.options('selected'));
|
||||||
pandora.$ui.documentsDialog = pandora.ui.documentsDialog().open();
|
pandora.$ui.documentsDialog = pandora.ui.documentsDialog().open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ pandora.ui.documentsPanel = function(options) {
|
||||||
conditions: isItemView ? [{ key: 'item', value: ui.item, operator: '==' }] : [],
|
conditions: isItemView ? [{ key: 'item', value: ui.item, operator: '==' }] : [],
|
||||||
operator: '&'
|
operator: '&'
|
||||||
},
|
},
|
||||||
selected: ui.documentsSelection[isItemView ? ui.item : ''],
|
selected: ui.documentsSelection[isItemView ? ui.item : ''] || [],
|
||||||
sort: ui.documentsSort.concat([
|
sort: ui.documentsSort.concat([
|
||||||
{key: 'extension', operator: '+'},
|
{key: 'extension', operator: '+'},
|
||||||
{key: 'name', operator: '+'}
|
{key: 'name', operator: '+'}
|
||||||
|
|
Loading…
Reference in a new issue