fix delete document dialog
This commit is contained in:
parent
dfce5b4d88
commit
16491d18b2
2 changed files with 14 additions and 7 deletions
|
@ -21,13 +21,15 @@ pandora.ui.deleteDocumentDialog = function(files, callback) {
|
||||||
click: function() {
|
click: function() {
|
||||||
that.close();
|
that.close();
|
||||||
pandora.api.removeDocument({
|
pandora.api.removeDocument({
|
||||||
ids: files
|
ids: files.map(function(file) {
|
||||||
|
return file.id;
|
||||||
|
})
|
||||||
}, callback);
|
}, callback);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
content: files.length == 1
|
content: files.length == 1
|
||||||
? Ox._('Are you sure you want to delete the document "{0}"?', [files[0]])
|
? Ox._('Are you sure you want to delete the document "{0}"?', [files[0].name + '.' + files[0].extension])
|
||||||
: Ox._('Are you sure you want to delete {0} documents?', [files.length]),
|
: Ox._('Are you sure you want to delete {0} documents?', [files.length]),
|
||||||
keys: {enter: 'delete', escape: 'keep'},
|
keys: {enter: 'delete', escape: 'keep'},
|
||||||
title: files.length == 1
|
title: files.length == 1
|
||||||
|
|
|
@ -418,11 +418,16 @@ pandora.ui.documentsPanel = function(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteDocuments() {
|
function deleteDocuments() {
|
||||||
pandora.ui.deleteDocumentDialog($list.options('selected'), function() {
|
pandora.ui.deleteDocumentDialog(
|
||||||
Ox.Request.clearCache();
|
$list.options('selected').map(function(id) {
|
||||||
// ...
|
return $list.value(id);
|
||||||
$list.reloadList();
|
}),
|
||||||
}).open();
|
function() {
|
||||||
|
Ox.Request.clearCache();
|
||||||
|
// ...
|
||||||
|
$list.reloadList();
|
||||||
|
}
|
||||||
|
).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
function editDocuments() {
|
function editDocuments() {
|
||||||
|
|
Loading…
Reference in a new issue