Skip to content

Commit

Permalink
Merge pull request #2435 from Martchus/enable-regex-in-all-admin-tables
Browse files Browse the repository at this point in the history
Enable regex search in 'Medium types' table
  • Loading branch information
Martchus committed Oct 25, 2019
2 parents 5e4e901 + f90c607 commit 8c3a5ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/javascripts/admintable.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function renderEditableAdminTableActions(data, type, row, meta) {
}
}

function setupAdminTable(isAdmin, enableRegexForFiltering) {
function setupAdminTable(isAdmin) {
// adjust sorting so empty strings come last
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
'empty-string-last-asc': function(str1, str2) {
Expand Down Expand Up @@ -439,7 +439,7 @@ function setupAdminTable(isAdmin, enableRegexForFiltering) {
columns: columns,
columnDefs: columnDefs,
search: {
regex: enableRegexForFiltering,
regex: true,
},
});
dataTable.rowData = [];
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/machine/index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% title 'Machines';

% content_for 'ready_function' => begin
setupAdminTable(<%= is_admin_js %>, true);
setupAdminTable(<%= is_admin_js %>);
% end

<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/product/index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% title 'Medium types';

% content_for 'ready_function' => begin
setupAdminTable(<%= is_admin_js %>, false);
setupAdminTable(<%= is_admin_js %>);
% end

<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/test_suite/index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% title 'Test suites';

% content_for 'ready_function' => begin
setupAdminTable(<%= is_admin_js %>, true);
setupAdminTable(<%= is_admin_js %>);
% end

<div class="row">
Expand Down

0 comments on commit 8c3a5ec

Please sign in to comment.