Lines Matching refs:element

150   webtrees.pasteAtCursor = function (element, text) {  argument
151 if (element !== null) {
152 const caret_pos = element.selectionStart + text.length;
153 const textBefore = element.value.substring(0, element.selectionStart);
154 const textAfter = element.value.substring(element.selectionEnd);
155 element.value = textBefore + text + textAfter;
156 element.setSelectionRange(caret_pos, caret_pos);
157 element.focus();
556 webtrees.persistentToggle = function (element) { argument
557 const key = 'state-of-' + element.dataset.wtPersist;
561 const current_state = element.getAttribute('aria-expanded') ?? element.checked.toString();
565 element.click();
569 element.addEventListener('click', function () {
570 if (element.type === 'checkbox') {
571 localStorage.setItem(key, element.checked.toString());
573 if (element.type === 'button') {
574 localStorage.setItem(key, element.getAttribute('aria-expanded'));
659 const element = row_group.querySelector('select');
660 const extra = element.options[element.selectedIndex].value.replace(/@/g, '');
761 webtrees.initializeTomSelect = function (element) { argument
762 if (element.tomselect) {
763 return element.tomselect;
766 if (element.dataset.wtUrl) {
774 …no_results: (data, escape) => '<div class="no-results">' + element.dataset.wtI18nNoResults + '</di…
776 firstUrl: query => element.dataset.wtUrl + '&query=' + encodeURIComponent(query),
790 if (!element.required) {
794 return new TomSelect(element, options);
797 if (element.multiple) {
798 return new TomSelect(element, { plugins: ['caret_position', 'remove_button'] });
801 if (!element.required) {
802 return new TomSelect(element, { plugins: ['clear_button'] });
805 return new TomSelect(element, { });
832 … container.querySelectorAll('.select-record').forEach(element => element.classList.add('d-none'));
833 …container.querySelectorAll('.select-' + select.value).forEach(element => element.classList.remove(…
836 container.querySelectorAll('.select-record select').forEach(element => {
837 element.disabled = true;
838 if (element.matches('.tom-select')) {
839 element.tomselect.disable();
842 container.querySelectorAll('.select-' + select.value + ' select').forEach(element => {
843 element.disabled = false;
844 if (element.matches('.tom-select')) {
845 element.tomselect.enable();
888 event.target.querySelectorAll('textarea[data-wt-pattern]').forEach(function (element) { argument
889 const pattern = new RegExp('^' + element.dataset.wtPattern + '$');
891 if (!element.readOnly && element.value !== '' && !pattern.test(element.value)) {
894 element.classList.add('is-invalid');
895 element.scrollIntoView();
897 element.classList.remove('is-invalid');
924 …document.querySelectorAll('.tom-select').forEach(element => webtrees.initializeTomSelect(element));
929 .forEach(function (element) { argument
930 element.addEventListener('clear', function () {
931 webtrees.resetTomSelect(element.tomselect, '', '');
944 document.querySelectorAll('table.datatables').forEach(function (element) { argument
945 new DataTable(element);
946 element.classList.remove('d-none');
951 .forEach((element) => webtrees.persistentToggle(element));
1054 const element = target.closest(target.dataset.wtFullscreen); constant
1056 if (document.fullscreenElement === element) {
1060 element.requestFullscreen()