Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed inline onchange #13294

Merged
merged 1 commit into from Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions js/tbl_select.js
Expand Up @@ -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
*/
Expand Down
4 changes: 4 additions & 0 deletions js/tbl_structure.js
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions templates/table/search/column_comparison_operators.twig
@@ -1,4 +1,3 @@
<select name="criteriaColumnOperators[{{ search_index }}]"
onchange="changeValueFieldType(this, {{ search_index }})">
<select id="ColumnOperator{{ search_index }}" name="criteriaColumnOperators[{{ search_index }}]">
{{ type_operators|raw }}
</select>
2 changes: 1 addition & 1 deletion templates/table/structure/add_column.twig
Expand Up @@ -9,7 +9,7 @@
{{ 'Add %s column(s)'|trans|format(num_fields)|raw }}
<input type="hidden" name="field_where" value="after"/>&nbsp;
{# I tried displaying the drop-down inside the label but with Firefox the drop-down was blinking #}
<select name="after_field" onchange="checkFirst()">
<select name="after_field">
<option value="first" data-pos="first">
{% trans 'at beginning of table' %}
</option>
Expand Down