PageSourceSearch

https://www.gpclimat.ch/wp-content/themes/6temflex/js/jquery.6tem9.js

js gpclimat.ch collected 2026-09-26 00:29:33 UTC 14,279 bytes, 435 lines download raw bytes

1function positionFooter() {
2    var footer = jQuery("#footer");
3    if (((jQuery(document.body).height() + footer.outerHeight()) < jQuery(window).height() && footer.css("position") == "fixed") || (jQuery(document.body).height() < jQuery(window).height() && footer.css("position") != "fixed")) {
4        footer.css({ position: "fixed", bottom: "0px" });
5    }
6    else
7    {
8        footer.css({ position: "static" }); }
9} 
10
11jQuery(document).ready(function(){
12
13
14
15
16    new WOW().init();
17    positionFooter();
18     ///**migrate/jQuery(window).scroll(positionFooter);
19    jQuery(window).on( "scroll",positionFooter);
20     ///**migrate/jQuery(window).resize(positionFooter);
21    jQuery(window).on('resize',positionFooter);
22    
23    ///**migrate/jQuery(window).load(positionFooter);
24    jQuery(window).on('load',positionFooter);
25
26
27
28
29
30/*    jQuery('.block-content').viewportChecker({
31        classToAdd: 'block-visible animated fadeIn', 
32        offset: 100, 
33        callbackFunction: function(elem, action){},
34        scrollHorizontal: false 
35    });
36
37    jQuery('#carouselGlobalContainer').viewportChecker({
38        classToAdd: 'block-visible animated fadeIn', 
39        offset: 100, 
40        callbackFunction: function(elem, action){},
41        scrollHorizontal: false 
42    });
43
44    jQuery('#footer').viewportChecker({
45        classToAdd: 'block-visible animated fadeIn', 
46        offset: 100, 
47        callbackFunction: function(elem, action){},
48        scrollHorizontal: false 
49    });*/
50        
51    // Appel de masonry
52    var mscontainer = jQuery('#ms-container');
53    var mssidebar = jQuery('#ms-sidebar');
54    var msfooter = jQuery('#ms-footer');
55    var msnry;
56
57    // Charge masonry
58    function loadMasonry(object)
59    { 
60        // Initialise masonry après que toutes les images aient été chargées
61        imagesLoaded( object[0], function() {
62            msnry = new Masonry( object[0], {
63            itemSelector: '.ms-item',
64            columnWidth: '.ms-item'   
65            }); 
66        }); 
67
68    } 
69
70    // Charge tous les containers contenant masonry
71    function fLoadMasonryContainer()
72    {
73        if(mscontainer.length != 0)
74            loadMasonry(mscontainer);
75
76        if(mssidebar.length != 0)
77            loadMasonry(mssidebar);
78
79        if(msfooter.length != 0)
80            loadMasonry(msfooter);
81    
82    }
83
84    fLoadMasonryContainer();
85
86    
87
88    // ----------------------------------------------------
89    // Fix Masonry pour 6tem9Gallery
90    // Recharge masonry après l'affichage de la galerie dans un widget
91    var owl = jQuery('.carousel6tem9Gallery');
92
93    if(jQuery('.carousel6tem9Gallery').hasClass('owl-carousel'))
94    {
95        owl.on('resized.owl.carousel', function(event) {
96            fLoadMasonryContainer(); 
97        });
98    }
99
100    // ----------------------------------------------------
101    // Fix Masonry pour 6tem9Event
102    // Recharge masonry après le changement d'ongle A venir / En cours
103
104    ///**migrate/jQuery('.widget-6tem9-timeline .intervalFilter .btn').click( function(){
105    jQuery('.widget-6tem9-timeline .intervalFilter .btn').on('click', function(){
106        fLoadMasonryContainer();
107    });
108
109    // ----------------------------------------------------
110    // Fix Masonry pour le widget gravity forms 6tem9
111    // Recharge masonry lorsqu'il y a une erreur sur le formulaire
112
113    ///**migrate/jQuery('.widget-6tem9-gravityforms').bind('DOMSubtreeModified', function() {
114    jQuery('.widget-6tem9-gravityforms').on('DOMSubtreeModified', function() {
115        fLoadMasonryContainer(); 
116    });
117
118    // ----------------------------------------------------
119    // Fix Masonry pour le widget newsletter
120
121    jQuery('.newsletterForm').on('widgetNewsletterSubmitted', function() {
122        fLoadMasonryContainer(); 
123    });
124
125     ///**migrate/jQuery(".widget-6tem9-tripadvisor").bind("DOMSubtreeModified", function() {
126    jQuery(".widget-6tem9-tripadvisor").on("DOMSubtreeModified", function() {
127        fLoadMasonryContainer();
128    });
129
130    // ----------------------------------------------------
131    // Fix Masonry pour l'acccordéon dans un widget libre
132
133    jQuery('.widget-6tem9-tinymce .panel-group .collapse').on('shown.bs.collapse', function () {
134        fLoadMasonryContainer(); 
135    });
136
137    // ----------------------------------------------------
138    // Fix Masonry à la fin e chaque traitement ajax
139
140    ///**migrate/ jQuery("body").ajaxStop(function() {
141    //     fLoadMasonryContainer();
142    // });
143
144    jQuery(document).ajaxStop(function() {
145        fLoadMasonryContainer();
146    });
147
148    // ----------------------------------------------------
149    // Fix Masonry pour le widget TripAdvisor
150
151    // jQuery('.widget-6tem9-tinymce .TA_selfserveprop').bind('DOMNodeInserted DOMNodeRemoved', function(event) {
152    //     fLoadMasonryContainer();
153    // });
154
155    // Fix Masonry pour le widget twitter
156    // Recharge masonry après l'affichage du widget Twitter
157    window.twttr = (function (d, s, id) {
158      var t, js, fjs = d.getElementsByTagName(s)[0];
159      if (d.getElementById(id)) return;
160      js = d.createElement(s); js.id = id;
161      js.src= "https://platform.twitter.com/widgets.js";
162      fjs.parentNode.insertBefore(js, fjs);
163      return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
164    }(document, "script", "twitter-wjs"));
165
166    // Check captchas in javascript for comment forms
167    // window.onload = function() {
168    //     var recaptcha = document.forms["commentform"]["g-recaptcha-response"];
169    //     recaptcha.required = true;
170    //     recaptcha.oninvalid = function(e) {
171    //         // do something
172    //         alert("Veuillez remplir le captcha");
173    //     }
174    // }
175
176    fLoadMasonryContainer();
177     
178});
179
180
181
182// ----------------------------------------------------------------------------------------
183// Creation des google map
184function fInitialisationGmap3( tabOptionGmap3 )
185{
186    if ( tabOptionGmap3['zoom'] != '' )
187        zoomLevel = eval(tabOptionGmap3['zoom']);
188    else
189        zoomLevel = 8;
190
191    if ( tabOptionGmap3['adresse'] != '' )
192        adresse = tabOptionGmap3['adresse'];
193    else
194        adresse = 'Toulouse, France';
195    
196    if ( typeof tabOptionGmap3['center'] != 'undefined' && tabOptionGmap3['center'] != '' )
197        center = tabOptionGmap3['center'];
198    else
199        center = '';
200    
201    jQuery(tabOptionGmap3['idConteneur']).width(tabOptionGmap3['width']).height(tabOptionGmap3['height']).gmap3({
202        map:{
203            // address: adresse,
204            options:{
205                zoom: zoomLevel,
206                mapTypeId: google.maps.MapTypeId.ROADMAP,
207                mapTypeControl: true,
208                mapTypeControlOptions: {
209                    style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
210                },
211                navigationControl: true,
212                scrollwheel: true,
213                streetViewControl: true
214            }
215        }
216        ,
217        events:{
218            click: function(){
219                var infowindow = jQuery(this).gmap3({
220                    get: {
221                        name: 'infowindow', 
222                        all: true
223                    }
224                });
225                jQuery.each(infowindow, function(j){
226                    infowindow[j].close();
227                });
228            }
229        }
230    });
231}
232
233// ===================================================================================================================
234// FUNCTIONS GMAP3 for google map generation on archive.php
235
236// ----------------------------------------------------------------------------------------
237// Ajout des marqueurs et du clustering
238function fInsertionMapGmap3(tabOptionGmap3, single)
239{
240    var optionGetTabDonnee = tabOptionGmap3['optionGetTabDonnee'];
241    
242    if (optionGetTabDonnee == 'json')
243    {
244        jQuery.getJSON( tabOptionGmap3['data'], function( locations )
245        {
246            // console.log(optionGetTabDonnee);
247            fGenerationDonneesMap(locations, tabOptionGmap3);
248        });
249    }
250    else
251    {
252        jQuery.get(tabOptionGmap3['data'], function(locations)
253        {
254            fGenerationDonneesMap(locations, tabOptionGmap3);
255        });
256    }
257};
258
259// ----------------------------------------------------------------------------------------
260function fGenerationDonneesMap(locations, tabOptionGmap3)
261{
262    var afficherInfowindow = false;
263    if ( tabOptionGmap3['infowindow'] )
264    { 
265        afficherInfowindow = true;
266    }
267    locations = eval(locations);
268
269    if ( tabOptionGmap3['classCluster']!='' )
270    {
271        jQuery(tabOptionGmap3['idConteneur']).gmap3({
272            marker:{
273                values: locations,
274                options:{
275                    draggable: false
276                },
277                events:{
278                    click: function(marker, event, context){
279                        if ( afficherInfowindow )
280                        {
281                            var map = jQuery(this).gmap3("get"),
282                            infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
283                            if (infowindow)
284                            {
285                                infowindow.open(map, marker);
286                                infowindow.setContent(context.data);
287                            } 
288                            else 
289                            {
290                                jQuery(this).gmap3({
291                                    infowindow:{
292                                        anchor: marker, 
293                                        options: {content: context.data}
294                                    }   
295                                });
296                            }
297                        }
298                    },
299                    mouseout: function(){
300                         // var infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
301                         // if (infowindow)
302                         // {
303                         //     infowindow.close();
304                         // }
305                    }
306                }
307                // ,
308                // cluster:{
309                //  radius: tabOptionGmap3['radiusCluster'],
310                //  events:{ // events trigged by clusters 
311                //      click: function(cluster, event, data){
312                //          var map = jQuery(this).gmap3("get");
313                            
314                //          var infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
315                //          var zoomLevel= map.getZoom();
316                //          zoomLevel = eval(zoomLevel + 1);
317
318                //          map.setCenter(cluster.main.getPosition());
319                //          map.setZoom(zoomLevel);
320                //      }
321                //  },
322                //  6: {
323                //      content: "<div class='" + tabOptionGmap3['classCluster'] + " " + tabOptionGmap3['classCluster'] + "-1'>CLUSTER_COUNT</div>",
324                //      width: 75,
325                //      height: 75
326                //  },
327                //  20: {
328                //      content: "<div class='" + tabOptionGmap3['classCluster'] + " " + tabOptionGmap3['classCluster'] + "-2'>CLUSTER_COUNT</div>",
329                //      width: 77,
330                //      height: 77
331                //  },
332                //  50: {
333                //      content: "<div class='" + tabOptionGmap3['classCluster'] + " " + tabOptionGmap3['classCluster'] + "-3'>CLUSTER_COUNT</div>",
334                //      width: 80,
335                //      height: 80
336                //  }
337                // }
338
339            } 
340        });
341    }
342    else
343    {
344        jQuery(tabOptionGmap3['idConteneur']).gmap3({
345            marker:{
346                values: locations,
347                options:{
348                    draggable: false
349                },
350                events:{
351                    click: function(marker, event, context){
352                        if ( afficherInfowindow )
353                        {
354                            var map = jQuery(this).gmap3("get"),
355                            infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
356                            if (infowindow)
357                            {
358                                infowindow.open(map, marker);
359                                infowindow.setContent(context.data);
360                            } 
361                            else 
362                            {
363                                jQuery(this).gmap3({
364                                    infowindow:{
365                                        anchor: marker, 
366                                        options: {content: context.data}
367                                    }   
368                                });
369                            }
370                        }
371                    },
372                    mouseout: function(){
373    //                      var infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
374    //                      if (infowindow)
375    //                      {
376    //                          infowindow.close();
377    //                      }
378                    }
379                }
380            } 
381        });     
382    }
383
384    if ( tabOptionGmap3['autofit'] && locations.length > 1 )
385    {
386        // Centrage et zoom au clic sur un cluster
387        var bounds = new google.maps.LatLngBounds();
388        jQuery(tabOptionGmap3['idConteneur']).gmap3({
389            get: {
390                    name: 'marker',
391                    all: true,
392                    callback: function(objs){
393                        jQuery.each(objs, function(i, obj){
394                            bounds.extend(obj.getPosition());
395                        });
396                    }
397                }
398            },
399            "autofit"
400        );
401    } 
402    else
403    {
404        // If only one marker, set zoom to 8 and centered on marker
405        var mapArchiveGmap3 = jQuery(tabOptionGmap3['idConteneur']).gmap3("get");
406        var marker = jQuery(tabOptionGmap3['idConteneur']).gmap3({get:"marker"});
407        if ( typeof marker !== "undefined")
408        {
409            mapArchiveGmap3.panTo(marker.getPosition());
410        }
411        mapArchiveGmap3.setZoom(8)     
412    }
413
414}
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431  
432
433
434
435

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.