add (still unused) private 'updateImages' method to Ox.TableList

This commit is contained in:
rolux 2012-12-29 17:43:03 +01:00
parent 79cd21c69d
commit 2bc41d180e

View file

@ -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);