Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 227 | Rev 230 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 228
Line 43... Line 43...
43
	// creerOnglet
43
	// creerOnglet
44
	// Créer l'objet Onglet HTML
44
	// Créer l'objet Onglet HTML
45
	this.creerOnglet = function() {
45
	this.creerOnglet = function() {
46
		var objet = this;
46
		var objet = this;
47
		var a = $(onglet).find("a");
47
		var a = $(onglet).find("a");
-
 
48
	
Line 48... Line 49...
48
 
49
 
49
		// Gestion du clic sur le lien 
50
		// Gestion du clic sur le lien 
50
		// Comme les liens sont mis en place par jqueryui tabs, il faut ajouter une surcouche pour 
51
		// Comme les liens sont mis en place par jqueryui tabs, il faut ajouter une surcouche pour 
51
		// déplacer vers la page du module
52
		// déplacer vers la page du module
52
		$(a).click(function() {
53
		$(a).click(function() {
53
			// TODO : Changer l'url par celle du module et enregistrer la configuration actuelle des onglets.
54
			// TODO : Changer l'url par celle du module et enregistrer la configuration actuelle des onglets.
54
			//$(location).attr('href',"http://www.google.fr");
55
			location.href = $(a).attr("href");
Line 55... Line 56...
55
		});
56
		});
56
 
57
 
57
		if (!statique) {
58
		if (!statique) {
Line 144... Line 145...
144
		var module = new Module(i, this, $(identifiantOnglet));
145
		var module = new Module(i, this, $(identifiantOnglet));
145
		module.titre = $(this).children('h3').text();
146
		module.titre = $(this).children('h3').text();
146
		tableauOnglets[identifiantOnglet] = module;
147
		tableauOnglets[identifiantOnglet] = module;
147
	});
148
	});
Line -... Line 149...
-
 
149
	
148
	
150
	/* mouvement des blocs */
149
	$( ".colonne" ).sortable({
151
	$( ".colonne" ).sortable({
-
 
152
		connectWith: ".colonne",
150
		connectWith: ".colonne"
153
		handle: $(".module").children('h3') // mouvement seulement sur les titres
Line 151... Line 154...
151
	});
154
	});
152
 
155
 
153
	$( ".colonne" ).disableSelection();
156
	$( ".colonne" ).disableSelection();
Line 169... Line 172...
169
		var objet = tableauOnglets[idOnglet];
172
		var objet = tableauOnglets[idOnglet];
170
		objet.afficherCacherModule();
173
		objet.afficherCacherModule();
171
		$(this).toggleClass("elementMenuModulesSelectionne");
174
		$(this).toggleClass("elementMenuModulesSelectionne");
172
	});
175
	});
Line -... Line 176...
-
 
176
	
173
	
177
	/* affiche les onglets par default selon niveau*/
174
	for(indice in tableauOnglets) {
178
	for(indice in tableauOnglets) {
175
		var ongletEnCours = tableauOnglets[indice];
179
		var ongletEnCours = tableauOnglets[indice];
176
		if (ongletsDefaut.indexOf(ongletEnCours.titre) == -1) {
180
		if (ongletsDefaut.indexOf(ongletEnCours.titre) == -1) {
177
			ongletEnCours.afficherCacherModule();	
181
			ongletEnCours.afficherCacherModule();	
178
		}
182
		}
Line -... Line 183...
-
 
183
	}
179
	}
184
	
180
	
185
	/* ajout de l'info au survol de l'onglet quand la taille est diminuée*/
181
	$('.lien-onglet').parent().each(function() {
186
	$('.lien-onglet').parent().each(function() {
Line 182... Line 187...
182
		$(this).attr("title",$(this).children("a").text());
187
		$(this).attr("title",$(this).children("a").text());