add titleImage option to TextList columns
This commit is contained in:
parent
b056a22172
commit
bf9f14cf03
2 changed files with 12 additions and 8 deletions
|
@ -16,6 +16,7 @@ Ox.TextList <f:Ox.Element> TextList Object
|
||||||
map <f> function that maps values to sort values
|
map <f> function that maps values to sort values
|
||||||
operator <s> default sort operator
|
operator <s> default sort operator
|
||||||
title <s> ...
|
title <s> ...
|
||||||
|
titleImage <s> ...
|
||||||
unique <b> If true, this column acts as unique id
|
unique <b> If true, this column acts as unique id
|
||||||
visible <b> ...
|
visible <b> ...
|
||||||
width <n> ...
|
width <n> ...
|
||||||
|
@ -346,8 +347,16 @@ Ox.TextList = function(options, self) {
|
||||||
width: self.columnWidths[i] - 9 + 'px',
|
width: self.columnWidths[i] - 9 + 'px',
|
||||||
textAlign: column.align
|
textAlign: column.align
|
||||||
})
|
})
|
||||||
.html(column.title)
|
|
||||||
.appendTo(self.$heads[i]);
|
.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) {
|
if (column.operator) {
|
||||||
self.$orderButtons[i] = Ox.Button({
|
self.$orderButtons[i] = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
|
|
|
@ -69,13 +69,8 @@ Ox.ListMap = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'countryCode',
|
id: 'countryCode',
|
||||||
resizable: false, // fixme: implement
|
resizable: false, // fixme: implement
|
||||||
/*
|
title: 'Flag',
|
||||||
// fixme: why does this not work? it does in folderBrowserList
|
titleImage: 'flag',
|
||||||
title: $('<img>').attr({
|
|
||||||
src: Ox.UI.getImageURL('symbolFlag')
|
|
||||||
}),
|
|
||||||
*/
|
|
||||||
title: '\u2691',
|
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 16
|
width: 16
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue