forked from 0x2620/oxjs
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
|
||||
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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue