From e47b2132368cce14d83e6ccf59f3f8ac9068e2be Mon Sep 17 00:00:00 2001 From: ninadsp Date: Fri, 30 Jul 2010 20:10:10 +0530 Subject: [PATCH] In inline edit, when getting the field name, ignore the column comments. --- js/sql.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/sql.js b/js/sql.js index 545ae1b60..14215b49d 100644 --- a/js/sql.js +++ b/js/sql.js @@ -8,16 +8,16 @@ function getFieldName(this_field_obj, disp_mode) { if(disp_mode == 'vertical') { - var field_name = $(this_field_obj).siblings('th').text(); + var field_name = $(this_field_obj).siblings('th').find('a').text(); } else { var this_field_index = $(this_field_obj).index(); if(window.parent.text_dir == 'ltr') { // 3 columns to account for the checkbox, edit and delete anchors - var field_name = $(this_field_obj).parents('table').find('thead').find('th:nth('+ (this_field_index-3 )+')').text(); + var field_name = $(this_field_obj).parents('table').find('thead').find('th:nth('+ (this_field_index-3 )+') a').text(); } else { - var field_name = $(this_field_obj).parents('table').find('thead').find('th:nth('+ this_field_index+')').text(); + var field_name = $(this_field_obj).parents('table').find('thead').find('th:nth('+ this_field_index+') a').text(); } } @@ -358,4 +358,4 @@ $(document).ready(function() { }; }) }) // End After editing, clicking again should post data -}) \ No newline at end of file +})