TableList: set Select/Clear CSS according to scrollbar size

This commit is contained in:
rolux 2012-12-10 17:44:52 +01:00
parent d8656d3e86
commit c4cf3586df

View file

@ -220,8 +220,21 @@ Ox.TableList = function(options, self) {
return column.id;
})
})
.css(Ox.UI.SCROLLBAR_SIZE == 16 ? {
right: 0,
width: '14px'
} : {
right: '-1px',
width: '8px',
})
.bindEvent('change', changeColumns)
.appendTo(that.$bar);
Ox.UI.SCROLLBAR_SIZE < 16 && $(that.$select.find('input')[0]).css({
marginRight: '-3px',
marginTop: '1px',
width: '8px',
height: '8px'
});
} else if (self.options.clearButton) {
self.$clearButton = Ox.Element({
element: '<img>',
@ -229,8 +242,13 @@ Ox.TableList = function(options, self) {
})
.addClass('OxClear')
.attr({src: Ox.UI.getImageURL('symbolClose')})
.css({
right: Math.floor(Ox.UI.SCROLLBAR_SIZE - 8) / 2 + 'px'
.css(Ox.UI.SCROLLBAR_SIZE == 16 ? {
paddingLeft: '4px',
paddingRight: '2px',
marginRight: 0
} : {
paddingRight: '1px',
marginRight: '-2px'
})
[self.options.selected.length ? 'show' : 'hide']()
.bindEvent({