PageSourceSearch

https://www.lostallo.ch/templates/yoo_avanti/js/theme.js

js lostallo.ch collected 2026-10-02 21:21:09 UTC 2,175 bytes, 63 lines download raw bytes

1/* Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */
2
3jQuery(function($) {
4
5    // Options
6    var config = $('html').data('config') || {},
7        navbar = $('.tm-navbar');
8
9    // Centered dropdown
10    navbar.find('.uk-dropdown').addClass('uk-dropdown-center');
11
12    // Trigger focus on search input
13    $(".tm-search-button").on('click', UIkit.Utils.debounce(function () {
14        this.parentNode.querySelector('.uk-search-field').focus();
15    }, 300));
16
17    // Delete grid-divider border on first item in row
18    $('.uk-grid.tm-grid-divider').each(function() {
19        var $this = $(this),
20            items = $this.children().filter(':visible'), pos;
21
22        if (items.length > 0) {
23            pos_cache = items.first().position().left;
24
25            UIkit.$win.on('load resize', UIkit.Utils.debounce((function(fn) {
26
27                fn = function () {
28
29                    items.each(function() {
30
31                        pos = $(this).position();
32
33                        $(this)[pos.left == pos_cache ? 'addClass':'removeClass']('uk-row-first');
34                    });
35
36                    return fn;
37                }
38
39                return fn();
40
41            })(), 80));
42        }
43
44    });
45    
46    // Convert Forms attivazione campo obbligatorio solo per Comune di Roveredo
47    /*if (window.location.hostname.indexOf("roveredo.ch") !== -1) {
48        document.querySelectorAll(".custom-field").forEach(function (el) {
49            el.classList.remove("cf-hide");
50        });
51    } else {
52        // Su tutti gli altri siti: il campo resta nascosto, ma va tolto il required
53        // di base impostato da Convert Forms, altrimenti il browser blocca l'invio
54        // del form (campo required non focusable perché nascosto)
55        document.querySelectorAll(".custom-field").forEach(function (el) {
56            el.removeAttribute("data-required");
57        });
58        document.querySelectorAll(".custom-field input, .custom-field select, .custom-field textarea").forEach(function (input) {
59            input.removeAttribute("required");
60            input.removeAttribute("aria-required");
61        });
62    }*/
63});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.