pandora/static/js/folderBrowser.js

32 lines
1.1 KiB
JavaScript
Raw Normal View History

2011-07-29 18:37:11 +00:00
// vim: et:ts=4:sw=4:sts=4:ft=javascript
2011-11-05 17:04:10 +00:00
'use strict';
2013-07-15 11:39:23 +00:00
pandora.ui.folderBrowser = function(id, section) {
var that = Ox.Element();
pandora.$ui.folderList[id] = pandora.ui.folderBrowserList(id, section)
.bindEvent({
init: function(data) {
if (data.items) {
that.setElement(
Ox.SplitPanel({
elements: [
{
element: pandora.ui.folderBrowserBar(id, section),
size: 24
},
{
element: pandora.$ui.folderList[id]
}
],
orientation: 'vertical'
})
);
} else {
// if there are no items, then the placeholder is already there
pandora.$ui.folderPlaceholder[id].updateText('public');
}
2011-05-25 19:42:45 +00:00
}
});
2011-05-25 19:42:45 +00:00
return that;
};