diff --git a/static/js/filter.js b/static/js/filter.js index 4d47ff9..675f864 100644 --- a/static/js/filter.js +++ b/static/js/filter.js @@ -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; -}; \ No newline at end of file +}; diff --git a/static/js/folderList.js b/static/js/folderList.js index 1325213..e166c4d 100644 --- a/static/js/folderList.js +++ b/static/js/folderList.js @@ -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, diff --git a/static/js/utils.js b/static/js/utils.js index 449d4c0..a30f9c7 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -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);