From 1b2c83e12196535015fe038ab5cfbff379a66221 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 8 Feb 2013 17:38:24 +0530 Subject: [PATCH] fix column class name for table list cells --- source/Ox.UI/js/List/List.js | 9 ++++++--- source/Ox.UI/js/List/TableList.js | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index 81bc21b8..9ee6df75 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -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() { diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index f2ab1bd7..13aa5438 100644 --- a/source/Ox.UI/js/List/TableList.js +++ b/source/Ox.UI/js/List/TableList.js @@ -536,7 +536,7 @@ Ox.TableList = function(options, self) { $cell = $('
'); } $cell.addClass( - 'OxCell OxColumn' + Ox.toTitleCase(v.id) + 'OxCell OxColumn' + v.id[0].toUpperCase() + v.id.slice(1) + (clickable ? ' OxClickable' : '') + (editable ? ' OxEditable' : '') )