PageSourceSearch

https://espacecompetence.net/cours/repertoire/fonctionsCarte.js

js espacecompetence.net collected 2026-10-08 09:24:01 UTC 2,052 bytes, 97 lines download raw bytes

1var masqueRepertoireFormationYCourant = -1;
2var masqueRepertoireFormationXCourant = -1;
3
4zk.afterMount(function()
5{
6	initCartes();
7});
8
9
10function initCartes()
11{
12	$(".carte").on("mouseenter",
13			function() {
14				$(".miniMenuCarte",this).slideDown(200);
15			}
16			);
17	$(".carte").on("mouseleave",
18			function() {
19				$(".miniMenuCarte",this).slideUp(200);
20			}
21			);
22	$(".itemMiniMenuCarte").on("mouseenter",
23			function() {
24				$(this).css('background-color', '#75b4fa');
25			}
26			);
27	$(".itemMiniMenuCarte").on("mouseleave",
28			function() {
29				$(this).css('background-color', 'transparent');
30			}
31			);
32}
33
34function repertoireFormationInit()
35{
36
37	setTimeout(function(){
38			$('.zoneCartes').find('.carte').each(function(){
39				$(this).off('click');
40				$(this).on("click", function(){
41					var x = $(this).position().left;
42					var y = $(this).position().top;
43					insererMasqueRepertoireFormation(x,y);
44				});
45			} );
46		},
47		300);
48
49
50}
51
52function insererMasqueRepertoireFormation(x,y){
53	var courant = trouverElementApresMasqueRepertoire(y);
54
55	var parentInclude = $(courant).parent();
56	if (masqueRepertoireFormationXCourant == x && masqueRepertoireFormationYCourant == y){
57		$('.masqueRepertoireFormation').slideToggle(300);
58	}
59	else
60	{
61		if(masqueRepertoireFormationYCourant == y){
62			$('.masqueRepertoireFormation').insertAfter($(parentInclude));
63		}
64		else{
65			$('.masqueRepertoireFormation').slideUp(300 , function(){
66				$('.masqueRepertoireFormation').insertAfter($(parentInclude));
67			});
68		}
69		$('.masqueRepertoireFormation').slideDown(300);
70	}
71
72
73	masqueRepertoireFormationYCourant = y;
74	masqueRepertoireFormationXCourant = x;
75}
76
77function trouverElementApresMasqueRepertoire(y){
78	var courant = null;
79	var dernier = null;
80	$('.zoneCartes').find('.carte').each(function(){
81		var y2 = $(this).position().top;
82		if( y2 > y && courant == null)
83		{
84			courant = dernier;
85		}
86		dernier = $(this);
87	} );
88	if(courant == null){
89		courant = dernier;
90	}
91	return $(courant);
92
93}
94
95function cacherMasqueRepertoire(){
96	$('.masqueRepertoireFormation').slideUp(300);
97}

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.