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';
|
2011-05-25 19:42:45 +00:00
|
|
|
pandora.ui.contentPanel = function() {
|
2011-06-19 17:49:25 +00:00
|
|
|
var that = Ox.SplitPanel({
|
2011-09-27 23:30:13 +00:00
|
|
|
elements: !pandora.user.ui.item ? [
|
|
|
|
{
|
2011-11-06 08:28:10 +00:00
|
|
|
collapsed: !pandora.user.ui.showFilters,
|
2011-09-27 23:30:13 +00:00
|
|
|
collapsible: true,
|
|
|
|
element: pandora.$ui.browser = pandora.ui.browser(),
|
|
|
|
resizable: true,
|
|
|
|
resize: [96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256],
|
2011-11-06 08:28:10 +00:00
|
|
|
size: pandora.user.ui.filtersSize,
|
2014-02-14 15:23:59 +00:00
|
|
|
tooltip: Ox._('filters') + ' <span class="OxBright">'
|
2012-04-23 08:38:43 +00:00
|
|
|
+ Ox.SYMBOLS.SHIFT + 'F</span>'
|
2011-09-27 23:30:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
element: pandora.$ui.list = pandora.ui.list()
|
2011-11-06 19:42:34 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
element: pandora.$ui.statusbar = pandora.ui.statusbar(),
|
|
|
|
size: 16
|
2011-09-27 23:30:13 +00:00
|
|
|
}
|
|
|
|
] : [
|
|
|
|
{
|
2011-10-13 10:12:00 +00:00
|
|
|
collapsed: !pandora.user.ui.showBrowser,
|
2011-09-27 23:30:13 +00:00
|
|
|
collapsible: true,
|
|
|
|
element: pandora.$ui.browser = pandora.ui.browser(),
|
|
|
|
size: 112 + Ox.UI.SCROLLBAR_SIZE,
|
2014-02-14 15:23:59 +00:00
|
|
|
tooltip: Ox._('{0} browser', [Ox._(pandora.site.itemName.singular.toLowerCase())])
|
|
|
|
+ ' <span class="OxBright">'
|
2012-04-23 08:38:43 +00:00
|
|
|
+ Ox.SYMBOLS.SHIFT + 'B</span>'
|
2011-09-27 23:30:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
element: pandora.$ui.item = pandora.ui.item()
|
|
|
|
}
|
|
|
|
],
|
|
|
|
orientation: 'vertical'
|
|
|
|
})
|
|
|
|
.bindEvent({
|
|
|
|
pandora_item: function(data) {
|
|
|
|
if (data.value && data.previousValue) {
|
|
|
|
that.replaceElement(1, pandora.$ui.item = pandora.ui.item());
|
|
|
|
}
|
2011-05-25 19:42:45 +00:00
|
|
|
},
|
2011-09-27 23:30:13 +00:00
|
|
|
pandora_itemview: function() {
|
2012-03-18 14:59:00 +00:00
|
|
|
pandora.user.ui.item && that.replaceElement(1, pandora.$ui.item = pandora.ui.item());
|
2011-10-13 10:12:00 +00:00
|
|
|
},
|
2012-02-01 12:01:39 +00:00
|
|
|
pandora_listview: function() {
|
2012-03-18 14:59:00 +00:00
|
|
|
!pandora.user.ui.item && that.replaceElement(1, pandora.$ui.list = pandora.ui.list());
|
2012-02-01 12:01:39 +00:00
|
|
|
},
|
2011-10-13 10:12:00 +00:00
|
|
|
pandora_showbrowser: function(data) {
|
2014-09-23 21:56:11 +00:00
|
|
|
data.value == that.options('elements')[0].collapsed && that.toggleElement(0);
|
2011-10-13 10:12:00 +00:00
|
|
|
},
|
2011-11-06 08:28:10 +00:00
|
|
|
pandora_showfilters: function(data) {
|
2014-09-23 21:56:11 +00:00
|
|
|
data.value == that.options('elements')[0].collapsed && that.toggleElement(0);
|
2011-09-27 22:12:37 +00:00
|
|
|
}
|
2011-09-27 23:30:13 +00:00
|
|
|
});
|
2011-05-25 19:42:45 +00:00
|
|
|
return that;
|
|
|
|
};
|
|
|
|
|