PageSourceSearch

https://www.innovationsrat.de/_assets/a39dd6e0e3b3ed4dff6c17805056b0fc/JavaScript/publications.js?1779175589

js innovationsrat.de collected 2026-09-30 16:26:01 UTC 2,361 bytes, 68 lines download raw bytes

1$(function() {
2
3    // Publication form modal
4    $('#publication-form-modal').on('show.bs.modal', function(event) {
5        var link = $(event.relatedTarget);
6        var publication = link.data('publication');
7        var modal = $(this);
8
9        modal.find('#publication-prefill').val(publication).selectpicker('refresh');
10    });
11
12    // Publication form
13    $("#publication-prefill").on('change', function(e) {
14        var $images = $(this).parents('.card').find('.publication-cover-item');
15        var $currentImage = $(this).parents('.card').find('#publication-cover-' + $(this).val());
16
17        if (!$currentImage.find('img').hasClass('lazy')) {
18            $currentImage.find('img').addClass('lazy lazyload');
19        }
20
21        $images.removeClass('d-block').addClass('d-none');
22        $currentImage.removeClass('d-none').addClass('d-block');
23    });
24
25    $('#publication-form').on('submit', function(e) {
26        e.preventDefault();
27
28        var form = $(this)
29        var post_url = $(this).attr("action");
30        var form_data = $(this).serialize();
31
32        $.post(post_url, form_data, function(response) {
33            if ($(response).find('#publication-thank-you').length > 0) {
34                form.html($(response).find('#publication-thank-you'));
35            } else {
36                form.html($(response).find('#publication-form').html());
37                $('.custompicker').selectpicker({
38                    width: 'css-width',
39                    maxOptions: 1
40                });
41
42                const element = form.find('.recaptcha').get(0);
43                const sitekey = $(element).data('sitekey');
44                const size = $(element).data('size') || 'invisible';
45                const callback = $(element).data('callback');
46
47                const widgetId = grecaptcha.render(element, {
48                    sitekey,
49                    size,
50                    callback
51                });
52
53                form.data('widget-id', widgetId);
54            }
55        });
56    });
57
58    $('.ga-eventtracking').click(function(e) {
59        if (dataLayer != undefined) {
60            dataLayer.push({
61                'event': $(this).data('ga-eventtracking-event'),
62                'type': $(this).data('ga-eventtracking-type'),
63                'title': $(this).data('ga-eventtracking-title'),
64            });
65        }
66    });
67
68});

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.