Widget:GroupSelect: mudanças entre as edições

sem sumário de edição
Sem resumo de edição
Sem resumo de edição
Linha 1: Linha 1:
<div class="selectwithSearch__container<!--{$id|default:''|escape:'html'}-->">
<div class="selectwithSearch__container <!--{$id|default:''|escape:'html'}-->">
     <div class="selectwithSearch__selectBtn<!--{$id|default:''|escape:'html'}-->">
     <div class="selectwithSearch__selectBtn <!--{$id|default:''|escape:'html'}-->">
       <span>Selecione a frase desejada</span>
       <span>Selecione a frase desejada</span>
       <svg width="24" height="24" fill="#000" viewBox="0 0 16 16">
       <svg width="24" height="24" fill="#000" viewBox="0 0 16 16">
Linha 18: Linha 18:
       </div>
       </div>


       <ul class="selectwithSearch__options<!--{$id|default:''|escape:'html'}-->"></ul>
       <ul class="selectwithSearch__options <!--{$id|default:''|escape:'html'}-->"></ul>
     </div>
     </div>
</div>
</div>
Linha 28: Linha 28:


<script>
<script>
const wrapper<!--{$id|default:''|escape:'html'}--> = document.querySelector(".selectwithSearch__container<!--{$id|default:''|escape:'html'}-->"),
const wrapper<!--{$id|default:''|escape:'html'}--> = document.querySelector(".selectwithSearch__container <!--{$id|default:''|escape:'html'}-->"),
     selectBtn<!--{$id|default:''|escape:'html'}--> = wrapper<!--{$id|default:''|escape:'html'}-->.querySelector(".selectwithSearch__selectBtn<!--{$id|default:''|escape:'html'}-->"),
     selectBtn<!--{$id|default:''|escape:'html'}--> = wrapper<!--{$id|default:''|escape:'html'}-->.querySelector(".selectwithSearch__selectBtn <!--{$id|default:''|escape:'html'}-->"),
     searchInp<!--{$id|default:''|escape:'html'}--> = wrapper<!--{$id|default:''|escape:'html'}-->.querySelector("#input-<!--{$id|default:''|escape:'html'}-->"),
     searchInp<!--{$id|default:''|escape:'html'}--> = wrapper<!--{$id|default:''|escape:'html'}-->.querySelector("#input-<!--{$id|default:''|escape:'html'}-->"),
     options<!--{$id|default:''|escape:'html'}--> = wrapper<!--{$id|default:''|escape:'html'}-->.querySelector(".selectwithSearch__options<!--{$id|default:''|escape:'html'}-->");
     options<!--{$id|default:''|escape:'html'}--> = wrapper<!--{$id|default:''|escape:'html'}-->.querySelector(".selectwithSearch__options <!--{$id|default:''|escape:'html'}-->");


function addOptions(selectedOpt) {
function addOptions(selectedOpt) {