documents panel: testing

This commit is contained in:
rolux 2014-11-21 16:09:42 +00:00
parent 17ecf6da53
commit 3aadc0f513

View file

@ -750,15 +750,16 @@ pandora.ui.documentsPanel = function(options) {
load: function() { load: function() {
listLoaded = true; listLoaded = true;
!ui.showBrowser && $list.gainFocus(); !ui.showBrowser && $list.gainFocus();
select(); if ($list.options('selected').length == 0) {
function select() { selectDocuments()
if ( } else {
$list.options('selected').length == 0 selectDocumentsLater();
|| $list.value($list.options('selected')[0]) }
) { function selectDocumentsLater() {
if ($list.value($list.options('selected')[0])) {
selectDocuments(); selectDocuments();
} else { } else {
setTimeout(select, 100); setTimeout(selectDocumentsLater, 100);
} }
} }
} }