The branch, master has been updated via 07ff69495bbb23dae1213b3b301da25ea7e9b851 (commit) from b924bc7c112f5ed6f80da7f195687ce632feacf9 (commit)
- Log ----------------------------------------------------------------- commit 07ff69495bbb23dae1213b3b301da25ea7e9b851 Author: Marc Delisle marc@infomarc.info Date: Thu Dec 9 13:26:05 2010 -0500
bug #3125624 Inline editing fails when just one row (fixed for LTR languages in horizontal and vertical modes)
-----------------------------------------------------------------------
Summary of changes: js/sql.js | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/js/sql.js b/js/sql.js index 57cb761..97cc42f 100644 --- a/js/sql.js +++ b/js/sql.js @@ -28,15 +28,23 @@ function getFieldName($this_field, disp_mode) {
if(disp_mode == 'vertical') { var field_name = $this_field.siblings('th').find('a').text(); + // happens when just one row (headings contain no a) + if ("" == field_name) { + field_name = $this_field.siblings('th').text(); + } } else { var this_field_index = $this_field.index(); if(window.parent.text_dir == 'ltr') { // 4 columns to account for the checkbox, edit, delete and appended inline edit anchors but index is zero-based so substract 3 - var field_name = $this_field.parents('table').find('thead').find('th:nth('+ (this_field_index-3 )+') a').text(); + var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+') a').text(); + // happens when just one row (headings contain no a) + if ("" == field_name) { + field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+')').text(); + } } else { - var field_name = $this_field.parents('table').find('thead').find('th:nth('+ this_field_index+') a').text(); + var field_name = $('#table_results').find('thead').find('th:nth('+ this_field_index+') a').text(); } }
hooks/post-receive