PageSourceSearch

https://www.gerstaecker.ch/out/modules/smx_projectlist/js/smx_projectlist_main.js?1790318102

js gerstaecker.ch collected 2026-09-25 20:55:30 UTC 2,176 bytes, 58 lines download raw bytes

1let listObject = 0;
2
3function smxInitProjectListTrigger() {
4    // Select all project list popover triggers
5    const projectListTriggers = document.querySelectorAll('.smx_projectlist_popover_trigger');
6    
7    projectListTriggers.forEach(trigger => {
8        trigger.addEventListener('click', function(event) {
9            // Check for disabled class using vanilla JS
10            if (this.classList.contains('disabled')) {
11                return false;
12            }
13            
14            // Find next sibling with class listObject using vanilla JS
15            listObject = this.nextElementSibling && 
16                         this.nextElementSibling.classList.contains('listObject') 
17                         ? this.nextElementSibling 
18                         : null;
19            
20            // Use existing jQuery Fancybox (keeping jQuery plugin)
21            $.fancybox({
22                type: 'ajax',
23                title: null,
24                closeBtn: true,
25                closeClick: false,
26                href: '/index.php?cl=ProjectListWidget&tpl=smx_projectlist_popover_container.html.twig'
27            });
28            
29            return false;
30        });
31    });
32    
33    // Handle input keypress
34    const apInputs = document.querySelectorAll('input[name=ap]');
35    apInputs.forEach(input => {
36        input.addEventListener('keypress', function(event) {
37            if (event.keyCode === 13) {
38                event.stopImmediatePropagation();
39                event.stopPropagation();
40                event.preventDefault();
41                
42                // Find and trigger the project list trigger in parent
43                const parentElement = this.parentElement;
44                const projectListTrigger = parentElement.querySelector('.smx_projectlist_popover_trigger');
45                
46                if (projectListTrigger) {
47                    projectListTrigger.click();
48                }
49            }
50        });
51    });
52}
53
54// Document ready equivalent in vanilla JS
55document.addEventListener('DOMContentLoaded', smxInitProjectListTrigger);
56
57// jQuery ajaxComplete equivalent
58$(document).on('ajaxComplete', smxInitProjectListTrigger);

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.