PageSourceSearch

https://www.roularta-advertising.be/sites/all/themes/basetpl/js/template.js?tajz03

js roularta-advertising.be collected 2026-10-03 18:01:59 UTC 8,790 bytes, 280 lines download raw bytes

1(function($) {
2Drupal.behaviors.basetpl = {
3  attach: function (context, settings) {
4
5    $(document).ready(function() {
6   
7        //$(this).closest('li.parent').clone().prependTo('.activeSubmenu .menu').addClass('ta-center bg-dark');      
8        
9      
10      //$('<li><a href="#" class="submenu-trigger cancel-menu icon icon-cancel"><span>BACK</span></a></li>').prependTo('body.e2e-admin #mainmenu > ul li.parent > .submenu .menu').addClass('ta-center bg-dark');
11
12      // mobile menu
13     //var clickMobileLink = false;
14      
15      if($('body').hasClass('frontpage')) {        
16        $('#banner .owl-item').each(function() {
17        var field_link = $(this).find('.caption .field-link a.button').attr('href');
18        $(this).find('.slide').wrapAll('<a href="'+ field_link +'"></a>');
19        });        
20      }
21      
22      if ($('#mobilemenu, #mobilesubmenu').is(':visible')) {        
23        
24        $('#mainmenu > ul > li').each(function(){
25        if($(this).find('.submenu').length) {
26         
27        $(this).closest('li.parent').addClass('hasSubmenu');
28        }
29      });
30       
31      
32        var clickCount = 0;
33          $('#mainmenu > ul > li.hasSubmenu > a').on("touchstart click", function(e) {  
34
35          if(clickCount === 0) {
36            e.preventDefault();          
37            $(this).closest('li.parent').find('.submenu').addClass('activeSubmenu level2');
38            $(this).closest('li.parent').toggleClass('submenu-open');
39            $('#mainmenu > ul.menu').toggleClass("submenu-open");           
40          }
41           clickCount++;        
42        });
43        
44      }
45      
46      $('.search .clone-search').empty(); 
47      $('.search .clone-search').append($('#search-block-form').clone()); 
48			
49			// cedra floattables
50			function changeSearch() { 
51				$('#middle input#edit-submit').after('<a href="#" id="filter-result" class="form-submit">Verfijn resultaten</a>');
52				
53				if (window.location.href.indexOf("search/site") > -1) {					
54					
55					$('aside#right').remove().clone().insertAfter('#middle form#search-form').removeClass('col grid3').addClass('relative hidden').attr('id','filters');
56					
57					$(document).on('click','#filter-result',function() {
58						$('#filters').toggleClass('open');
59					});					
60				}
61
62			}
63			
64			changeSearch();
65			
66			var ActiveFilter = $('#middle #filters').find('ul li a').hasClass('facetapi-active');
67			
68			if (ActiveFilter === true){
69				$('#filters').toggleClass('open');
70				$('#filter-result').remove();
71				console.log($('#filter-result'));
72			}	
73			
74			
75
76      
77     
78      
79     /*$('a.cancel-menu').on("touchstart click", function() {
80        $(this).closest('li.parent').toggleClass('submenu-open');
81        clickMobileLink = false;
82     });*/
83      
84      
85      // fix submenu
86      $('ul.menu li a.active').each(function(){
87        $(this).closest('li.parent').addClass('active');
88      });
89
90
91      // preload images
92      $('img').preload();
93
94
95      
96      // mobile menu
97      $('#mobilemenu .menu-trigger').on("touchstart click", function() {
98        $(this).toggleClass("icon-cancel");
99        $('#mainmenu').toggleClass("open");
100        $('html,body').toggleClass("mobile-menu-open");
101        return false;
102      });
103      
104      
105      
106      // mobile menu
107      $('#mobilesubmenu .menu-trigger').on("touchstart click", function() {
108        $(this).toggleClass("icon-cancel");
109        $('#submenu').toggleClass("open");
110        $('html,body').toggleClass("mobile-submenu-open");
111        return false;
112      });
113
114      // tabs
115      $('.tabs').horizontalTabs();
116
117
118      // panes
119     /* if ($('.content-main .pane').length) {
120        $('.content-main .pane').not(":first").hide();
121        $('.pane-menu li:first a').addClass('active');
122        $('.pane-menu a.pane-link').click(function(event) {
123          event.preventDefault();
124          var id = $(this).attr('href');
125          $(this).addClass('active');
126          $('.pane-menu a').not(this).removeClass('active');
127          $('.content-main .pane').not(this).hide();
128          $('.content-main ' + id + '.pane').show();
129        });
130      }*/
131		if ($('.show-up .pane').length) {
132        $('.show-up .pane').not(":first").hide();
133        $('.pane-menu li:first a').addClass('active');
134        $('.pane-menu a.pane-link').click(function(event) {
135          event.preventDefault();
136          var id = $(this).attr('href');
137          $(this).addClass('active');
138          $('.pane-menu a').not(this).removeClass('active');
139          $('.show-up .pane').not(this).hide();
140          $('.show-up ' + id + '.pane').show();
141        });
142      }
143		
144		if ($('.taxo-wrap>.form-item>input').is(':checked')) { 
145			$('#communities-content-wrapper').addClass('active');
146		};
147		
148		if ($('#edit-communities-2688').is(':checked')) { 
149   		$('#taxonomy-term-2688').addClass('active');
150		$('#taxonomy-term-2688').parent('.taxo-wrap').addClass('active');
151   		};
152		
153		if ($('#edit-communities-2688').is(':not(:checked)')) { 
154   		$('#taxonomy-term-2688').removeClass('active');
155			$('#taxonomy-term-2688').parent('.taxo-wrap').removeClass('active');
156   		};
157		if ($('#edit-communities-2689').is(':checked')) { 
158   		$('#taxonomy-term-2689').addClass('active');
159			$('#taxonomy-term-2689').parent('.taxo-wrap').addClass('active');
160   		};
161		
162		if ($('#edit-communities-2689').is(':not(:checked)')) { 
163   		$('#taxonomy-term-2689').removeClass('active');
164			$('#taxonomy-term-2689').parent('.taxo-wrap').removeClass('active');
165   		};
166		if ($('#edit-communities-2690').is(':checked')) { 
167   		$('#taxonomy-term-2690').addClass('active');
168			$('#taxonomy-term-2690').parent('.taxo-wrap').addClass('active');
169   		};
170		
171		if ($('#edit-communities-2690').is(':not(:checked)')) { 
172   		$('#taxonomy-term-2690').removeClass('active');
173			$('#taxonomy-term-2690').parent('.taxo-wrap').removeClass('active');
174   		};
175		
176		//if ($('#edit-communities-2689').is(':checked')) { 
177   		//$('#taxonomy-term-2688').removeClassClass('active');
178		//$('#taxonomy-term-2689').adClassClass('active');
179		//$('#taxonomy-term-2690').removeClassClass('active');
180   		//$('#communities-content-wrapper').addClass('active');
181   		//};
182		
183		//if ($('#edit-communities-2690').is(':checked')) { 
184   		//$('#taxonomy-term-2688').removeClassClass('active');
185		//$('#taxonomy-term-2689').removeClassClass('active');
186		//$('#taxonomy-term-2690').addClassClass('active');
187   		//$('#communities-content-wrapper').addClass('active');
188   		//};
189		
190		
191			// contacts pane
192      $('#open-contacts-pane').click(function() {
193        $('a[href*="#pane-contacts"]').trigger("click");
194      });
195
196		  
197
198		
199		$(".bundle-text-block").each(function() {
200		if ($(this).hasClass('fleft')) {
201				$(this).parent('.innerwrap').addClass('b-left');
202			}
203		});
204		
205		$(".bundle-text-block").each(function() {
206		if ($(this).hasClass('fright')) {
207				$(this).parent('.innerwrap').addClass('b-right');
208			}
209		});
210
211
212      // splash
213      if ($('#SPLASH > div').length) {
214        $('html,body').addClass("mobile-menu-open");
215        var splash_html = '<div id="splash-header"><span class="fleft icon icon-roularta no-text"></span><span class="fright splash-close">Continue to Roularta Media</span></div>';
216        $('#SPLASH > div').prepend(splash_html);
217        $('#splash-header').click(function() {
218          $('#SPLASH').fadeOut();
219          $('html,body').removeClass("mobile-menu-open");
220        });
221      }
222
223
224			// cedra init
225			$(document).ajaxComplete(function() {
226				floatTables();
227				footNotes();
228			});
229
230
231			// cedra footnotes
232			function footNotes() {
233				var args = {};
234				location.search.substr(1).split("&").forEach(function(item) {args[item.split("=")[0]] = item.split("=")[1]});
235				if(args['tvc'] != undefined) {
236					$('.cedra-arg-' + args['tvc']).show();
237				}
238			}
239
240
241			// cedra floattables
242			function floatTables() {
243
244				// floattable && contenttable
245				var fltbl = $('table.floatTable');
246				var cttbl = $('+ div > table',fltbl);
247
248				// firefox fix
249				var ff = !(window.mozInnerScreenX == null);
250
251				// set floattable width to first column of contenttable
252				$(fltbl).width(cttbl.find('th:first-child').width() + 12 + 12 + 2); // padding + border
253
254
255				// set floattable th heights like contenttable th's
256				if (fltbl.length && cttbl.length) {
257
258					$('tr > *',cttbl).each(function() {
259						var h = $(this).height();
260						if (!ff && $(this).is('th')) h++; //-> why + 1??
261						else if (ff && $(this).is('td')) h--;
262						var eq = $(this).parent().index();
263						$('tr:eq(' + eq + ') > *',fltbl).height(h);
264					});
265
266				}
267			}
268
269
270    });
271
272    // fixed menubar on scroll
273    $(window).scroll(function () {
274      if ($(document).scrollTop() > $('#header').height()) $('#menubar').addClass('sticky');
275      else $('#menubar').removeClass('sticky');
276    });
277
278  }
279};
280})(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.