From d5e32c351a0d74646e6493d23c4d7c777b1a0080 Mon Sep 17 00:00:00 2001 From: Manish Bisht Date: Thu, 1 Jun 2017 21:31:55 +0530 Subject: [PATCH] remove inline onchange Signed-off-by: Manish Bisht --- js/tbl_select.js | 7 +++++++ js/tbl_structure.js | 4 ++++ templates/table/search/column_comparison_operators.twig | 3 +-- templates/table/structure/add_column.twig | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/js/tbl_select.js b/js/tbl_select.js index 7a9ca5e5ad..8f47142af8 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -81,6 +81,13 @@ AJAX.registerOnload('tbl_select.js', function () { return false; }); + var tableRows = $('#fieldset_table_qbe select'); + $.each(tableRows, function(index, item){ + $(item).on("change", function() { + changeValueFieldType(this, index); + }); + }); + /** * Ajax event handler for Table search */ diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 8999aea700..2705a0559a 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -503,6 +503,10 @@ AJAX.registerOnload('tbl_structure.js', function () { $.post(url, params, AJAX.responseHandler); }); }); + + $(document).on('change', 'select[name=after_field]', function () { + checkFirst(); + }); }); /** Handler for "More" dropdown in structure table rows */ diff --git a/templates/table/search/column_comparison_operators.twig b/templates/table/search/column_comparison_operators.twig index 50d23175aa..b72e530c88 100644 --- a/templates/table/search/column_comparison_operators.twig +++ b/templates/table/search/column_comparison_operators.twig @@ -1,4 +1,3 @@ - {{ type_operators|raw }} diff --git a/templates/table/structure/add_column.twig b/templates/table/structure/add_column.twig index ba15f55cfe..5a81002cba 100644 --- a/templates/table/structure/add_column.twig +++ b/templates/table/structure/add_column.twig @@ -9,7 +9,7 @@ {{ 'Add %s column(s)'|trans|format(num_fields)|raw }}   {# I tried displaying the drop-down inside the label but with Firefox the drop-down was blinking #} -