one toolbar for all, repanelize
This commit is contained in:
parent
e3f0064157
commit
3213d8c102
10 changed files with 123 additions and 136 deletions
|
|
@ -2,45 +2,27 @@
|
|||
|
||||
oml.ui.rightPanel = function() {
|
||||
|
||||
var ui = oml.user.ui,
|
||||
|
||||
that = Ox.SlidePanel({
|
||||
var that = Ox.SplitPanel({
|
||||
elements: [
|
||||
{
|
||||
id: 'list',
|
||||
element: oml.$ui.listOuterPanel = oml.ui.listOuterPanel()
|
||||
element: oml.$ui.toolbar = oml.ui.toolbar(),
|
||||
size: 24
|
||||
},
|
||||
{
|
||||
id: 'item',
|
||||
element: oml.$ui.itemOuterPanel = oml.ui.itemOuterPanel()
|
||||
element: oml.$ui.viewPanel = oml.ui.viewPanel()
|
||||
}
|
||||
],
|
||||
orientation: 'horizontal',
|
||||
selected: !ui.item ? 'list' : 'item',
|
||||
size: getSize()
|
||||
orientation: 'vertical'
|
||||
})
|
||||
.bindEvent({
|
||||
resize: function(data) {
|
||||
that.options({size: data.size});
|
||||
oml.$ui.viewPanel.options({size: data.size});
|
||||
oml.$ui.filtersOuterPanel.updateElement();
|
||||
oml.$ui.list.size();
|
||||
oml.$ui.itemViewPanel.options({size: data.size});
|
||||
},
|
||||
oml_item: function(data) {
|
||||
if (!!data.value != !!data.previousValue) {
|
||||
that.options({selected: !ui.item ? 'list' : 'item'});
|
||||
}
|
||||
oml.$ui.itemViewPanel.options({size: data.size})
|
||||
}
|
||||
});
|
||||
|
||||
function getSize() {
|
||||
return window.innerWidth - ui.showSidebar * ui.sidebarSize - 1;
|
||||
}
|
||||
|
||||
that.updateElement = function() {
|
||||
return that.triggerEvent('resize', {size: getSize()});
|
||||
};
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue