fix #2302 (Regression: Using find in Manage Favorite/Featured breaks layout)
This commit is contained in:
parent
8424797cc4
commit
cc5ee75564
4 changed files with 26 additions and 9 deletions
|
|
@ -1,10 +1,15 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
pandora.ui.folderBrowser = function(id, section) {
|
||||
var that = Ox.Element();
|
||||
// Yes, we have to wait for the lists init event to decide if it is shown.
|
||||
// This run-once init handler runs *after* the list's own init handler.
|
||||
var i = Ox.getIndexById(pandora.site.sectionFolders[section], id),
|
||||
that = Ox.Element();
|
||||
pandora.site.sectionFolders[section][i].hasItems = null;
|
||||
pandora.$ui.folderList[id] = pandora.ui.folderBrowserList(id, section)
|
||||
.bindEvent({
|
||||
.bindEventOnce({
|
||||
init: function(data) {
|
||||
pandora.site.sectionFolders[section][i].hasItems = !!data.items;
|
||||
if (data.items) {
|
||||
that.setElement(
|
||||
Ox.SplitPanel({
|
||||
|
|
@ -15,11 +20,18 @@ pandora.ui.folderBrowser = function(id, section) {
|
|||
},
|
||||
{
|
||||
element: pandora.$ui.folderList[id]
|
||||
},
|
||||
{
|
||||
element: Ox.Element().append(
|
||||
pandora.ui.folderPlaceholder(id, section).updateText('public', true)
|
||||
),
|
||||
size: 0
|
||||
}
|
||||
],
|
||||
orientation: 'vertical'
|
||||
})
|
||||
);
|
||||
pandora.resizeFolders();
|
||||
} else {
|
||||
// if there are no items, then the placeholder is already there
|
||||
pandora.$ui.folderPlaceholder[id].updateText('public');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue