diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index 944c64df..f2ab1bd7 100644 --- a/source/Ox.UI/js/List/TableList.js +++ b/source/Ox.UI/js/List/TableList.js @@ -101,6 +101,7 @@ Ox.TableList = function(options, self) { }, selected: function() { that.$body.options({selected: self.options.selected}); + // updateImages(); updateClearButton(); }, sort: function() { @@ -319,6 +320,7 @@ Ox.TableList = function(options, self) { that.editCell(data.id, data.key); } else if (event == 'select') { self.options.selected = data.ids; + // updateImages(); updateClearButton(); } that.triggerEvent(event, data); @@ -919,6 +921,24 @@ Ox.TableList = function(options, self) { } } + function updateImages() { + // FIXME: not yet used + that.$body.$element.find('img').each(function(i, element) { + var $element = $(element), + data = Ox.UI.getImageData($element.attr('src')); + if (data && data.color == 'selected') { + $element.attr({src: Ox.UI.getImageURL(data.name, 'default')}); + } + }); + that.$body.$element.find('.OxSelected img').each(function(i, element) { + var $element = $(element), + data = Ox.UI.getImageData($element.attr('src')); + if (data && data.color == 'default') { + $element.attr({src: Ox.UI.getImageURL(data.name, 'selected')}); + } + }); + } + function updateOrder(id) { var operator = self.options.sort[0].operator, pos = getColumnPositionById(id);