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