filters and folders

This commit is contained in:
Jan Gerber 2015-04-20 09:50:42 +02:00
commit 4ecaeb6d4a
3 changed files with 18 additions and 8 deletions

View file

@ -17,7 +17,7 @@ oml.ui.filter = function(id) {
operator: '+',
title: Ox._(filter.title),
visible: true,
width: filterSize - 44 - Ox.UI.SCROLLBAR_SIZE
width: filterSize - 48 - Ox.UI.SCROLLBAR_SIZE
},
{
align: 'right',
@ -28,7 +28,7 @@ oml.ui.filter = function(id) {
operator: '-',
title: '#',
visible: true,
width: 44
width: 48
}
],
columnsVisible: true,
@ -157,10 +157,20 @@ oml.ui.filter = function(id) {
})
.bindEvent({
change: function(data) {
var isOuter = filterIndex % 4 == 0, id = data.checked[0].id;
ui.filters[filterIndex] = Ox.getObjectById(oml.config.user.ui.filters, id);
ui._filterState = oml.getFilterState(ui.find);
oml.$ui[isOuter ? 'filtersOuterPanel' : 'filtersInnerPanel'].replaceElement(
isOuter ? filterIndex / 2 : filterIndex - 1,
oml.$ui.filters[filterIndex] = oml.ui.filter(id)
);
},
click: function(data) {
if (data.id == 'clearFilter') {
that.options({selected: []}).triggerEvent('select', {ids: []});
} else if (data.id == 'clearFilters') {
oml.clearFilters();
}
}
})
.appendTo(that.$bar.$element);
@ -184,4 +194,4 @@ oml.ui.filter = function(id) {
return that;
};
};