openmedialibrary/static/js/itemPanel.js

36 lines
953 B
JavaScript
Raw Normal View History

2014-05-04 19:26:43 +02:00
'use strict';
2016-01-12 18:45:15 +05:30
oml.ui.itemPanel = function() {
2014-05-04 19:26:43 +02:00
var ui = oml.user.ui,
that = Ox.SplitPanel({
elements: [
{
collapsed: !ui.showBrowser,
collapsible: true,
element: oml.$ui.browser = oml.ui.browser(),
size: 112 + Ox.UI.SCROLLBAR_SIZE,
tooltip: Ox._('browser')
+ ' <span class="OxBright">'
2014-10-31 19:37:32 +01:00
+ Ox.SYMBOLS.shift + 'B</span>'
2014-05-04 19:26:43 +02:00
},
{
element: oml.$ui.itemViewPanel = oml.ui.itemViewPanel()
}
],
orientation: 'vertical'
})
.bindEvent({
oml_showbrowser: function(data) {
2016-01-12 18:45:15 +05:30
if (data.value == that.options('elements')[0].collapsed) {
that.toggleElement(0);
}
2014-05-04 19:26:43 +02:00
}
});
return that;
};