This commit is contained in:
j 2014-05-19 17:00:33 +02:00
commit 75a14fed1e
18 changed files with 251 additions and 121 deletions

View file

@ -17,22 +17,30 @@ oml.ui.rightPanel = function() {
],
orientation: 'horizontal',
selected: !ui.item ? 'list' : 'item',
size: window.innerWidth - ui.showSidebar * ui.sidebarSize - 1
size: getSize()
})
.bindEvent({
resize: function(data) {
Ox.print('::RESIZING', data.size);
that.options({size: data.size});
oml.$ui.filtersOuterPanel.updateElement();
oml.$ui.itemViewPanel.options({size: data.size});
},
oml_item: function(data) {
Ox.print('rightPanel, oml_item', data);
if (!!data.value != !!data.previousValue) {
that.options({selected: !ui.item ? 'list' : 'item'});
}
}
});
function getSize() {
return window.innerWidth - ui.showSidebar * ui.sidebarSize - 1;
}
that.updateElement = function() {
return that.triggerEvent('resize', {size: getSize()});
};
return that;
};
};