fix column class name for table list cells
This commit is contained in:
parent
36bb42e7bd
commit
1b2c83e121
2 changed files with 7 additions and 4 deletions
|
@ -1284,11 +1284,14 @@ Ox.List = function(options, self) {
|
||||||
|
|
||||||
function triggerClickEvent(event, $item, $cell) {
|
function triggerClickEvent(event, $item, $cell) {
|
||||||
// event can be 'click' or 'edit'
|
// event can be 'click' or 'edit'
|
||||||
|
var key;
|
||||||
|
if ($cell) {
|
||||||
|
key = $cell.attr('class').split('OxColumn')[1].split(' ')[0];
|
||||||
|
key = key[0].toLowerCase() + key.slice(1);
|
||||||
|
}
|
||||||
that.triggerEvent(event, Ox.extend({
|
that.triggerEvent(event, Ox.extend({
|
||||||
id: $item.data('id')
|
id: $item.data('id')
|
||||||
}, $cell ? {
|
}, key ? {key: key} : {}));
|
||||||
key: $cell.attr('class').split('OxColumn')[1].split(' ')[0].toLowerCase()
|
|
||||||
} : {}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function triggerSelectEvent() {
|
function triggerSelectEvent() {
|
||||||
|
|
|
@ -536,7 +536,7 @@ Ox.TableList = function(options, self) {
|
||||||
$cell = $('<div>');
|
$cell = $('<div>');
|
||||||
}
|
}
|
||||||
$cell.addClass(
|
$cell.addClass(
|
||||||
'OxCell OxColumn' + Ox.toTitleCase(v.id)
|
'OxCell OxColumn' + v.id[0].toUpperCase() + v.id.slice(1)
|
||||||
+ (clickable ? ' OxClickable' : '')
|
+ (clickable ? ' OxClickable' : '')
|
||||||
+ (editable ? ' OxEditable' : '')
|
+ (editable ? ' OxEditable' : '')
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue