documents panel: testing, + cosmetic changes

This commit is contained in:
rolux 2014-11-21 15:53:02 +00:00
parent 618f07452c
commit 6da8e3fb69

View file

@ -383,7 +383,13 @@ pandora.ui.documentsPanel = function(options) {
pandora_showdocument: function(data) { pandora_showdocument: function(data) {
isItemView && that.toggleElement(1); isItemView && that.toggleElement(1);
} }
}); })
.bindEvent(
'pandora_documentsselection.' + (
isItemView ? ui.item.toLowerCase() : ''
),
selectDocuments
);
if (isItemView) { if (isItemView) {
pandora.$ui.documentsList = $list; pandora.$ui.documentsList = $list;
@ -395,11 +401,6 @@ pandora.ui.documentsPanel = function(options) {
$findInput.options({width: getFindInputWidth()}); $findInput.options({width: getFindInputWidth()});
}); });
that.bindEvent(
'pandora_documentsselection.' + (isItemView ? ui.item.toLowerCase() : ''),
selectDocuments
);
function addDocuments() { function addDocuments() {
var ids = ui.documentsSelection['']; var ids = ui.documentsSelection[''];
pandora.api.addDocument({ pandora.api.addDocument({
@ -748,8 +749,8 @@ pandora.ui.documentsPanel = function(options) {
.bindEventOnce({ .bindEventOnce({
load: function() { load: function() {
listLoaded = true; listLoaded = true;
selectDocuments();
!ui.showBrowser && $list.gainFocus(); !ui.showBrowser && $list.gainFocus();
setTimeout(selectDocuments);
} }
}); });
} }