PageSourceSearch

https://www.patrimoine-frb.be/sites/www.erfgoed-kbs.be/themes/erfgoed/script-all.js?tdtzis

js patrimoine-frb.be collected 2026-10-02 10:05:52 UTC 22,021 bytes, 555 lines download raw bytes

1(function ($) {
2  Drupal.behaviors.disabledate = {
3    attach: function (context, settings) {
4      var d = new Date();
5      var year = d.getFullYear();
6      var month = d.getMonth() + 1;
7      var day = d.getDate();
8
9      var months = new Array();
10      months[1] = Drupal.t('Jan');
11      months[2] = Drupal.t('Feb');
12      months[3] = Drupal.t('Mar');
13      months[4] = Drupal.t('Apr');
14      months[5] = Drupal.t('May');
15      months[6] = Drupal.t('Jun');
16      months[7] = Drupal.t('Jul');
17      months[8] = Drupal.t('Aug');
18      months[9] = Drupal.t('Sep');
19      months[10] = Drupal.t('Oct');
20      months[11] = Drupal.t('Nov');
21      months[12] = Drupal.t('Dec');
22
23      // for NL version
24
25      // start date.
26
27      $('#edit-submitted-praktische-gegevens-startdatum-year').change(function () {
28
29        if ($('#edit-submitted-praktische-gegevens-startdatum-year').val() == year) {
30          $('#edit-submitted-praktische-gegevens-startdatum-month > option').each(function () {
31
32            if (this.value < month && this.value.match(/^\d+$/)) {
33              var $thisOption = $(this);
34              $thisOption.remove();
35            }
36          });
37        }
38        else {
39          var first_option = $("#edit-submitted-praktische-gegevens-startdatum-month").find('option:eq(1)').val();
40
41          for (var i = first_option - 1; i > 0; i--) {
42            $("#edit-submitted-praktische-gegevens-startdatum-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
43          }
44        }
45      });
46
47      $('#edit-submitted-praktische-gegevens-startdatum-month, #edit-submitted-praktische-gegevens-startdatum-year').change(function () {
48        if ($('#edit-submitted-praktische-gegevens-startdatum-year').val() == year && $('#edit-submitted-praktische-gegevens-startdatum-month').val() == month) {
49          $('#edit-submitted-praktische-gegevens-startdatum-day > option').each(function () {
50
51            if (this.value < day && this.value.match(/^\d+$/)) {
52              var $thisOption = $(this);
53              $thisOption.remove();
54            }
55          });
56        }
57        else {
58          var first_option = $("#edit-submitted-praktische-gegevens-startdatum-day").find('option:eq(1)').val();
59
60          for (var i = first_option - 1; i > 0; i--) {
61            $("#edit-submitted-praktische-gegevens-startdatum-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
62          }
63        }
64
65      });
66
67      // end date.
68
69      $('#edit-submitted-praktische-gegevens-einddatum-year').change(function () {
70
71        if ($('#edit-submitted-praktische-gegevens-einddatum-year').val() == year) {
72          $('#edit-submitted-praktische-gegevens-einddatum-month > option').each(function () {
73
74            if (this.value < month && this.value.match(/^\d+$/)) {
75              var $thisOption = $(this);
76              $thisOption.remove();
77            }
78          });
79        }
80        else {
81          var first_option = $("#edit-submitted-praktische-gegevens-einddatum-month").find('option:eq(1)').val();
82
83          for (var i = first_option - 1; i > 0; i--) {
84            $("#edit-submitted-praktische-gegevens-einddatum-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
85          }
86        }
87      });
88      $('#edit-submitted-praktische-gegevens-einddatum-month, #edit-submitted-praktische-gegevens-einddatum-year').change(function () {
89        if ($('#edit-submitted-praktische-gegevens-einddatum-year').val() == year && $('#edit-submitted-praktische-gegevens-einddatum-month').val() == month) {
90          $('#edit-submitted-praktische-gegevens-einddatum-day > option').each(function () {
91
92            if (this.value < day && this.value.match(/^\d+$/)) {
93              var $thisOption = $(this);
94              $thisOption.remove();
95            }
96          });
97        }
98        else {
99          var first_option = $("#edit-submitted-praktische-gegevens-einddatum-day").find('option:eq(1)').val();
100
101          for (var i = first_option - 1; i > 0; i--) {
102            $("#edit-submitted-praktische-gegevens-einddatum-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
103          }
104        }
105
106      });
107
108      // preview date.
109      $('#edit-submitted-praktische-gegevens-datum-vernissage-year').change(function () {
110
111        if ($('#edit-submitted-praktische-gegevens-datum-vernissage-year').val() == year) {
112          $('#edit-submitted-praktische-gegevens-datum-vernissage-month > option').each(function () {
113
114            if (this.value < month && this.value.match(/^\d+$/)) {
115              var $thisOption = $(this);
116              $thisOption.remove();
117            }
118          });
119        }
120        else {
121          var first_option = $("#edit-submitted-praktische-gegevens-datum-vernissage-month").find('option:eq(1)').val();
122
123          for (var i = first_option - 1; i > 0; i--) {
124            $("#edit-submitted-praktische-gegevens-datum-vernissage-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
125          }
126        }
127      });
128
129      $('#edit-submitted-praktische-gegevens-datum-vernissage-month, #edit-submitted-praktische-gegevens-datum-vernissage-year').change(function () {
130        if ($('#edit-submitted-praktische-gegevens-datum-vernissage-year').val() == year && $('#edit-submitted-praktische-gegevens-datum-vernissage-month').val() == month) {
131          $('#edit-submitted-praktische-gegevens-datum-vernissage-day > option').each(function () {
132
133            if (this.value < day && this.value.match(/^\d+$/)) {
134              var $thisOption = $(this);
135              $thisOption.remove();
136            }
137          });
138        }
139        else {
140          var first_option = $("#edit-submitted-praktische-gegevens-datum-vernissage-day").find('option:eq(1)').val();
141
142          for (var i = first_option - 1; i > 0; i--) {
143            $("#edit-submitted-praktische-gegevens-datum-vernissage-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
144          }
145        }
146
147      });
148
149      // for EN version.
150
151      // start date.
152
153      $('#edit-submitted-practical-data-start-date-year').change(function () {
154
155        if ($('#edit-submitted-practical-data-start-date-year').val() == year) {
156          $('#edit-submitted-practical-data-start-date-month > option').each(function () {
157
158            if (this.value < month && this.value.match(/^\d+$/)) {
159              var $thisOption = $(this);
160              $thisOption.remove();
161            }
162          });
163        }
164        else {
165          var first_option = $("#edit-submitted-practical-data-start-date-month").find('option:eq(1)').val();
166
167          for (var i = first_option - 1; i > 0; i--) {
168            $("#edit-submitted-practical-data-start-date-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
169          }
170        }
171      });
172
173      $('#edit-submitted-practical-data-start-date-month, #edit-submitted-practical-data-start-date-year').change(function () {
174        if ($('#edit-submitted-practical-data-start-date-year').val() == year && $('#edit-submitted-practical-data-start-date-month').val() == month) {
175          $('#edit-submitted-practical-data-start-date-day > option').each(function () {
176
177            if (this.value < day && this.value.match(/^\d+$/)) {
178              var $thisOption = $(this);
179              $thisOption.remove();
180            }
181          });
182        }
183        else {
184          var first_option = $("#edit-submitted-practical-data-start-date-day").find('option:eq(1)').val();
185
186          for (var i = first_option - 1; i > 0; i--) {
187            $("#edit-submitted-practical-data-start-date-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
188          }
189        }
190
191      });
192
193      // end date.
194      $('#edit-submitted-practical-data-end-date-year').change(function () {
195
196        if ($('#edit-submitted-practical-data-end-date-year').val() == year) {
197          $('#edit-submitted-practical-data-end-date-month > option').each(function () {
198
199            if (this.value < month && this.value.match(/^\d+$/)) {
200              var $thisOption = $(this);
201              $thisOption.remove();
202            }
203          });
204        }
205        else {
206          var first_option = $("#edit-submitted-practical-data-end-date-month").find('option:eq(1)').val();
207
208          for (var i = first_option - 1; i > 0; i--) {
209            $("#edit-submitted-practical-data-end-date-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
210          }
211        }
212      });
213      $('#edit-submitted-practical-data-end-date-month, #edit-submitted-practical-data-end-date-year').change(function () {
214        if ($('#edit-submitted-practical-data-end-date-year').val() == year && $('#edit-submitted-practical-data-end-date-month').val() == month) {
215          $('#edit-submitted-practical-data-end-date-day > option').each(function () {
216
217            if (this.value < day && this.value.match(/^\d+$/)) {
218              var $thisOption = $(this);
219              $thisOption.remove();
220            }
221          });
222        }
223        else {
224          var first_option = $("#edit-submitted-practical-data-end-date-day").find('option:eq(1)').val();
225
226          for (var i = first_option - 1; i > 0; i--) {
227            $("#edit-submitted-practical-data-end-date-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
228          }
229        }
230
231      });
232
233      // preview date.
234      $('#edit-submitted-practical-data-preview-date-year').change(function () {
235
236        if ($('#edit-submitted-practical-data-preview-date-year').val() == year) {
237          $('#edit-submitted-practical-data-preview-date-month > option').each(function () {
238
239            if (this.value < month && this.value.match(/^\d+$/)) {
240              var $thisOption = $(this);
241              $thisOption.remove();
242            }
243          });
244        }
245        else {
246          var first_option = $("#edit-submitted-practical-data-preview-date-month").find('option:eq(1)').val();
247
248          for (var i = first_option - 1; i > 0; i--) {
249            $("#edit-submitted-practical-data-preview-date-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
250          }
251        }
252      });
253
254      $('#edit-submitted-practical-data-preview-date-month, #edit-submitted-practical-data-preview-date-year').change(function () {
255        if ($('#edit-submitted-practical-data-preview-date-year').val() == year && $('#edit-submitted-practical-data-preview-date-month').val() == month) {
256          $('#edit-submitted-practical-data-preview-date-day > option').each(function () {
257
258            if (this.value < day && this.value.match(/^\d+$/)) {
259              var $thisOption = $(this);
260              $thisOption.remove();
261            }
262          });
263        }
264        else {
265          var first_option = $("#edit-submitted-practical-data-preview-date-day").find('option:eq(1)').val();
266
267          for (var i = first_option - 1; i > 0; i--) {
268            $("#edit-submitted-practical-data-preview-date-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
269          }
270        }
271
272      });
273
274      // for FR version.
275
276      // start date.
277
278      $('#edit-submitted-donnees-pratiques-date-de-debut-year').change(function () {
279
280        if ($('#edit-submitted-donnees-pratiques-date-de-debut-year').val() == year) {
281          $('#edit-submitted-donnees-pratiques-date-de-debut-month > option').each(function () {
282
283            if (this.value < month && this.value.match(/^\d+$/)) {
284              var $thisOption = $(this);
285              $thisOption.remove();
286            }
287          });
288        }
289        else {
290          var first_option = $("#edit-submitted-donnees-pratiques-date-de-debut-month").find('option:eq(1)').val();
291
292          for (var i = first_option - 1; i > 0; i--) {
293            $("#edit-submitted-donnees-pratiques-date-de-debut-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
294          }
295        }
296      });
297
298      $('#edit-submitted-donnees-pratiques-date-de-debut-month, #edit-submitted-donnees-pratiques-date-de-debut-year').change(function () {
299        if ($('#edit-submitted-donnees-pratiques-date-de-debut-year').val() == year && $('#edit-submitted-donnees-pratiques-date-de-debut-month').val() == month) {
300          $('#edit-submitted-donnees-pratiques-date-de-debut-day > option').each(function () {
301
302            if (this.value < day && this.value.match(/^\d+$/)) {
303              var $thisOption = $(this);
304              $thisOption.remove();
305            }
306          });
307        }
308        else {
309          var first_option = $("#edit-submitted-donnees-pratiques-date-de-debut-day").find('option:eq(1)').val();
310
311          for (var i = first_option - 1; i > 0; i--) {
312            $("#edit-submitted-donnees-pratiques-date-de-debut-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
313          }
314        }
315
316      });
317
318      // end date.
319      $('#edit-submitted-donnees-pratiques-date-de-fin-year').change(function () {
320
321        if ($('#edit-submitted-donnees-pratiques-date-de-fin-year').val() == year) {
322          $('#edit-submitted-donnees-pratiques-date-de-fin-month > option').each(function () {
323
324            if (this.value < month && this.value.match(/^\d+$/)) {
325              var $thisOption = $(this);
326              $thisOption.remove();
327            }
328          });
329        }
330        else {
331          var first_option = $("#edit-submitted-donnees-pratiques-date-de-fin-month").find('option:eq(1)').val();
332
333          for (var i = first_option - 1; i > 0; i--) {
334            $("#edit-submitted-donnees-pratiques-date-de-fin-month").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
335          }
336        }
337      });
338      $('#edit-submitted-donnees-pratiques-date-de-fin-month, #edit-submitted-donnees-pratiques-date-de-fin-year').change(function () {
339        if ($('#edit-submitted-donnees-pratiques-date-de-fin-year').val() == year && $('#edit-submitted-donnees-pratiques-date-de-fin-month').val() == month) {
340          $('#edit-submitted-donnees-pratiques-date-de-fin-day > option').each(function () {
341
342            if (this.value < day && this.value.match(/^\d+$/)) {
343              var $thisOption = $(this);
344              $thisOption.remove();
345            }
346          });
347        }
348        else {
349          var first_option = $("#edit-submitted-donnees-pratiques-date-de-fin-day").find('option:eq(1)').val();
350
351          for (var i = first_option - 1; i > 0; i--) {
352            $("#edit-submitted-donnees-pratiques-date-de-fin-year").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
353          }
354        }
355
356      });
357
358      // preview date.
359      $('#edit-submitted-donnees-pratiques-date-de-vernissage-year').change(function () {
360
361        if ($('#edit-submitted-donnees-pratiques-date-de-vernissage-year').val() == year) {
362          $('#edit-submitted-donnees-pratiques-date-de-vernissage-month > option').each(function () {
363
364            if (this.value < month && this.value.match(/^\d+$/)) {
365              var $thisOption = $(this);
366              $thisOption.remove();
367            }
368          });
369        }
370        else {
371          var first_option = $("#edit-submitted-donnees-pratiques-date-de-vernissage-month").find('option:eq(1)').val();
372
373          for (var i = first_option - 1; i > 0; i--) {
374            $("#edit-submitted-donnees-pratiques-date-de-vernissage-year").find('option:eq(0)').after("<option value='" + i + "'>" + Drupal.t(months[i]) + "</option>");
375          }
376        }
377      });
378
379      $('#edit-submitted-donnees-pratiques-date-de-vernissage-month, #edit-submitted-donnees-pratiques-date-de-vernissage-year').change(function () {
380        if ($('#edit-submitted-donnees-pratiques-date-de-vernissage-year').val() == year && $('#edit-submitted-donnees-pratiques-date-de-vernissage-month').val() == month) {
381          $('#edit-submitted-donnees-pratiques-date-de-vernissage-day > option').each(function () {
382
383            if (this.value < day && this.value.match(/^\d+$/)) {
384              var $thisOption = $(this);
385              $thisOption.remove();
386            }
387          });
388        }
389        else {
390          var first_option = $("#edit-submitted-donnees-pratiques-date-de-vernissage-day").find('option:eq(1)').val();
391
392          for (var i = first_option - 1; i > 0; i--) {
393            $("#edit-submitted-donnees-pratiques-date-de-vernissage-day").find('option:eq(0)').after("<option value='" + i + "'>" + i + "</option>");
394          }
395        }
396
397      });
398
399    }
400  };
401
402  // Fancy labels on input fields
403  Drupal.behaviors.fancylabels = {
404    attach: function (context, settings) {
405      $(window).load(function () {
406
407        $('#block-search-form .form-text, #block-wmcustom-wmcustom-mail-subscription .form-text').each(function (i) {
408          $(this).removeAttr('style');
409          $(this).parents('.form-item').find('span').remove();
410          $tekst = $(this).parents('.form-item').find('label').html().split(':');
411          $(this).attr("labeltext", $tekst[0]);
412          $(this).parents('.form-item').find('label').hide();
413          if ($(this).val() === "" || $(this).val() == $(this).attr('labeltext')) {
414            $(this).val($tekst[0]);
415          } else {
416            $(this).addClass('form-text-focus');
417          }
418
419          $(this).focus(function () {
420            if ($(this).val() == $(this).attr('labeltext')) {
421              $(this).val('');
422              $(this).addClass('form-text-focus');
423              $(this).removeAttr('style');
424            }
425          });
426          $(this).blur(function () {
427            if ($(this).val() === '') {
428              $(this).val($(this).attr('labeltext'));
429              $(this).removeClass('form-text-focus');
430              $(this).removeAttr('style');
431            }
432          });
433        });
434
435      });
436    }
437  };
438
439  // Topstukkengalerij hover en shit
440  Drupal.behaviors.masterpieces = {
441    attach: function (context, settings) {
442
443      $(window).load(function () {
444        var
445          css_index_hover = {"z-index": "15"},
446          css_index_default = {"z-index": "10"},
447          css_img_hover = {"width": "160px", "height": "160px", "top": "-32px", "left"
447: "-32px"},
448          css_img_default = {"width": "100px", "height": "100px", "top": "-2px", "left": "-2px"}
449        t = 0;
450
451        $('.artpieces-grid a').bind({
452          mouseover: function (e) {
453            var _this = this;
454            clearTimeout(t);
455            t = setTimeout(function (e) {
456              $(_this)
457                .css(css_index_hover)
458                .addClass('hover');
459
460              $('img', _this).animate(css_img_hover, 200, function (e) {
461                $('span', _this).slideDown(50);
462              });
463            }, 75);
464          },
465          mouseleave: function (e) {
466            var _this = this;
467
468            clearTimeout(t);
469
470            $('span', this).slideUp(50, function (e) {
471              $('img', _this).animate(css_img_default, 50, function (e) {
472                $(_this)
473                  .css(css_index_default)
474                  .removeClass('hover');
475              });
476            });
477          }
478        });
479      });
480    }
481  };
482
483  // Mediacarousel
484  Drupal.behaviors.mediacarousel = {
485    attach: function (context, settings) {
486      $(window).load(function () {
487
488        $('#small-media a').click(function () {
489          if (!$(this).hasClass('active')) {
490            $li = $(this).parent('li');
491            rel = $li.attr('rel');
492            $li.addClass('active').siblings('li').removeClass('active');
493            $(this).parents('.media-carousel').find('#big-media li#' + rel).addClass('active').fadeIn('fast').siblings('.active').removeClass('active').fadeOut('fast');
494          }
495          return false;
496        });
497
498        $('#big-media li.active').show();
499
500      });
501    }
502  };
503
504  // Hide empty span tags used for copyright
505  Drupal.behaviors.copyrightspan = {
506    attach: function (context, settings) {
507      $(window).load(function () {
508        $("span.copyright").each(function () {
509          if ($(this).html().length === 0) $(this).hide();
510        });
511
512      });
513    }
514  };
515
516  // script to controll themes
517  Drupal.behaviors.collectionThemeScript = {
518    attach: function (context, settings) {
519      $(document).ready(function () {
520        //Show the active term-list if there is one
521        $('li.secondlevel a.active').closest('li.secondlevel').show().parent().find('.firstlevel a').addClass('active');
522        //Handle click-event on term-list: hide the current active list and show the one clicked on
523        $('#block-wmcustom-wmcustom-art-piece-theme li.firstlevel a').click(
524          function (e) {
525            if ($(this).hasClass('active')) {
526              $('li.firstlevel a').removeClass('active');
527              $('li.secondlevel').slideUp('fast');
528            } else {
529              $('li.firstlevel a').removeClass('active');
530              $('li.secondlevel').slideUp('fast');
531              $(this).addClass('active').closest('ul').find('li.secondlevel').slideDown('fast');
532            }
533            return false;
534          }
535        );
536      });
537    }
538  };
539
540  // Slide open and close the bruikleen-form
541  Drupal.behaviors.bruikleenform = {
542    attach: function (context, settings) {
543      $(window).load(function () {
544        $("#block-webform-client-block-337 .content, #block-webform-client-block-366 .content, #block-webform-client-block-422 .content").hide();
545
546        $("#block-webform-client-block-337 h2, #block-webform-client-block-366 h2, #block-webform-client-block-422 h2").click(function () {
547          $(this).siblings(".content").slideToggle();
548          $(this).toggleClass("active");
549
550        });
551      });
552    }
553  };
554
555})(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.