PageSourceSearch

https://trentofestival.it/wp-content/themes/trento-film-festival/s…?ver=cb49cff4-c604-4c4f-8c0c-ebb7f2e784b5

js trentofestival.it collected 2026-09-24 09:27:18 UTC 10,504 bytes, 326 lines download raw bytes

1;(function($) {
2
3    $(document).on('click', '.festival-movies a[data-view]', function(e) {
4        e.preventDefault();
5
6        $(this).siblings('a').removeClass('active');
7        $(this).addClass('active');
8
9        $('.view').removeClass('active');
10        $('.view[data-view="' + $(this).attr('data-view') + '"]').addClass('active');
11
12        if ($(this).hasClass('calendar')) {
13            var context = $('#tabs > ul a.tabulous_active');
14            context.trigger('click');
15        }
16
17        if (History.enabled) {
18            History.replaceState(null, document.title, $(this).attr('href'));
19        }
20
21        return false;
22    });
23
24    $(document).on('render', '.view.list', function(e, result) {
25        var container = $(this).find('ul.festival-movies-search-results');
26        container.empty();
27
28        $.each(result.ids, function(i, movie_id) {
29            container.append($(result.tokens[movie_id]));
30        });
31
32        if (!result.args || $.isEmptyObject(result.args)) {
33            container.append($(result.incomplete));
34        } else if (result.ids.length === 0) {
35            container.append($(result.empty));
36        } else if (!!result.pagination) {
37            container.append(result.pagination);
38        }
39    });
40
41    $(document).on('render', '.view.calendar', function(e, result) {
42        var view = $(this);
43
44        view.find('.audio_movies_page_wrapper').html(result.daybyday || '');
45
46        $.each(result.sections, function(room_id, section) {
47            view.find('div[data-section-id="' + room_id + '"]').html($(section.content).html());
48        });
49
50        var fallback = null;
51        view.find('div[data-section-id]').each(function() {
52            if (!fallback && result.sections[$(this).attr('data-section-id')].slots > 0) {
53                fallback = $(this).attr('id');
54            }
55        });
56
57        var context = $('#tabs > ul a.tabulous_active');
58        if (fallback) {
59            context = $('#tabs > ul a[href="#' + fallback + '"]');
60        }
61
62        context.trigger('click');
63    });
64
65    $(document).on('render', '.view.streaming', function(e, result) {
66        var view = $(this);
67        var results = view.find('.festival-movies-streaming-results');
68        results.empty().append(result.content);
69    });
70
71    $(document).on('mouseenter', '.movie-list-widgets .movie-note', function(e) {
72        $(this).tooltipster({
73            content: $(this).attr('title'),
74            trigger: 'custom',
75            triggerClose: {
76                mouseleave: true
77            }
78        });
79
80        $(this).tooltipster('instance').open();
81    });
82
83    $(document).on('mouseenter', '.list-stream', function(e) {
84        $(this).tooltipster({
85            content: $(this).find('> a').attr('title'),
86            trigger: 'custom',
87            triggerClose: {
88                mouseleave: true
89            }
90        });
91
92        $(this).tooltipster('instance').open();
93    });
94
95    $(document).on('click', '#thumbs-pagination .previous a, #thumbs-pagination .next a', function () {
96        $('.supports-progress-loading').append('<div class="overlay"></div>');
97
98        var url = $(this).attr('href');
99
100        $('#contains-awesome-thumbs').load(url + ' .awesome-thumbs', function () {
101            $('html, body').scrollTop($('.awesome-thumbs').offset().top - 64);
102
103            if (History.enabled) {
104                History.replaceState(null, document.title, url);
105            }
106
107            $('.supports-progress-loading .overlay').remove();
108        });
109
110        return false;
111    });
112
113    $(document).on('ready', function() {
114        var resume = null;
115
116        function subsume(form, component) {
117            resume = component;
118            form.submit();
119        }
120
121        function resetTextSearch(form) {
122            form.find('input.search').val('');
123        }
124
125        function resetSelectionFilters(form) {
126            form.find('select').val('');
127        }
128
129        function resetAlphabeticalFilters(form) {
130            form.find('input[type="radio"][value=""]').prop('checked', true);
131        }
132
133        $('.festival-movies-search').each(function() {
134            var form = $(this);
135
136            form.find('input.search').each(function() {
137                $(this).val($(this).attr('value'));
138            });
139
140            form.find('select').each(function() {
141                if ($(this).find('option[selected]').length === 1) {
142                    $(this).val($(this).find('option[selected]').val());
143                } else {
144                    $(this).val('');
145                }
146            });
147
148            form.on('resume', function() {
149                if (resume) {
150                    resume.focus();
151                }
152            });
153
154            var shouldResetFields = (form.closest('.avoid-resetting-fields').length === 0);
155
156            form.on('change', 'select', function() {
157                if (shouldResetFields) {
158                    resetTextSearch(form);
159                    resetAlphabeticalFilters(form);
160                }
161
162                subsume(form, $(this));
163            });
164
165            form.on('change', 'input[type="checkbox"]', function() {
166                subsume(form, $(this));
167            });
168
169            form.on('change', 'input[type="radio"]', function() {
170                if (shouldResetFields) {
171                    resetTextSearch(form);
172                    resetSelectionFilters(form);
173                }
174
175                subsume(form, $(this));
176            });
177
178            form.on('click', 'input[type="reset"]', function() {
179                resetTextSearch(form);
180                resetSelectionFilters(form);
181                subsume(form, $(this));
182            });
183
184            form.on('click', 'label.radio', function(e) {
185                var radio = $('#' + $(this).attr('for'));
186                if (radio.is(':checked')) {
187                    e.preventDefault();
188
189                    radio.prop('checked', false);
190                    subsume(form);
191
192                    return false;
193                }
194            });
195
196            form.find('input.search')
197                .on('keyup', function(e) {
198                    if (e.keyCode === 27) {
199                        $(this).val('');
200                        $(this).trigger('change');
201                    }
202                })
203                .on('change', function() {
204                    if ($(this).val().length === 0 || $(this).val().length > 2) {
205                        if (shouldResetFields) {
206                            resetSelectionFilters(form);
207                            resetAlphabeticalFilters(form);
208                        }
209
210                        subsume(form, $(this));
211                    }
212                });
213
214            if ($('html').hasClass('csstransitions')) {
215                form.on('submit', function(e) {
216                    e.preventDefault();
217
218                    if ($(this).hasClass('submitting')) {
219                        return false;
220                    }
221
222                    $(this).addClass('submitting');
223
224                    var data = {
225                        action: form.data('action-name'),
226                        _ajax_nonce: tff_movies_environment.nonce
227                    };
228
229                    if (!!form.data('action-nonce')) {
230                        data['_ajax_nonce'] = form.data('action-nonce');
231                    }
232
233                    var fields = form.serializeArray();
234                    $.each(fields, function(i, field) {
235                        data[field.name] = field.value;
236                    });
237
238                    form
239                        .find('input, select')
240                        .attr('disabled', 'true');
241
242                    form
243                        .closest('.supports-progress-loading')
244                        .append('<div class="overlay"></div>');
245
246                    $.post(tff_movies_environment.endpoint, data).done(function(result) {
247                        form
248                            .closest('.supports-progress-loading')
249                            .find('.overlay')
250                            .remove();
251
252                        var url = result.url;
253
254                        if (History.enabled) {
255                            History.replaceState(null, document.title, url);
256                        }
257
258                        if (result.tracking && form.closest('.view.list').length) {
259                            $(document).trigger('trackevent', {
260                                category: 'Festival/Movies/List',
261                                action: 'Search',
262                                label: result.tracking
263                            });
264                        }
265
266                        if (result.tracking && form.closest('.view.calendar').length) {
267                            $(document).trigger('trackevent', {
268                                category: 'Festival/Movies/Calendar',
269                                action: 'Search',
270                                label: result.tracking
271                            });
272                        }
273
274                        form
275                            .closest('.view')
276                            .trigger('render', result);
277
278                        form
279                            .find('input, select')
280                            .removeAttr('disabled');
281
282                        form.trigger('resume');
283                        form.removeClass('submitting');
284
285                        $(document).trigger("ajaxed");
286                    });
287
288                    return false;
289                });
290            }
291        });
292
293        $('.widget.search-film').each(function() {
294            var widget = $(this);
295
296            $(this).on('change', 'select', function() {
297                widget.find('input#keyword').val('');
298            });
299
300            $(this).on('change', 'input[type="checkbox"]', function() {
301                widget.find('select').val('');
302            });
303        });
304    });
305
306    $(document).on('ready', function() {
307        var fallback = null;
308        $('#tabs_container > div').each(function() {
309            if (!fallback && $(this).find('> section').length > 0) {
310                fallback = $(this).attr('id');
311            }
312        });
313
314        $('#tabs').tabulous({
315            effect: 'scale'
316        });
317
318        var context = $('#tabs > ul a.tabulous_active');
319        if (fallback) {
320            context = $('#tabs > ul a[href="#' + fallback + '"]');
321        }
322
323        context.trigger('click');
324    });
325
326})(jQuery);

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.