bug #3125624 - fix for RTL languages
This commit is contained in:
17
js/sql.js
17
js/sql.js
@@ -35,16 +35,13 @@ function getFieldName($this_field, disp_mode) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var this_field_index = $this_field.index();
|
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();
|
// 4 columns to account for the checkbox, edit, delete and appended inline edit anchors but index is zero-based so substract 3
|
||||||
// happens when just one row (headings contain no a)
|
var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+') a').text();
|
||||||
if ("" == field_name) {
|
// happens when just one row (headings contain no a)
|
||||||
field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+')').text();
|
if ("" == field_name) {
|
||||||
}
|
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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user