bug #3125624 - fix for RTL languages

This commit is contained in:
Marc Delisle
2010-12-10 13:22:48 -05:00
parent 07ff69495b
commit b71529bb72

View File

@@ -35,7 +35,8 @@ function getFieldName($this_field, disp_mode) {
}
else {
var this_field_index = $this_field.index();
if(window.parent.text_dir == 'ltr') {
// ltr or rtl direction does not impact how the DOM was generated
//
// 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 = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+') a').text();
// happens when just one row (headings contain no a)
@@ -43,10 +44,6 @@ function getFieldName($this_field, disp_mode) {
field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+')').text();
}
}
else {
var field_name = $('#table_results').find('thead').find('th:nth('+ this_field_index+') a').text();
}
}
field_name = $.trim(field_name);