diff options
Diffstat (limited to 'client/lib')
-rw-r--r-- | client/lib/utils.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js index 24ff830a..525cfb83 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -188,23 +188,24 @@ Utils = { } else if (matomo) { window._paq.push(['trackPageView']); } + }, getTriggerActionDesc(event, tempInstance) { const jqueryEl = tempInstance.$(event.currentTarget.parentNode); - const triggerEls = jqueryEl.find(".trigger-content").children(); - let finalString = ""; + const triggerEls = jqueryEl.find('.trigger-content').children(); + let finalString = ''; for (let i = 0; i < triggerEls.length; i++) { const element = tempInstance.$(triggerEls[i]); - if (element.hasClass("trigger-text")) { + if (element.hasClass('trigger-text')) { finalString += element.text().toLowerCase(); - } else if (element.find("select").length > 0) { - finalString += element.find("select option:selected").text().toLowerCase(); - } else if (element.find("input").length > 0) { - finalString += element.find("input").val(); + } else if (element.find('select').length > 0) { + finalString += element.find('select option:selected').text().toLowerCase(); + } else if (element.find('input').length > 0) { + finalString += element.find('input').val(); } // Add space - if (i != length - 1) { - finalString += " "; + if (i !== length - 1) { + finalString += ' '; } } return finalString; |