Skip to content

Commit

Permalink
minor cleanup of tags JS asset
Browse files Browse the repository at this point in the history
  • Loading branch information
Oaphi committed Dec 3, 2024
1 parent 9c7422f commit 2a7d8ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(() => {
return $(tagSpan + descSpan);
}

$('.js-tag-select').each((i, el) => {
$('.js-tag-select').each((_i, el) => {
const $tgt = $(el);
let $this;
const useIds = $tgt.attr('data-use-ids') === 'true';
Expand All @@ -46,7 +46,7 @@ $(() => {
},
headers: { 'Accept': 'application/json' },
delay: 100,
processResults: data => {
processResults: (data) => {
// (for the tour)
if (Number($this.data('tag-set')) === -1) {
return {
Expand Down Expand Up @@ -91,7 +91,7 @@ $(() => {
return synonymsString;
}

$('#add-tag-synonym').on('click', ev => {
$('#add-tag-synonym').on('click', (ev) => {
const $wrapper = $('#tag-synonyms-wrapper');
const lastId = $wrapper.children('.tag-synonym').last().attr('data-id');
const newId = parseInt(lastId, 10) + 1;
Expand Down Expand Up @@ -121,7 +121,7 @@ $(() => {
synonym.hide();
}

$('.js-add-required-tag').on('click', ev => {
$('.js-add-required-tag').on('click', (ev) => {
const $tgt = $(ev.target);
const useIds = $tgt.attr('data-use-ids') === 'true';
const tagId = $tgt.attr('data-tag-id');
Expand All @@ -137,7 +137,7 @@ $(() => {
}
});

$('.js-rename-tag').on('click', async ev => {
$('.js-rename-tag').on('click', async (ev) => {
const $tgt = $(ev.target).is('a') ? $(ev.target) : $(ev.target).parents('a');
const categoryId = $tgt.attr('data-category');
const tagId = $tgt.attr('data-tag');
Expand Down

0 comments on commit 2a7d8ac

Please sign in to comment.