Skip to content

Commit

Permalink
add 'select all' link to apply unique columns form
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Lutsenko committed Nov 24, 2021
1 parent 1b9595e commit 3b6d01e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/assets/javascripts/import_apply_unique_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ $(document).ready(function () {
.attr('id', 'changes_unique_columns')
.attr('multiple', 'multiple')
.chosen({ width: '100%' });

// add select all button
let select_all_column = $('<a></a>').text('Select All').attr('id', 'select-all-unique-columns').attr('href', '#');
form.append(select_all_column);
select_all_column.click(function () {
form.find('select option').prop('selected', true).trigger('chosen:updated');
});
});
});

0 comments on commit 3b6d01e

Please sign in to comment.