add titleImage option to TextList columns

This commit is contained in:
rlx 2011-11-03 12:57:46 +00:00
parent b056a22172
commit bf9f14cf03
2 changed files with 12 additions and 8 deletions

View file

@ -16,6 +16,7 @@ Ox.TextList <f:Ox.Element> TextList Object
map <f> function that maps values to sort values
operator <s> default sort operator
title <s> ...
titleImage <s> ...
unique <b> If true, this column acts as unique id
visible <b> ...
width <n> ...
@ -346,8 +347,16 @@ Ox.TextList = function(options, self) {
width: self.columnWidths[i] - 9 + 'px',
textAlign: column.align
})
.html(column.title)
.appendTo(self.$heads[i]);
if (column.titleImage) {
self.$titles[i].append(
$('<img>').attr({
src: Ox.UI.getImageURL('symbol' + Ox.toTitleCase(column.titleImage))
})
)
} else {
self.$titles[i].html(column.title);
}
if (column.operator) {
self.$orderButtons[i] = Ox.Button({
style: 'symbol',

View file

@ -69,13 +69,8 @@ Ox.ListMap = function(options, self) {
},
id: 'countryCode',
resizable: false, // fixme: implement
/*
// fixme: why does this not work? it does in folderBrowserList
title: $('<img>').attr({
src: Ox.UI.getImageURL('symbolFlag')
}),
*/
title: '\u2691',
title: 'Flag',
titleImage: 'flag',
visible: true,
width: 16
},