Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 569 Rev 571
Line 40... Line 40...
40
			var pointsOrigine = null;
40
			var pointsOrigine = null;
41
			var boundsOrigine = null;
41
			var boundsOrigine = null;
42
			var markerClusterer = null;
42
			var markerClusterer = null;
43
			var map = null;
43
			var map = null;
44
			var nt = '<?=$num_taxon?>';
44
			var nt = '<?=$num_taxon?>';
-
 
45
			
45
			var infoBulle = new google.maps.InfoWindow();
46
			var infoBulle = new google.maps.InfoWindow();
46
			google.maps.event.addListener(infoBulle, 'domready', function() {
47
			google.maps.event.addListener(infoBulle, 'domready', function() {
47
				// Onglet Tableau : Jquery => TableSorter
48
				// Onglet Tableau : Jquery => TableSorter
48
				if ($("#observations table").get() != '') {
49
				if ($("#observations table").get() != '') {
-
 
50
					// add parser through the tablesorter addParser method 
-
 
51
					$.tablesorter.addParser({ 
-
 
52
						// Définition d'un id unique pour ce parsseur 
-
 
53
						id: 'date_cel', 
-
 
54
						is: function(s) { 
-
 
55
							// retourne false si le parsseur n'est pas autodétecté 
-
 
56
							return false; 
-
 
57
						}, 
-
 
58
						format: function(s) { 
-
 
59
							// Transformation date jj/mm/aaaa en aaaa/mm/jj
-
 
60
							s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
-
 
61
							// Remplace la date par un nombre de millisecondes pour trier numériquement
-
 
62
							return $.tablesorter.formatFloat(new Date(s).getTime());
-
 
63
						}, 
-
 
64
						// set type, either numeric or text 
-
 
65
						type: 'numeric' 
-
 
66
					});
49
					$("#observations table").tablesorter();
67
					$("#observations table").tablesorter({ 
-
 
68
			            headers: { 
-
 
69
			                1: { 
-
 
70
			                    sorter:'date_cel' 
-
 
71
			                } 
-
 
72
			            } 
-
 
73
			        });
50
				}
74
				}
51
				// Onglet Liste : Jquery => FancyBox
75
				// Onglet Liste : Jquery => FancyBox
52
				if ($("#observations ol").get() != '') {
76
				if ($("#observations ol").get() != '') {
53
					$("a.cel-img").fancybox({
77
					$("a.cel-img").fancybox({
54
						transitionIn : 'elastic',
78
						transitionIn : 'elastic',
Line 88... Line 112...
88
					});
112
					});
Line 89... Line 113...
89
 
113
 
Line 90... Line 114...
90
					bounds.extend(maLatLng);
114
					bounds.extend(maLatLng);
91
					
115
					
-
 
116
					google.maps.event.addListener(point, 'click', function() {
-
 
117
						var limites = map.getBounds();
-
 
118
						var centre = limites.getCenter();
-
 
119
						var nordEst = limites.getNorthEast();
92
					google.maps.event.addListener(point, 'click', function() {
120
						var centreSudLatLng = new google.maps.LatLng(nordEst.lat(), centre.lng());
-
 
121
						
93
						afficherMsgChargement();
122
						infoBulle.open(map, this);
-
 
123
						afficherMsgChargement();
-
 
124
						chargerFormatObs(this.stationId, '*');
94
						infoBulle.open(map, this);
125
						
Line 95... Line 126...
95
						chargerFormatObs(this.stationId, '*');
126
						map.panTo(centreSudLatLng);
96
					});
127
					});