filters and folders

This commit is contained in:
Jan Gerber 2015-04-20 09:50:42 +02:00
parent 6eb08bd464
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;
};
};

View file

@ -30,7 +30,7 @@ oml.ui.folderList = function(options) {
{
id: 'name',
visible: true,
width: ui.sidebarSize - 58,
width: ui.sidebarSize - 16 - 48,
},
{
align: 'right',
@ -43,7 +43,7 @@ oml.ui.folderList = function(options) {
},
id: 'items',
visible: true,
width: 42
width: 48
}
],
draggable: options.draggable,

View file

@ -951,7 +951,7 @@ oml.resizeFilters = function() {
oml.resizeListFolders = function() {
// FIXME: does this have to be here?
var width = oml.getListFoldersWidth(),
columnWidth = width - 58;
columnWidth = width - 16 - 48;
oml.$ui.librariesList
.css({width: width + 'px'})
.resizeColumn('name', columnWidth);