fix adding items to empty list

This commit is contained in:
j 2014-01-08 08:35:02 +00:00
parent e54c5a018c
commit b4b8e08231
2 changed files with 3 additions and 3 deletions

View file

@ -169,7 +169,7 @@ def findDocuments(request):
Sum('size')
)
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)
actions.register(findDocuments)

View file

@ -405,7 +405,7 @@ pandora.ui.documentsPanel = function(options) {
}
function editDocuments() {
pandora.UI.set('documentSelection.', $list.options('selected'));
pandora.UI.set('documentsSelection.', $list.options('selected'));
pandora.$ui.documentsDialog = pandora.ui.documentsDialog().open();
}
@ -573,7 +573,7 @@ pandora.ui.documentsPanel = function(options) {
conditions: isItemView ? [{ key: 'item', value: ui.item, operator: '==' }] : [],
operator: '&'
},
selected: ui.documentsSelection[isItemView ? ui.item : ''],
selected: ui.documentsSelection[isItemView ? ui.item : ''] || [],
sort: ui.documentsSort.concat([
{key: 'extension', operator: '+'},
{key: 'name', operator: '+'}