fix column class name for table list cells

This commit is contained in:
rolux 2013-02-08 17:38:24 +05:30
parent 36bb42e7bd
commit 1b2c83e121
2 changed files with 7 additions and 4 deletions

View file

@ -1284,11 +1284,14 @@ Ox.List = function(options, self) {
function triggerClickEvent(event, $item, $cell) {
// 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({
id: $item.data('id')
}, $cell ? {
key: $cell.attr('class').split('OxColumn')[1].split(' ')[0].toLowerCase()
} : {}));
}, key ? {key: key} : {}));
}
function triggerSelectEvent() {

View file

@ -536,7 +536,7 @@ Ox.TableList = function(options, self) {
$cell = $('<div>');
}
$cell.addClass(
'OxCell OxColumn' + Ox.toTitleCase(v.id)
'OxCell OxColumn' + v.id[0].toUpperCase() + v.id.slice(1)
+ (clickable ? ' OxClickable' : '')
+ (editable ? ' OxEditable' : '')
)