diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js
index f45dbb9b..7459d1b6 100644
--- a/source/Ox.UI/js/List/TableList.js
+++ b/source/Ox.UI/js/List/TableList.js
@@ -409,6 +409,7 @@ Ox.TableList = function(options, self) {
var pos;
self.$heads = [];
self.$titles = [];
+ self.$titleImages = [];
self.$orderButtons = [];
self.visibleColumns.forEach(function(column, i) {
var $resize;
@@ -449,19 +450,23 @@ Ox.TableList = function(options, self) {
})
.appendTo(self.$heads[i]);
if (column.titleImage) {
- self.$titles[i].append(
- $('').attr({
- src: Ox.UI.getImageURL('symbol' + Ox.toTitleCase(column.titleImage))
+ self.$titleImages[i] = $('').
+ attr({
+ src: Ox.UI.getImageURL(
+ 'symbol' + Ox.toTitleCase(column.titleImage)
+ )
})
- );
+ .appendTo(self.$titles[i]);
} else {
self.$titles[i].html(column.title);
}
if (column.operator) {
self.$orderButtons[i] = Ox.Button({
+ selectable: true,
style: 'symbol',
title: column.operator == '+' ? 'up' : 'down',
- type: 'image'
+ type: 'image',
+ value: true
})
.addClass('OxOrder')
.css({marginTop: (column.operator == '+' ? 1 : -1) + 'px'})
@@ -862,17 +867,27 @@ Ox.TableList = function(options, self) {
}
function toggleSelected(id) {
- var pos = getColumnPositionById(id);
+ var isSelected,
+ pos = getColumnPositionById(id);
if (pos > -1) {
updateOrder(id);
pos > 0 && self.$heads[pos].prev().children().eq(2).toggleClass('OxSelected');
self.$heads[pos].toggleClass('OxSelected');
self.$heads[pos].next().children().eq(0).toggleClass('OxSelected');
+ isSelected = self.$heads[pos].hasClass('OxSelected');
self.$titles[pos].css({
width: self.$titles[pos].width()
- + (self.$heads[pos].hasClass('OxSelected') ? -16 : 16)
+ + (isSelected ? -16 : 16)
+ 'px'
});
+ if (self.visibleColumns[pos].titleImage) {
+ self.$titleImages[pos].attr({
+ src: Ox.UI.getImageURL(
+ 'symbol' + Ox.toTitleCase(self.visibleColumns[pos].titleImage),
+ isSelected ? 'selected' : ''
+ )
+ });
+ }
}
}