PageSourceSearch

https://www.rosier.de/wp-content/plugins/employee-staff-directory/assets/js/views.js?ver=1.2.1

js rosier.de collected 2026-10-02 18:03:16 UTC 6,981 bytes, 198 lines download raw bytes

1jQuery(document).ready(function(){
2    jQuery('.multi-field-wrapper').each(function() {
3        var jQuerywrapper = jQuery('.multi-fields', this);
4        jQuery(".add-field", jQuery(this)).click(function(e) {
5            jQuery('.multi-field:first-child', jQuerywrapper).clone(true).appendTo(jQuerywrapper).find('input').val('').focus();
6        });
7        jQuery('.multi-field .remove-field', jQuerywrapper).click(function() {
8            if (jQuery('.multi-field', jQuerywrapper).length > 1) {
9                jQuery(this).parent('.multi-field').remove();
10            } else {
11                jQuery('#input-stuff').val('');
12            }
13        });
14    });
15
16    jQuery('.live-search-list li').each(function(){
17        jQuery(this).attr('data-search-term', jQuery(this).text().toLowerCase());
18    });
19
20    jQuery('.live-search-box').on('keyup', function(){
21        const searchTerm = jQuery(this).val().toLowerCase();
22
23        jQuery('.live-search-list li').each(function(){
24            (jQuery(this).filter('[data-search-term *= ' + searchTerm + ']').length > 0 || searchTerm.length < 1)
25                ? jQuery(this).show()
26                : jQuery(this).hide();
27        });
28    });
29
30    jQuery.expr.pseudos.regex = jQuery.expr.createPseudo(function (expression) {
31        return function (elem) {
32            var matchParams = expression.split(','),
33                validLabels = /^(data|css):/,
34                attr = {
35                    method: matchParams[0].match(validLabels) ?
36                        matchParams[0].split(':')[0] : 'attr',
37                    property: matchParams.shift().replace(validLabels, '')
38                },
39                regexFlags = 'ig',
40                regex = new RegExp(matchParams.join('').replace(/^\s+|\s+$/g, ''), regexFlags);
41            return regex.test(jQuery(elem)[attr.method](attr.property));
42        }
43    });
44
45    if(jQuery("input:regex(id,#*in-employee-directory-gender-.*)")) {
46        var inputs=jQuery("input:regex(id,#*in-employee-directory-gender-.*)");
47
48        for(input of inputs){
49            input.type="radio"
50        }
51    }
52
53});
54
55
56function mo_empdir_tabs(id){
57    document.cookie = 'selected_tab='+id;
58    if( id !== 'add-custom-field') {
59        jQuery('#employee-dir-add-custom-fields').hide()
60        jQuery('#add-custom-field').removeClass('active')
61        jQuery('#employee-dir-add-category').show()
62        jQuery('#add-category').addClass('active')
63    } else {
64        jQuery('#employee-dir-add-custom-fields').show()
65        jQuery('#add-custom-field').addClass('active')
66        jQuery('#employee-dir-add-category').hide()
67        jQuery('#add-category').removeClass('active')
68    }
69}
70
71function setValue(id){
72    // id.parentElement.innerText=id.value;
73    let html_to_insert="<span>"+ id.parentElement.id +"="+"'"+id.value+"'"+"</span> ";
74    const container = document.getElementById('custom-copy-shrtcd');
75    const text=id.parentElement.id;
76    var i=0;
77
78    if( (id.value !=="Select")) {
79        if (container.textContent.includes(text)) {
80            let element = "<span>" + text + "='" + getCookie(text) + "'</span>";
81            container.innerHTML = container.innerHTML.replace(element, html_to_insert);
82        } else {
83            document.getElementById('custom-copy-shrtcd').insertAdjacentHTML('beforeend', html_to_insert);
84        }
85
86        setCookie(text,id.value,7)
87    } else {
88
89        let element = "<span>" + text + "='" + getCookie(text) + "'</span>";
90        container.innerHTML = container.innerHTML.replace(element,'');
91    }
92}
93function sethiddenshortcode() {
94    document.getElementById('custom_created_shortcode').value= document.getElementById("custom-copy-shrtcd-code").innerText;
95}
96function copyShortcode(id){
97    var copyText = document.getElementById(id);
98    navigator.clipboard.writeText(copyText.innerText)
99    var tooltip = document.getElementById("custom-copy-shrtcd-tooltip");
100    tooltip.innerHTML = "Copied";
101}
102
103function copyShortcode_gen(id) {
104    var element=document.getElementById('code'+id);
105    navigator.clipboard.writeText(element.innerText);
106    var tooltip = document.getElementById("codes"+id);
107    tooltip.innerHTML = "Copied";
108
109}
110function setCookie(name,value,days) {
111    var expires = "";
112    if (days) {
113        var date = new Date();
114        date.setTime(date.getTime() + (days*24*60*60*1000));
115        expires = "; expires=" + date.toUTCString();
116    }
117    document.cookie = name + "=" + (value || "")  + expires + "; path=/";
118}
119function getCookie(name) {
120    var nameEQ = name + "=";
121    var ca = document.cookie.split(';');
122    for(var i=0;i < ca.length;i++) {
123        var c = ca[i];
124        while (c.charAt(0)==' ') c = c.substring(1,c.length);
125        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
126    }
127    return null;
128}
129
130function emdir_copy_display(id){
131    id.style.display="block";
132}
133function emdir_copy_display_off(id){
134    id.style.display="none";
135    id.innerText = "Click to Copy";
136}
137
138function divimg(img) {
139    document.getElementById("divimg-layout").src=img;
140}
141
142function mo_empdir_tabs_visibility(id){
143    document.cookie = 'visibility_tab_content='+id;
144    if( id !== 'category_visibility') {
145        jQuery('#category_visibility').hide()
146        jQuery('#category_visibility_tab').removeClass('active')
147        jQuery('#custom_fields_visibility').show()
148        jQuery('#custom_fields_visibility_tab').addClass('active')
149    } else {
150        jQuery('#category_visibility').show()
151        jQuery('#category_visibility_tab').addClass('active')
152        jQuery('#custom_fields_visibility').hide()
153        jQuery('#custom_fields_visibility_tab').removeClass('active')
154    }
155}
156
157
158function mo_support_widget_open() {
159    var contact_text = jQuery(".mo-empdir-contact-container");
160    var contact_form = jQuery("#mo_support_widget");
161    if(contact_text.is(":hidden")){
162        contact_text.show();
163        contact_form.slideToggle();
164    } else {
165        contact_text.hide();
166        contact_form.slideToggle();
167    }
168}
169function close_widget(){
170    var mod = document.getElementById('mo_support_widget');
171    mod.style.display='none';
172}
173
174function mo_empdir_click_to_copy(id) {
175    var copyText = document.getElementById("input-shortcode-"+id);
176    copyText.select();
177    copyText.setSelectionRange(0, 99999);
178    navigator.clipboard.writeText(copyText.value);
179
180    var tooltip = document.getElementById("copy-dis-"+id);
181    tooltip.innerHTML = "Copied";
182}
183
184function emdir_copy_display_col(id){
185    document.getElementById("copy-dis-"+id).style.display="block";
186}
187function emdir_copy_display_off_col(id){
188    document.getElementById("copy-dis-"+id).style.display="none";
189    var tooltip = document.getElementById("copy-dis-"+id);
190    tooltip.innerHTML = "Click to Copy";
191}
192
193function taxonomy_category_select() {
194    var e = document.getElementById('taxonomy_dropdown_filter');
195    var selected_taxonomy = e.value;
196    document.cookie = 'selected_taxonomy='+selected_taxonomy;
197    location.reload()
198}

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.