PageSourceSearch

https://www.droisy74.com/plugins/auto/portail74/public/squelettes/js/portail74.js

js droisy74.com collected 2026-10-03 01:11:45 UTC 3,997 bytes, 172 lines download raw bytes

1function portail74_slide_list () {
2	
3	var portail74_slide_number = $('header.header .slide_list .slide').length ;
4	
5	if ( portail74_slide_number > 1 ) {
6		
7		$('header.header .slide_list')
8			.show()
9			.cycle({
10				fx:'fade',
11				slides: '.slide',
12				log: false,
13				timeout: 5000,
14				speed: 1000,
15				pause:1
16			});
17	}
18	
19}
20
21function portail74_navigation () {
22	
23	$('nav.header .sommaire_button').on('click',function(){
24		$('nav.header ul.sommaire').toggleClass('visible');
25	});
26}
27
28function portail74_tuiles () {
29	
30	$('#a_la_une .tuiles .tuile.tuile_mode_logo').each(function(){
31		var tuile = $(this);
32		var url = tuile.data('url');
33		if (url) {
34			$(this).click(function(){
35					window.open(url,"_self");
36			});
37		}
38		
39		var normal = $(this).css('background-image');
40		var hover = $(this).data('hover');
41		
42		if ( hover ) {
43			
44			$(this).on({
45				mouseenter: function() {
46					$(this).css('background-image','url('+hover+')');
47				}, mouseleave: function() {
48					$(this).css('background-image',normal);
49				}
50			});
51		}
52	});
53	
54}
55
56function portail74_diaporama () {
57	
58	// recup params from spip.mediabox
59	var options = {
60		transition:mediabox_settings.trans,
61		speed:mediabox_settings.speed,
62		maxWidth:mediabox_settings.maxW,
63		maxHeight:mediabox_settings.maxH,
64		minWidth:mediabox_settings.minW,
65		minHeight:mediabox_settings.minH,
66		opacity:mediabox_settings.opa,
67		slideshowSpeed:mediabox_settings.ssSpeed,
68		slideshowStart:mediabox_settings.str_ssStart,
69		slideshowStop:mediabox_settings.str_ssStop,
70		current:mediabox_settings.str_cur,
71		previous:mediabox_settings.str_prev,
72		next:mediabox_settings.str_next,
73		close:mediabox_settings.str_close,
74		splash_url:mediabox_settings.splash_url
75	};
76	
77	// mediabox slideshow
78	$('.diaporama.slideshow_diaporama').each(function(index) {
79		$(this).find('a').mediabox(jQuery.extend({}, options, {
80			rel:'slideshow_diaporama_' + index,
81			slideshow:true,
82			slideshowAuto:false
83		}));
84	});
85	
86	// diaporama cycle
87	$('.diaporama.slideshow_diaporama').each(function(){
88		if ( $(this).find('li.element').length > 3 ) {
89			
90			var nbVisible = 3;
91			if(window.matchMedia("(max-width: 768px)").matches) {
92				nbVisible = 1;
93			}
94			
95			$(this).cycle({
96				log: false,
97				speed: '1000',
98				slides: 'li',
99				random: true,
100				carouselVisible: nbVisible
101			});
102		}
103	});
104	
105	
106	
107}
108
109function portail74_actualites () {
110	
111	if ( $('#actualites .actualites li.element').length > 3 ) {
112		
113		var nbVisible = 3;
114		if(window.matchMedia("(max-width: 768px)").matches) {
115			nbVisible = 1;
116		}
117		
118		// show buttons
119		$('#actualites .container > .previous, #actualites .container > .next, #actualites .container > .nav')
120			.removeClass('hide');
121			
122		$('#actualites .actualites').cycle({
123			log: false,
124			speed: '1000',
125			pager: '#actualites .pager',
126			prev: '#actualites .previous',
127			next: '#actualites .next',
128			slides: 'li.element',
129			carouselVisible: nbVisible
130		});
131		
132		// get highest element
133		var height = 0 ;
134		$('#actualites .actualites li').each(function(){
135			var li_height = $(this).height();
136			if ( li_height > height ) {
137				height = li_height ;
138			}
139		});
140		$('#actualites .actualites, #actualites .actualites li').css('height',height);
141		$('#actualites .actualites li .content').css('height', ( height - 16 ) );
142		
143		
144	}
145	
146	
147}
148
149function portail74_alerte_urgence () {
150	
151	if ($('#alerte_urgence').length > 0) {
152		var alerte_urgence_height = $('#alerte_urgence').outerHeight(true);
153		$('html').css('margin-top',alerte_urgence_height+'px');
154		$('.spip-admin-bloc, .spip-admin-float').css('top',(alerte_urgence_height+20)+'px');
155	}
156	
157}
158
159
160$(function(){
161	
162	// menu navigation
163	$('nav.header ul.sommaire').superfish();
164	
165	portail74_slide_list ();
166	portail74_navigation ();
167	portail74_tuiles ();
168	portail74_diaporama ();
169	portail74_actualites ();
170	portail74_alerte_urgence ();
171	
172});

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.