From 2fe30b6fa07f3491711f579c0e1fc1d9b41141a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 23 Jun 2021 09:53:26 -0400 Subject: [PATCH] feat: #9628, allow setting custom icon names --- public/src/modules/iconSelect.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/src/modules/iconSelect.js b/public/src/modules/iconSelect.js index 1808802350..17530cd05d 100644 --- a/public/src/modules/iconSelect.js +++ b/public/src/modules/iconSelect.js @@ -48,11 +48,16 @@ define('iconSelect', ['benchpress'], function (Benchpress) { var iconClass = $('.bootbox .selected').attr('class'); var categoryIconClass = $('
').addClass(iconClass).removeClass('fa').removeClass('selected') .attr('class'); + var searchElVal = picker.find('input').val(); if (categoryIconClass) { el.attr('class', 'fa ' + (doubleSize ? 'fa-2x ' : '') + categoryIconClass); el.val(categoryIconClass); el.attr('value', categoryIconClass); + } else if (searchElVal) { + el.attr('class', searchElVal); + el.val(searchElVal); + el.attr('value', searchElVal); } onModified(el);