Front IDILL:
authorbastiena
Mon, 09 Jul 2012 14:24:42 +0200
changeset 47 4e1ee94d70b1
parent 46 9d7a2aa112fb
child 48 983d7be910c1
Front IDILL: Help adapted to screen size & mouse interactions
front_idill/src/mosaic/js/mosaic.js
front_idill/src/mosaic/js/neighbours.js
front_idill/src/mosaic/js/notifications.js
front_idill/src/mosaic/js/playerControl.js
front_idill/src/mosaic/js/pointers.js
front_idill/src/mosaic/js/search.js
front_idill/src/mosaic/js/zoomInteractions.js
front_idill/src/pictos/help/MI/bend.png
front_idill/src/pictos/help/MI/knee_up.png
front_idill/src/pictos/help/arret.png
front_idill/src/player/metadataplayer/Timeline.js
front_idill/src/search/js/curvesDetector.js
front_idill/src/snapshots-little/50 shots.jpg
front_idill/src/snapshots-little/alger.jpg
front_idill/src/snapshots-little/animalz.jpg
front_idill/src/snapshots-little/aside.jpg
front_idill/src/snapshots-little/deep end dance.jpg
front_idill/src/snapshots-little/encontro cotidianos.jpg
front_idill/src/snapshots-little/exotica.jpg
front_idill/src/snapshots-little/fenella.jpg
front_idill/src/snapshots-little/flying lesson.jpg
front_idill/src/snapshots-little/i am my mother.jpg
front_idill/src/snapshots-little/instrument.jpg
front_idill/src/snapshots-little/joudance 2 in asakusa_stage1.jpg
front_idill/src/snapshots-little/mue.jpg
front_idill/src/snapshots-little/new under the sun.jpg
front_idill/src/snapshots-little/nid de lune.jpg
front_idill/src/snapshots-little/patria.jpg
front_idill/src/snapshots-little/respire.jpg
front_idill/src/snapshots-little/sliced.jpg
front_idill/src/snapshots-little/stronger.jpg
front_idill/src/snapshots-little/tank man tango a tiananmen memorial.jpg
front_idill/src/snapshots-little/the rat.jpg
front_idill/src/snapshots-little/vrtti.jpg
front_idill/src/snapshots-little/you are you.jpg
front_idill/src/snapshots/50 shots.jpg
front_idill/src/snapshots/alger.jpg
front_idill/src/snapshots/animalz.jpg
front_idill/src/snapshots/aside.jpg
front_idill/src/snapshots/deep end dance.jpg
front_idill/src/snapshots/encontro cotidianos.jpg
front_idill/src/snapshots/exotica.jpg
front_idill/src/snapshots/fenella.jpg
front_idill/src/snapshots/flying lesson.jpg
front_idill/src/snapshots/i am my mother.jpg
front_idill/src/snapshots/instrument.jpg
front_idill/src/snapshots/joudance 2 in asakusa_stage1.jpg
front_idill/src/snapshots/mue.jpg
front_idill/src/snapshots/new under the sun.jpg
front_idill/src/snapshots/nid de lune.jpg
front_idill/src/snapshots/patria.jpg
front_idill/src/snapshots/respire.jpg
front_idill/src/snapshots/sliced.jpg
front_idill/src/snapshots/stronger.jpg
front_idill/src/snapshots/tank man tango a tiananmen memorial.jpg
front_idill/src/snapshots/the rat.jpg
front_idill/src/snapshots/vrtti.jpg
front_idill/src/snapshots/you are you.jpg
--- a/front_idill/src/mosaic/js/mosaic.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/mosaic.js	Mon Jul 09 14:24:42 2012 +0200
@@ -197,8 +197,8 @@
 	this.MPTop_margin;
 	this.top_margin;
 	
-	//Gesture actuellement cherchée.
-	this.currentSearchGesture = '';
+	//Gestures actuellement cherchées dans les vidéos.
+	this.currentSearchGesture = [];
 	
 	//Mosaïque locale.
 	this.localMos;
@@ -274,6 +274,8 @@
 			{
 				//On charge les images de petite taille pour ne pas surcharger la mosaïque lors de l'affichage global.
 				str += '<div id="snapshotDiv-' + i + '" class="snapshotDivs" style="opacity: 0;"><img id="snapshot-' + i + '" class="snapshots" src="snapshots-little/' + this.imgs[i] + '" /></div>';
+				//Au départ aucune vidéo n'a de gesture de recherche.
+				this.currentSearchGesture[i] = '';
 			}
 		}
 		
@@ -398,10 +400,6 @@
 				// console.log('CANVAS READY');
 				// /!\ //
 				
-				/*_this.currentSearchGesture = 'bend';
-				_this.currentMode = 'FILTER';
-				_this.searchFilter('bend');*/
-				
 				_this.previousZoomedSN = $('#snapshotDiv-' + _this.fillingIds[0]);
 			}
 		});
@@ -470,7 +468,7 @@
 						
 						/*if(!_this.curvesGesturesFound)
 						{
-							$('.notifications').remove();
+							this.removeNotifications();
 							_this.filterSearch();
 						}*/
 						
@@ -496,7 +494,7 @@
 						
 						/*if(!_this.curvesGesturesFound)
 						{
-							$('.notifications').remove();
+							this.removeNotifications();
 							_this.searchSearch();
 						}*/
 						
@@ -539,7 +537,13 @@
 							_this.player.widgets[0].searchByGesture(gesture_match);
 							_this.isCurrentlyInASearchByGesture = _this.player.widgets[0].isCurrentlyInASearchByGesture;
 							
-							$('.notifications').remove();
+							if(_this.player && _this.player.widgets[0] && _this.timeToGoAt[_this.centerId] === 0 && _this.player.widgets[0].atLeastOneSearchMarker(_this.currentSearchGesture[_this.centerId]))
+							{
+								_this.player.widgets[0].goToFirstSearchedMarker(_this.currentSearchGesture[_this.centerId]);
+							}
+							
+							_this.removeNotifications();
+							_this.currentSearchGesture[_this.centerId] = gesture_match;
 							_this.searchGesture(gesture_match, 'valid');
 							_this.curvesGesturesFound = false;
 						}
@@ -547,7 +551,7 @@
 						{
 							if(_this.isMosaicFiltered)
 							{
-								$('.notifications').remove();
+								_this.removeNotifications();
 								_this.filterSearchedType = gesture_match;
 								_this.filterGesture(gesture_match, 'valid');
 								_this.searchFilter(gesture_match);
@@ -587,12 +591,11 @@
 				_this.isSearchByCurvesOn = false;
 				_this.leaveSearch();
 				
-				if(_this.currentMode == 'FILTER' && _this.filterSearchedType != '')//if(_this.currentSearchGesture != '')
+				if(_this.currentMode == 'FILTER' && _this.filterSearchedType != '')
 				{
-					$('.notifications').remove();
-					_this.filterGesture(_this.currentSearchGesture, 'valid');
+					_this.removeNotifications();
+					_this.filterGesture(_this.filterSearchedType, 'valid');
 				}
-				
 			});
 		});
 	}
@@ -732,8 +735,13 @@
 	{
 		this.currentMode = "INCOMING-" + n;
 		this.unzoom();
-		this.currentSearchGesture = '';
-		$('.notifications').remove();
+		
+		for(var i = 0 ; i < this.config['imagesToShow'] ; i++)
+		{
+			this.currentSearchGesture[i] = '';
+		}
+		
+		this.removeNotifications();
 		this.isMosaicFiltered = false;
 		this.isCurrentlyInASearchByGesture = false;
 		$('#mainPointer').fadeTo(this.config['timePrezoom'], 0);
@@ -755,7 +763,7 @@
 			}
 			
 			this.currentMode = "MOSAIC";
-			$('.notifications').remove();
+			this.removeNotifications();
 			this.mosaicSelectionAndSearch();
 			clearTimeout(this.nouserTimeout);
 			console.log('OK');
@@ -869,7 +877,7 @@
 		{
 			this.isSwipe = true;
 			
-			if(this.currentMode == 'SEARCH' && this.isMosaicFiltered && !this.player.widgets[0].isAMarkerAhead(this.currentSearchGesture))
+			if(this.currentMode == 'SEARCH' && this.isMosaicFiltered && !this.player.widgets[0].isAMarkerAhead(this.currentSearchGesture[this.centerId]))
 			{
 				this.playNextVideo();
 			}
@@ -877,41 +885,41 @@
 			//L'utilisateur a fait un swipe left.
 			if(event.indexOf("LEFT") != -1)
 			{
-				this.player.widgets[0].switchToMarker(true, this.currentSearchGesture);
+				this.player.widgets[0].switchToMarker(true, this.currentSearchGesture[this.centerId]);
 				if(this.currentMode == 'VIDEO')
 				{
-					$('.notifications').remove();
+					this.removeNotifications();
 					this.videoSwipe('left');
 				}
-				else if(this.currentMode == 'SEARCH' && !this.currentSearchGesture)
+				else if(this.currentMode == 'SEARCH' && !this.currentSearchGesture[this.centerId])
 				{
-					$('.notifications').remove();
+					this.removeNotifications();
 					this.searchSearchAndSwipe('left');
 				}
-				else if(this.currentMode == 'SEARCH' && this.currentSearchGesture)
+				else if(this.currentMode == 'SEARCH' && this.currentSearchGesture[this.centerId])
 				{
-					$('.notifications').remove();
-					this.searchGestureAndSwipe(this.currentSearchGesture, 'valid', 'left');
+					this.removeNotifications();
+					this.searchGestureAndSwipe(this.currentSearchGesture[this.centerId], 'valid', 'left');
 				}
 			}
 			//L'utilisateur a fait un swipe right.
 			else if(event.indexOf("RIGHT") != -1)
 			{
-				this.player.widgets[0].switchToMarker(false, this.currentSearchGesture);
+				this.player.widgets[0].switchToMarker(false, this.currentSearchGesture[this.centerId]);
 				if(this.currentMode == 'VIDEO')
 				{
-					$('.notifications').remove();
+					this.removeNotifications();
 					this.videoSwipe('right');
 				}
-				else if(this.currentMode == 'SEARCH' && !this.currentSearchGesture)
+				else if(this.currentMode == 'SEARCH' && !this.currentSearchGesture[this.centerId])
 				{
-					$('.notifications').remove();
+					this.removeNotifications();
 					this.searchSearchAndSwipe('right');
 				}
-				else if(this.currentMode == 'SEARCH' && this.currentSearchGesture)
+				else if(this.currentMode == 'SEARCH' && this.currentSearchGesture[this.centerId])
 				{
-					$('.notifications').remove();
-					this.searchGestureAndSwipe(this.currentSearchGesture, 'valid', 'right');
+					this.removeNotifications();
+					this.searchGestureAndSwipe(this.currentSearchGesture[this.centerId], 'valid', 'right');
 				}
 			}
 			
@@ -921,15 +929,15 @@
 				_this.isSwipe = false;
 				
 				// /!\ //
-				$('.notifications').remove();
+				_this.removeNotifications();
 				
-				if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture)
+				if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture[_this.centerId])
 				{
 					_this.searchSearch();
 				}
-				else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture)
+				else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture[_this.centerId])
 				{
-					_this.searchGesture(_this.currentSearchGesture, 'valid');
+					_this.searchGesture(_this.currentSearchGesture[_this.centerId], 'valid');
 				}
 				
 			}, this.config['timeoutNotifySwipe']);
@@ -939,7 +947,7 @@
 	{
 		gestureReceived = event.toLowerCase();
 		gestureReceived = gestureReceived.replace('wave', 'hello');
-		this.currentSearchGesture = gestureReceived;
+		this.currentSearchGesture[centerId] = gestureReceived;
 	}
 	else if(event.indexOf("HELLO") != -1 && this.canNotifyHelp && !this.areBothPointersHere)
 	{
@@ -960,7 +968,7 @@
 			this.player.widgets[0].searchByGesture(gestureReceived);
 			this.isCurrentlyInASearchByGesture = this.player.widgets[0].isCurrentlyInASearchByGesture;
 			
-			$('.notifications').remove();
+			this.removeNotifications();
 			this.searchGesture(gestureReceived, 'valid');
 		}
 		else if(this.currentMode == "FILTER")
@@ -969,7 +977,7 @@
 			{
 				// console.log('FILTER !!!');
 				// this.notifySearch1Gesture(gestureReceived, 'valid');
-				$('.notifications').remove();
+				this.removeNotifications();
 				this.filterGesture(gestureReceived, 'valid');
 				this.searchFilter(gestureReceived);
 			}
@@ -1119,9 +1127,9 @@
 				
 				console.log('TIME TO GO AT : ' + _this.timeToGoAt[_this.centerId], _this.centerId, _this.imgs[_this.centerId]);
 				
-				if(_this.isMosaicFiltered)
-				{
-					if(_this.currentSearchGesture == '')
+				// if(_this.isMosaicFiltered)
+				// {
+					if(_this.currentSearchGesture[_this.centerId] == '')
 					{
 						_this.removeFilter();
 					}
@@ -1129,27 +1137,27 @@
 					{
 						_this.currentMode = 'SEARCH';
 						// console.log(_this.currentSearchGesture);
-						_this.player.widgets[0].searchByGesture(_this.currentSearchGesture);
+						_this.player.widgets[0].searchByGesture(_this.currentSearchGesture[_this.centerId]);
 						_this.isCurrentlyInASearchByGesture = _this.player.widgets[0].isCurrentlyInASearchByGesture;
 						
-						if(_this.timeToGoAt[_this.centerId] === 0 && _this.player.widgets[0].atLeastOneSearchMarker(_this.currentSearchGesture))
+						if(_this.timeToGoAt[_this.centerId] === 0 && _this.player.widgets[0].atLeastOneSearchMarker(_this.currentSearchGesture[_this.centerId]))
 						{
-							_this.player.widgets[0].goToFirstSearchedMarker(_this.currentSearchGesture);
+							_this.player.widgets[0].goToFirstSearchedMarker(_this.currentSearchGesture[_this.centerId]);
 						}
 						else
 						{
 							_this.player.popcorn.currentTime(_this.timeToGoAt[_this.centerId]);
 						}
 					}
-				}
+				// }
 				// /!\ //
-				else
+				/*else
 				{
 					if(_this.player.popcorn)
 					{
 						_this.player.popcorn.currentTime(_this.timeToGoAt[_this.centerId]);
 					}
-				}
+				}*/
 			});
 		}
 	});
--- a/front_idill/src/mosaic/js/neighbours.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/neighbours.js	Mon Jul 09 14:24:42 2012 +0200
@@ -6,7 +6,11 @@
     ////TEST
     //$('.test').empty();
 	console.log('LISTEN TO NEIGHBOURS');
-	$('.notifications').remove();
+	
+	if(this.currentMode != 'SEARCH')
+	{
+		this.removeNotifications();
+	}
 	
 	if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") != -1)
 	{
@@ -152,6 +156,14 @@
 	{
 		return;
 	}
+	
+	if(this.gestureDelRequested)
+	{
+		var tab = neighbour.attr('id').split('-');
+		var snapshotId = tab[1];
+		this.deselectNeighbour(snapshotId);
+		return;
+	}
 
 	// console.log('test (2)');
 	
@@ -242,18 +254,18 @@
 			{
 				if(_this.currentMode == 'VIDEO')
 				{
-					$('.notifications').remove();
+					_this.removeNotifications();
 					_this.videoMove(snapshotId);
 				}
-				else if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture)
+				else if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture[_this.centerId])
 				{
-					$('.notifications').remove();
+					_this.removeNotifications();
 					_this.searchSearchAndMove(snapshotId);
 				}
-				else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture)
+				else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture[_this.centerId])
 				{
-					$('.notifications').remove();
-					_this.searchGestureAndMove(_this.currentSearchGesture, 'valid', snapshotId);
+					_this.removeNotifications();
+					_this.searchGestureAndMove(_this.currentSearchGesture[_this.centerId], 'valid', snapshotId);
 				}
 				
 				_this.canMoveToNeighbour = true;
@@ -262,18 +274,18 @@
 			{
 				if(_this.currentMode == 'VIDEO')
 				{
-					$('.notifications').remove();
+					_this.removeNotifications();
 					_this.videoMoveAndUnzoom(snapshotId);
 				}
-				else if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture)
+				else if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture[_this.centerId])
 				{
-					$('.notifications').remove();
+					_this.removeNotifications();
 					_this.searchSearchAndMoveAndUnzoom(snapshotId);
 				}
-				else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture)
+				else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture[_this.centerId])
 				{
-					$('.notifications').remove();
-					_this.searchGestureAndMoveAndUnzoom(_this.currentSearchGesture, 'valid', snapshotId);
+					_this.removeNotifications();
+					_this.searchGestureAndMoveAndUnzoom(_this.currentSearchGesture[_this.centerId], 'valid', snapshotId);
 				}
 			}
 		});
@@ -328,15 +340,15 @@
         {
             //Une fois invisible, on le supprime.
             neighbourFrame.remove();
-			$('.notifications').remove();
+			_this.removeNotifications();
 			
-			if(_this.currentMode == 'SEARCH' && !_this.currentSearchGesture)
+			if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture[_this.centerId] == '')
 			{
 				_this.searchSearch();
 			}
-			else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture)
+			else if(_this.currentMode == 'SEARCH' && _this.currentSearchGesture[_this.centerId] != '')
 			{
-				_this.searchGesture(_this.currentSearchGesture, 'valid');
+				_this.searchGesture(_this.currentSearchGesture[_this.centerId], 'valid');
 			}
 			
 			_this.canSwipe = true;
@@ -462,7 +474,7 @@
 			_this.exitTimeline('move');
 		}
 		
-		console.log(Math.floor(_this.player.popcorn.currentTime()));
+		// console.log(Math.floor(_this.player.popcorn.currentTime()));
 		if(_this.autoMove)
 		{
 			_this.timeToGoAt[_this.centerId] = 0;
@@ -493,6 +505,15 @@
         left: MPCurrentLeft
     }, _this.config['timeMovingToNeighbour'], function()
     {
+		if(_this.currentSearchGesture[_this.centerId] != '')
+		{
+			console.log('notify move');
+			_this.currentMode = 'SEARCH';
+			_this.isCurrentlyInASearchByGesture = true;
+			_this.removeNotifications();
+			_this.searchGesture(_this.currentSearchGesture[_this.centerId], 'valid');
+		}
+		
         //On fait apparaître le snapshot vers lequel on s'est déplacé.
         $('#snapshotDiv-' + destinationId).fadeTo(_this.config['zoomTime'], '1', function()
         {
--- a/front_idill/src/mosaic/js/notifications.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/notifications.js	Mon Jul 09 14:24:42 2012 +0200
@@ -14,21 +14,35 @@
 		return;
 	}
 	
-	this.removeSelectionSearchMosaicFull();
-	this.removePointMosaicPrezoom();
+	console.log('HELP DISPLAYED');
+	
+	this.removeNotifications();
 	
 	this.helpDisplayed = true;
 	
-	var search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'rythme', 'slow', 'spin', 'up_down', 'wave'];
-	var search_2hands_tab_opacities = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5];
-	var search_body_tab = ['chute', 'knee_up', 'jump', 'bend'];
-	var search_body_tab_opacities = [1, 1, 1, 1];
+	var search_2hands_tab;
+	var search_2hands_tab_opacities;
+	var search_body_tab;
+	var search_body_tab_opacities;
+	var controls_1hand_tab;
 	var controls_1hand_tab;
-	var controls_1hand_tab_1;
-	var controls_1hand_tab_2;
+	var controls_1hand_tab_opacities;
 	var controls_1hand_tab_opacities;
-	var controls_1hand_tab_opacities_1;
-	var controls_1hand_tab_opacities_2;
+	
+	var img_directory = './pictos/help/';
+	
+	if(this.mouseInteractions)
+	{
+		search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave', 'chute', 'knee_up', 'jump', 'bend'];
+		search_2hands_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
+	}
+	else
+	{
+		search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave'];
+		search_body_tab = ['chute', 'knee_up', 'jump', 'bend'];
+		search_2hands_tab_opacities = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5];
+		search_body_tab_opacities = [1, 1, 1, 1];
+	}
 	
 	if(inMosaic)
 	{
@@ -37,10 +51,8 @@
 	}
 	else
 	{
-		controls_1hand_tab_1 = ['deplacer', 'precedent', 'suivant', 'mosaique_horizontal', 'mosaique_vertical'];
-		controls_1hand_tab_2 = ['move_down', 'move_up', 'move_right', 'move_left'];
-		controls_1hand_tab_opacities_1 = [1, 1, 1, 1, 1];
-		controls_1hand_tab_opacities_2 = [1, 1, 1, 1];
+		controls_1hand_tab = ['deplacer', 'precedent', 'suivant', 'mosaique_horizontal', 'mosaique_vertical', 'move_down', 'move_up', 'move_right', 'move_left'];
+		controls_1hand_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1];
 	}
 	
 	//On spécifie les notifications en div.
@@ -55,58 +67,47 @@
 	}
 	search_2hands_imgs += "</div>";
 	
-	var search_body_text = "<div id='search_body_text'></div>";
-	var search_body_imgs = "<div id='search_body_imgs' class='notify_imgs'>"
+	var search_body_text;
+	var search_body_imgs;
 	
-	for(var i = 0 ; i < search_body_tab.length ; i++)
+	if(!this.mouseInteractions)
 	{
-		search_body_imgs += "<div id='body_" + search_body_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_body_tab_opacities[i] + ";'></div>";
+		search_body_text = "<div id='search_body_text'></div>";
+		search_body_imgs = "<div id='search_body_imgs' class='notify_imgs'>"
+		
+		for(var i = 0 ; i < search_body_tab.length ; i++)
+		{
+			search_body_imgs += "<div id='body_" + search_body_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_body_tab_opacities[i] + ";'></div>";
+		}
+		search_body_imgs += "</div>";
 	}
-	search_body_imgs += "</div>";
 	
 	var controls_title = "<div id='controls_title'></div>";
 	var controls_img = "<div id='controls_img' class='notify_imgs'></div>";
 	var controls_1hand_text = "<div id='controls_1hand_text'></div>";
 	var controls_1hand_imgs;
-	var controls_1hand_imgs_1;
-	var controls_1hand_imgs_2;
+	var controls_1hand_imgs;
 	
-	if(inMosaic)
+	controls_1hand_imgs = "<div id='controls_1hand_imgs' class='notify_imgs'>";
+	for(var i = 0 ; i < controls_1hand_tab.length ; i++)
 	{
-		controls_1hand_imgs = "<div id='controls_1hand_imgs' class='notify_imgs'>";
-		for(var i = 0 ; i < controls_1hand_tab.length ; i++)
-		{
-			controls_1hand_imgs += "<div id='1hand_" + controls_1hand_tab[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities[i] + ";'></div>";
-		}
-		controls_1hand_imgs += "</div>";
+		controls_1hand_imgs += "<div id='1hand_" + controls_1hand_tab[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities[i] + ";'></div>";
+	}
+	controls_1hand_imgs += "</div>";
+	
+	var help_search;
+	
+	if(this.mouseInteractions)
+	{
+		help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + "</div>";
 	}
 	else
 	{
-		controls_1hand_imgs_1 = "<div id='controls_1hand_imgs_1' class='notify_imgs'>";
-		controls_1hand_imgs_2 = "<div id='controls_1hand_imgs_2' class='notify_imgs'>";
-		for(var i = 0 ; i < controls_1hand_tab_1.length ; i++)
-		{
-			controls_1hand_imgs_1 += "<div id='1hand_" + controls_1hand_tab_1[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities_1[i] + ";'></div>";
-		}
-		controls_1hand_imgs_1 += "</div>";
-		for(var i = 0 ; i < controls_1hand_tab_2.length ; i++)
-		{
-			controls_1hand_imgs_2 += "<div id='1hand_" + controls_1hand_tab_2[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities_2[i] + ";'></div>";
-		}
-		controls_1hand_imgs_2 += "</div>";
+		help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + search_body_text + search_body_imgs + "</div>";
 	}
-	
-	var help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + search_body_text + search_body_imgs + "</div>";
 	var help_controls;
 
-	if(inMosaic)
-	{
-		help_controls = "<div id='help_controls'>" + controls_title + controls_img + controls_1hand_text + controls_1hand_imgs + "</div>";
-	}
-	else
-	{
-		help_controls = "<div id='help_controls'>" + controls_title + controls_img + controls_1hand_text + controls_1hand_imgs_1 + controls_1hand_imgs_2 + "</div>";
-	}
+	help_controls = "<div id='help_controls'>" + controls_title + controls_img + controls_1hand_text + controls_1hand_imgs + "</div>";
 	
 	var notification_help = "<div id='notify_help'>" + help_search + "<div id='help_sep'></div>" + help_controls + "</div>";
 	
@@ -130,78 +131,92 @@
 	
 	// console.log(($('#help_search').width() - ($('.notify_imgs_small').width() * 5 + parseInt($('.notify_imgs_small').css('margin')))) / 2);
 	
+	var margins = parseInt($('.notify_imgs_small').css('margin'));
+	var widths = $('.notify_imgs_small').width();
+	var heights = $('.notify_imgs_small').height();
+	
+	var sep_left = $('#help_sep').position().left;
+	var help_margin = parseInt($('#notify_help').css('margin'));
+	
+	//On calcule la taille d'une zone de recherche (une des deux parties).
+	var help_column_width = sep_left - help_margin;
+	//Longueur d'une image.
+	var img_width = (margins * 2 + widths);
+	//Longueur totale des images de recherche à deux mains mises bout à bout.
+	// var search_2hands_total_width = search_2hands_tab.length * img_width;
+	
+	//On récupère le nombre d'images affichables horizontalement pour les gestures de recherche à deux mains dans une des parties de l'aide.
+	var search_2hands_n_imgs = Math.floor(help_column_width / img_width);
+	//Calcul du padding-left de cette section.
+	var search_2hands_padding_left = (help_column_width - search_2hands_n_imgs * img_width) / 2;
+	
 	$('#search_2hands_imgs').css(
 	{
-		'padding-left': ($('#help_search').width() - ($('.notify_imgs_small').width() * 5 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
-		'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
-	});
-	
-	$('#search_body_imgs').css(
-	{
-		'padding-left': ($('#help_search').width() - ($('.notify_imgs_small').width() * 4 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
+		// 'padding-left': ($('#help_search').width() - ($('.notify_imgs_small').width() * 5 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
+		'padding-left': search_2hands_padding_left,
 		'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
 	});
 	
-	if(inMosaic)
-	{
-		$('#controls_1hand_imgs').css(
-		{
-			'padding-left': ($('#help_controls').width() - ($('.notify_imgs_small').width())) / 2,
-			'height': ($('.notify_imgs_small').height())
-		});
-	}
-	else
+	//On récupère le nombre d'images affichables horizontalement pour les gestures de recherche corporelles dans une des parties de l'aide.
+	var search_body_n_imgs = Math.floor(help_column_width / img_width);
+	//Calcul du padding-left de cette section.
+	var search_body_padding_left = (help_column_width - search_body_n_imgs * img_width) / 2;
+	
+	$('#search_body_imgs').css(
 	{
-		$('#controls_1hand_imgs_1').css(
-		{
-			'padding-left': ($('#help_controls').width() - ($('.notify_imgs_small').width() * 5 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
-			'height': ($('.notify_imgs_small').height())
-		});
-		$('#controls_1hand_imgs_2').css(
-		{
-			'padding-left': ($('#help_controls').width() - ($('.notify_imgs_small').width() * 4 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
-			'height': ($('.notify_imgs_small').height())
-		});
-	}
+		// 'padding-left': ($('#help_search').width() - ($('.notify_imgs_small').width() * 4 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
+		'padding-left': search_body_padding_left,
+		'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
+	});
+	
+	//On récupère le nombre d'images affichables horizontalement pour les gestures de controle dans une des parties de l'aide.
+	var controls_1hand_n_imgs = Math.floor(help_column_width / img_width);
+	//Calcul du padding-left de cette section.
+	var controls_1hand_padding_left = (help_column_width - controls_1hand_n_imgs * img_width) / 2;
+	
+	$('#controls_1hand_imgs').css(
+	{
+		// 'padding-left': ($('#help_controls').width() - ($('.notify_imgs_small').width())) / 2,
+		'padding-left': controls_1hand_padding_left,
+		'height': ($('.notify_imgs_small').height())
+	});
 	
 	var search_width = $('#help_search').width();
 	
 	$('#search_title').html('Recherche');
-	$('#search_2hands_text').html('Gestes à effectuer avec les deux mains');
-	$('#search_body_text').html('Gestes à effectuer avec le corps entier');
+	
+	if(this.mouseInteractions)
+	{
+		$('#search_2hands_text').html('Courbes à effectuer avec la souris');
+	}
+	else
+	{
+		$('#search_2hands_text').html('Gestes à effectuer avec les deux mains');
+	}
 	
 	for(var i = 0 ; i < search_2hands_tab.length ; i++)
 	{
-		$("#2hands_" + search_2hands_tab[i]).css("background-image", "url('./pictos/help/" + search_2hands_tab[i] + ".png')");
+		$("#2hands_" + search_2hands_tab[i]).css("background-image", "url('" + img_directory + 'MI/' + search_2hands_tab[i] + ".png')");
 		//console.log("url('../../pictos/help/" + search_2hands_tab[i] + ".png')");
 	}
 	
-	for(var i = 0 ; i < search_body_tab.length ; i++)
+	if(!this.mouseInteractions)
 	{
-		$("#body_" + search_body_tab[i]).css("background-image", "url('./pictos/help/" + search_body_tab[i] + ".png')");
-		//console.log("url('../../pictos/help/" + search_2hands_tab[i] + ".png')");
+		$('#search_body_text').html('Gestes à effectuer avec le corps entier');
+		
+		for(var i = 0 ; i < search_body_tab.length ; i++)
+		{
+			$("#body_" + search_body_tab[i]).css("background-image", "url('" + img_directory + search_body_tab[i] + ".png')");
+			//console.log("url('../../pictos/help/" + search_2hands_tab[i] + ".png')");
+		}
 	}
 	
 	$('#controls_title').html('Contrôles');
 	$('#controls_1hand_text').html('Gestes à effectuer avec une seule main');
 	
-	if(inMosaic)
-	{
-		for(var i = 0 ; i < controls_1hand_tab.length ; i++)
-		{
-			$("#1hand_" + controls_1hand_tab[i]).css("background-image", "url('./pictos/help/" + controls_1hand_tab[i] + ".png')");
-		}
-	}
-	else
+	for(var i = 0 ; i < controls_1hand_tab.length ; i++)
 	{
-		for(var i = 0 ; i < controls_1hand_tab_1.length ; i++)
-		{
-			$("#1hand_" + controls_1hand_tab_1[i]).css("background-image", "url('./pictos/help/" + controls_1hand_tab_1[i] + ".png')");
-		}
-		for(var i = 0 ; i < controls_1hand_tab_2.length ; i++)
-		{
-			$("#1hand_" + controls_1hand_tab_2[i]).css("background-image", "url('./pictos/help/" + controls_1hand_tab_2[i] + ".png')");
-		}
+		$("#1hand_" + controls_1hand_tab[i]).css("background-image", "url('" + img_directory + controls_1hand_tab[i] + ".png')");
 	}
 	
 	//On les fait apparaître.
@@ -253,7 +268,7 @@
 	//Si on a effectué une demande de recherche auparavant, on supprime la notification de demande de recherche.
 	if($('#notify_search').length > 0)
 	{
-		$('.notifications').remove();
+		this.removeNotifications();
 	}
 	
 	var _this = this;
@@ -1061,11 +1076,12 @@
 */
 mosaic.prototype.searchGesture = function(gestureName, mode)
 {
-	if(this.currentMode != 'SEARCH' || !this.isCurrentlyInASearchByGesture)
+	console.log('NOTIFY GESTURE ' + this.currentMode + ' ' + this.centerId + ' ' + this.currentSearchGesture[this.centerId]);
+	if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
 	{
 		return;
 	}
-	
+	console.log('NOTIFY GESTURE');
 	var _this = this;
 	
 	//On spécifie les notifications en div.
@@ -1081,8 +1097,10 @@
 	var notify_margin = parseInt($('.notifications').css('margin'));
 	var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
 	
+	// console.log('SHOW GESTURE NOTIFICATION 1');
 	if(_.include(this.gestures, gestureName))
 	{
+		// console.log('SHOW GESTURE NOTIFICATION 2');
 		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
 	}
 	else if(mode == 'none')
@@ -1425,4 +1443,13 @@
 	{
 		opacity: "0.9"
 	});
+}
+
+/*
+ * Efface les notifications.
+*/
+mosaic.prototype.removeNotifications = function()
+{
+	// console.trace();
+	$('.notifications').remove();
 }
\ No newline at end of file
--- a/front_idill/src/mosaic/js/playerControl.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/playerControl.js	Mon Jul 09 14:24:42 2012 +0200
@@ -79,7 +79,7 @@
 	{
 		console.log('(5) QUIT');
 		// console.trace();
-		$('.notifications').remove();
+		this.removeNotifications();
 		
 		this.isTLRequested = false;
 		this.canSlideInTL = false;
@@ -123,7 +123,7 @@
 			{
 				this.currentMode = 'SEARCH';
 				
-				this.searchGesture(this.currentSearchGesture, 'valid');
+				this.searchGesture(this.currentSearchGesture[this.centerId], 'valid');
 			}
 			else
 			{
--- a/front_idill/src/mosaic/js/pointers.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/pointers.js	Mon Jul 09 14:24:42 2012 +0200
@@ -295,7 +295,7 @@
 					//On permet l'interaction après un laps de temps.
 					_this.canSlideInTL = true;
 					
-					$('.notifications').remove();
+					_this.removeNotifications();
 					_this.timelineTimeline();
 					
 					// console.log('(4) TIMELINE SLIDE ' + _this.date());
@@ -574,7 +574,7 @@
 					//On permet l'interaction après un laps de temps.
 					_this.canSlideInTL = true;
 					
-					$('.notifications').remove();
+					_this.removeNotifications();
 					_this.timelineTimeline();
 					
 					// console.log('(4) TIMELINE SLIDE ' + _this.date());
@@ -818,7 +818,7 @@
 			
 			console.log(_this.date() + ' - ENTRE EN MODE FILTRAGE');
 			
-			$('.notifications').remove();
+			_this.removeNotifications();
 			_this.filterSearch();
 		}
 		else if(_this.currentMode == "VIDEO" || _this.currentMode == "TIMELINE")
@@ -828,7 +828,7 @@
 			console.log(_this.date() + ' - ENTRE EN MODE RECHERCHE');
 			// console.log('');
 			
-			$('.notifications').remove();
+			_this.removeNotifications();
 			_this.searchSearch();
 		}
 		
@@ -969,7 +969,12 @@
 						
 						_this.alreadyOnNotification = false;
 						_this.isCurrentlyInASearchByGesture = false;
-						_this.currentSearchGesture = '';
+						
+						if(_this.currentMode != 'MOSAIC' && _this.currentMode != 'FILTER')
+						{
+							_this.currentSearchGesture[_this.centerId] = '';
+						}
+						
 						_this.canNotifyHelp = false;
 					}, this.config['timeoutRemoveNotificationByGesture']);
 				}
@@ -1019,16 +1024,18 @@
 	{
 		if(x > notification_search.position().left && x < (+notification_search.position().left + notification_search.width()) && y > notification_search.position().top && y < (+notification_search.position().top + notification_search.height()))
 		{
-			$('.notifications').remove();
+			_this.removeNotifications();
 			if(_this.currentMode == 'SEARCH')
 			{
 				_this.player.widgets[0].removeSearchByGesture();
 				_this.currentMode = 'VIDEO';
+				_this.currentSearchGesture[_this.centerId] = '';
 			}
 			else if(_this.currentMode == 'TIMELINE')
 			{
 				_this.player.widgets[0].removeSearchByGesture();
 				_this.currentMode = 'TIMELINE';
+				_this.currentSearchGesture[_this.centerId] = '';
 			}
 			else if(_this.currentMode == 'FILTER')
 			{
--- a/front_idill/src/mosaic/js/search.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/search.js	Mon Jul 09 14:24:42 2012 +0200
@@ -152,10 +152,16 @@
 */
 mosaic.prototype.searchFilter = function(type)
 {
+	// type = 'a';
 	var _this = this;
 	
 	if(this.currentMode == "FILTER")
 	{
+		for(var i = 0 ; i < this.config['imagesToShow'] ; i++)
+		{
+			this.currentSearchGesture[i] = type;
+		}
+		
 		this.filterSearchedType = type;
 		
 		// console.log('Annotations length : ' + this.annotations.length);
@@ -204,8 +210,19 @@
 			//On affiche l'opacité résultante pour chaque vidéo.
 			for(var i = 0 ; i < this.config['imagesToShow'] ; i++)// in gestureNumberByVideo)
 			{
+				//Toutes les videos ont cette recherche.
+				this.filterSearchedType[i] = type;
 				//Opacité conventionelle.
-				var opacity = gestureNumberByVideo[this.urls[i]] / maxAnnotationNumber;
+				var opacity;
+				if(maxAnnotationNumber > 0)
+				{
+					opacity = gestureNumberByVideo[this.urls[i]] / maxAnnotationNumber;
+				}
+				else
+				{
+					opacity = 0;
+				}
+				
 				// console.log('opacity b : ' + opacity + ' for ' + gestureNumberByVideo[i]);
 				//Ce qui est à zéro le restera (par conséquent le snapshot associé sera invisible).
 				if(opacity > 0)
@@ -305,6 +322,11 @@
 		this.isMosaicFiltered = false;
 		this.filterSearchedType = '';
 		
+		for(var i = 0 ; i < this.config['imagesToShow'] ; i++)
+		{
+			this.currentSearchGesture[i] = '';
+		}
+		
 		$('#notify_search').remove();
 		$('#notify_search_1gesture').remove();
 		$('.filterHiders').remove();
--- a/front_idill/src/mosaic/js/zoomInteractions.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/mosaic/js/zoomInteractions.js	Mon Jul 09 14:24:42 2012 +0200
@@ -4,7 +4,7 @@
  */
 mosaic.prototype.preZoom = function(snapshot)
 {
-	if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") > -1 || snapshot == null || this.helpDisplayed || this.isMosaicFiltering || this.isSearchByCurvesOn)
+	if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") > -1 || snapshot == null || this.helpDisplayed || this.isMosaicFiltering || this.isSearchByCurvesOn || this.gestureDelRequested)
 	{
 		return;
 	}
@@ -16,7 +16,7 @@
 	this.preUnzoom();
 	//On enlève les notifications initiales si elles existent.
 	// this.removeSelectionSearchMosaicFull();
-	$('.notifications').remove();
+	this.removeNotifications();
 	
     //Mosaïque.
     var _this = this;
@@ -164,17 +164,17 @@
 			
 			if(_this.currentMode == 'MOSAIC')
 			{
-				$('.notifications').remove();
+				_this.removeNotifications();
 				_this.mosaicSelection();
 			}
 			else if(_this.currentMode == 'FILTER' && !_this.filterSearchedType && _this.curvesGesturesFound)
 			{
-				$('.notifications').remove();
+				_this.removeNotifications();
 				_this.filterSearchAndSelection();
 			}
 			else if(_this.currentMode == 'FILTER' && _this.filterSearchedType)
 			{
-				$('.notifications').remove();
+				_this.removeNotifications();
 				_this.filterGestureAndSelection(_this.filterSearchedType, 'valid');
 			}
 		});
@@ -214,17 +214,17 @@
 	
 	if(this.currentMode == 'MOSAIC')
 	{
-		$('.notifications').remove();
+		this.removeNotifications();
 		this.mosaicSelectionAndSearch();
 	}
 	else if(_this.currentMode == 'FILTER' && !this.filterSearchedType && !this.curvesGesturesFound)
 	{
-		$('.notifications').remove();
+		this.removeNotifications();
 		this.filterSearch();
 	}
 	else if(_this.currentMode == 'FILTER' && this.filterSearchedType && !this.curvesGesturesFound)
 	{
-		$('.notifications').remove();
+		this.removeNotifications();
 		this.filterGesture(this.filterSearchedType, 'valid');
 	}
 	/*this.removePointMosaicPrezoom();
@@ -364,6 +364,16 @@
 			_this.listenToNeighbours();
 		}
 		
+		console.log('gesture shown : ' + _this.currentSearchGesture[_this.centerId]);
+		
+		if(_this.currentSearchGesture[_this.centerId] != '')
+		{
+			_this.currentMode = 'SEARCH';
+			_this.isCurrentlyInASearchByGesture = true;
+			_this.removeNotifications();
+			_this.searchGesture(_this.currentSearchGesture[_this.centerId], 'valid');
+		}
+		
 		$('#spinner').remove();
 		$('#mainPointer').css('background-image', 'url(./img/cursors/pointer.png)');
 		$('#secondPointer').css('background-image', 'url(./img/cursors/pointer2.png)');
@@ -437,11 +447,11 @@
 	
 	if(this.mouseInteractions)
 	{
-		$('body').unbind('click');
-		$('body').unbind('mousewheel');
+		$(window).unbind('click');
+		$(window).unbind('mousewheel');
 	
 		//On rebind le clic pour supprimer une recherche.
-		$('body').click(function(e)
+		$(window).click(function(e)
 		{
 			_this.removeSearchNotificationIfOnIt(e.pageX, e.pageY);
 		});
@@ -563,7 +573,7 @@
 			//On remet les notifications initiales si on n'est pas dans une recherche par filtrage.
 			if(_this.currentMode == 'MOSAIC' && !_this.filterSearchedType)
 			{
-				$('.notifications').remove();
+				_this.removeNotifications();
 				// _this.notifySelectionSearchMosaicFull();
 				_this.mosaicSelectionAndSearch();
 			}
Binary file front_idill/src/pictos/help/MI/bend.png has changed
Binary file front_idill/src/pictos/help/MI/knee_up.png has changed
Binary file front_idill/src/pictos/help/arret.png has changed
--- a/front_idill/src/player/metadataplayer/Timeline.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/player/metadataplayer/Timeline.js	Mon Jul 09 14:24:42 2012 +0200
@@ -206,9 +206,6 @@
  * Process the markers.
 */
 IriSP.Widgets.Timeline.prototype.processMarkers = function() {
-	console.trace();
-	console.log('PROCESSING MARKERS');
-	
 	var _this = this;
 	var markers = "";
 	var timelineMiddleTop = this.$timelineMiddle.position().top;
@@ -216,15 +213,12 @@
 	for(var i = 0 ; i < this.annotations.length ; i++)
 	{
 		markers += "<div class='Ldt-Marker' id='" + this.annotations[i].id.replace(":", "_") + "'></div>";
-		// console.log(annotations[i].begin.milliseconds);
 	}
 	
 	this.$.append(markers);
 	var markerHeight = IriSP.jQuery(".Ldt-Marker").height();
 	IriSP.jQuery(".Ldt-Marker").css("z-align", "150");
 	
-	console.log('IN PROCESSING');
-	
 	for(var i = 0 ; i < this.annotations.length ; i++)
 	{
 		IriSP.jQuery("#" + this.annotations[i].id.replace(":", "_")).css(
@@ -235,8 +229,6 @@
 		});
 	}
 	
-	console.log('MARKERS PROCESSED');
-	
 	//On lance l'événement pour dire à popcorn que les marqueurs sont utilisables.
 	// this.player.popcorn.trigger(IriSP.Widgets.Timeline.onMarkersReady);
 	this.player.popcorn.trigger("markersready");
@@ -248,8 +240,6 @@
 */
 IriSP.Widgets.Timeline.prototype.searchByGesture = function(typeName)
 {
-	this.notifySearch1Gesture(typeName, "valid");
-		
 	if(typeName != '' || typeName != undefined)
 	{
 		if(_.include(this.gestures, typeName))
@@ -258,12 +248,6 @@
 			this.hideMarkersSearch(typeName);
 			this.isCurrentlyInASearchByGesture = true;
 		}
-		else
-		{
-			// alert("Unknown gesture type. Operation aborted.");
-			// this.removeSearch1Gesture();
-			// this.notifySearch1Gesture(typeName, "none");
-		}
 	}
 }
 
@@ -272,7 +256,6 @@
 */
 IriSP.Widgets.Timeline.prototype.removeSearchByGesture = function()
 {
-	this.removeSearch1Gesture();
 	this.hideMarkersSearch();
 	this.isCurrentlyInASearchByGesture = false;
 }
@@ -330,15 +313,8 @@
 		}
 		gesturesStr = gesturesStr.substr(0, gesturesStr.length - 2);
 		
-		/*if(IriSP.jQuery('#notify_search_1gesture').length > 0)
-		{
-			this.removeSearch1Gesture();
-		}*/
-		
 		var typeName = prompt("Please enter a type name among (" + gesturesStr + ").", "");
 		
-		// this.notifySearch1Gesture(typeName, "valid");
-		
 		if(typeName != '' || typeName != undefined)
 		{
 			if(_.include(this.gestures, typeName))
@@ -346,12 +322,6 @@
 				this.currentMode = "SEARCH";
 				this.hideMarkersSearch(typeName);
 			}
-			else
-			{
-				// alert("Unknown gesture type. Operation aborted.");
-				// this.removeSearch1Gesture();
-				// this.notifySearch1Gesture(typeName, "none");
-			}
 		}
 	}
 	
@@ -792,7 +762,6 @@
 	IriSP.jQuery(".search_Marker").fadeOut(this.markerShowTime, function()
 	{
 		IriSP.jQuery("div").remove(".search_Marker");
-		_this.removeSearch1Gesture();
 		
 		if(type == undefined)
 		{
@@ -803,7 +772,6 @@
 			// console.log('(1)');
 			// console.log(_this.currentMode);
 			_this.showMarkersSearchByType(type);
-			// _this.notifySearch1Gesture(type, "valid");
 			return;
 		}
 	});
@@ -812,7 +780,6 @@
 	{
 		// console.log('(2)');
 		this.showMarkersSearchByType(type);
-		_this.removeSearch1Gesture();
 		
 		if(!_.include(this.gestures, type))
 		{
@@ -833,91 +800,6 @@
 }
 
 /*
- * Affiche la notification de validation/survol de gesture de recherche.
- * Mode prend pour valeurs : "valid" ou "hover".
-*/
-IriSP.Widgets.Timeline.prototype.notifySearch1Gesture = function(gestureName, mode)
-{
-	// console.log('C');
-	if(IriSP.jQuery('#notify_search_1gesture').length > 0)
-	{
-		return;
-	}
-	
-	//Si on a effectué une demande de recherche auparavant, on supprime la notification de demande de recherche.
-	if(IriSP.jQuery('#notify_search').length > 0)
-	{
-		$('.notifications').remove();
-	}
-	
-	var _this = this;
-	
-	//On spécifie les notifications en div.
-	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
-	
-	//On les ajoute à la mosaïque.
-	$('body').append(notification_search_1gesture);
-	
-	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
-	
-	//On calcule leurs coordonnées et dimensions.
-	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
-	var notify_margin = parseInt($('.notifications').css('margin'));
-	var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
-	
-	if(_.include(this.gestures, gestureName))
-	{
-		IriSP.jQuery('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + mode + '/' + gestureName + '.png")');
-	}
-	else if(mode == 'none')
-	{
-		IriSP.jQuery('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
-	}
-	
-	if(mode != 'none')
-	{
-		/*IriSP.jQuery('#notify_search_1gesture').mouseover(function()
-		{
-			IriSP.jQuery(this).css('background-image', 'url("./pictos/big/hover/' + gestureName + '.png")');
-		}).mouseout(function()
-		{
-			IriSP.jQuery(this).css('background-image', 'url("./pictos/big/valid/' + gestureName + '.png")');
-		}).click(function()
-		{
-			_this.removeSearch1Gesture();
-			_this.hideMarkersSearch();
-		});*/
-	}
-	
-	var notifyTop = this.player.config.gui.zoomTop, notifyLeft = this.player.config.gui.zoomLeft;
-	
-	//On les positionne.
-	$('#notify_search_1gesture').css(
-	{
-		// top: -notifyTop,
-		top: 0,//-notifyTop,
-		// left: -notifyLeft + (IriSP.jQuery(window).width() - notify_width) / 2
-		left: (IriSP.jQuery(window).width() - notify_width) / 2
-	});
-	
-	//On les fait apparaître.
-	$('.notifications').css(
-	{
-		opacity: "0.9"
-	});
-}
-
-/*
- * Supprime la notification de recherche de gesture.
-*/
-IriSP.Widgets.Timeline.prototype.removeSearch1Gesture = function()
-{
-	// console.log('R');
-	// console.trace();
-	IriSP.jQuery('#notify_search_1gesture').remove();
-}
-
-/*
  * Va au marqueur suivant/précédant lors d'un swipe right/left dans une lecture simple.
  * Prend comme argument le fait qu'il s'agisse d'un swipe left ou non (en prenant en condition toujours vraie 
  * que la fonction est appelée si et seulement si il y a swipe et que l'utilisateur ne tente pas d'aller vers un voisin.
--- a/front_idill/src/search/js/curvesDetector.js	Fri Jul 06 13:44:25 2012 +0200
+++ b/front_idill/src/search/js/curvesDetector.js	Mon Jul 09 14:24:42 2012 +0200
@@ -175,6 +175,7 @@
 		if(this.MPActualDist > this.sizeTreshold && MPCurrentA != -1)
 		{
 			console.log(this.MPActualAngle, MPCurrentA, this.MPActualAngle != -1, this.MPActualAngle != MPCurrentA);
+			
 			if(this.MPActualAngle == -1 || this.MPActualAngle != MPCurrentA)
 			{
 				this.MPActualAngle = MPCurrentA;
@@ -191,13 +192,29 @@
 				{
 					console.log('many curves');
 					this.mosaic.curvesGesturesFound = true;
-					$('.notifications').remove();
+					this.mosaic.removeNotifications();
 					this.mosaic.curvesGestures(foundGestures);
+					
+					if(foundGestures.length == 0 && !this.mosaic.helpDisplayed)
+					{
+						this.mosaic.notifyHelp();
+						foundGestures = '';
+						this.mosaic.curvesGesturesFound = false;
+						this.mosaic.isSearchByCurvesOn = false;
+						this.mosaic.leaveSearch();
+					}
+					else if(foundGestures.split(';').length != 1 && this.mosaic.helpDisplayed)
+					{
+						if(this.mosaic.helpDisplayed)
+						{
+							this.mosaic.removeHelp();
+						}
+					}
 				}
 				else
 				{
 					// console.log(this.mosaic.currentMode);
-					this.mosaic.currentSearchGesture = foundGestures;
+					this.mosaic.currentSearchGesture[this.mosaic.centerId] = foundGestures;
 					this.mosaic.isUserInSearchZone = false;
 					
 					if(this.mosaic.currentMode == "SEARCH" && this.mosaic.playerIsReady)
@@ -205,9 +222,16 @@
 						this.mosaic.player.widgets[0].searchByGesture(foundGestures);
 						this.mosaic.isCurrentlyInASearchByGesture = this.mosaic.player.widgets[0].isCurrentlyInASearchByGesture;
 						
-						$('.notifications').remove();
+						this.mosaic.removeNotifications();
 						this.mosaic.searchGesture(foundGestures, 'valid');
 						
+						if(this.mosaic.player && this.mosaic.player.widgets[0] && this.mosaic.timeToGoAt[this.mosaic.centerId] === 0 && this.mosaic.player.widgets[0].atLeastOneSearchMarker(this.mosaic.currentSearchGesture[this.mosaic.centerId]))
+						{
+							this.mosaic.player.widgets[0].goToFirstSearchedMarker(this.mosaic.currentSearchGesture[this.mosaic.centerId]);
+						}
+						
+						this.mosaic.currentSearchGesture[this.mosaic.centerId] = foundGestures;
+						
 						foundGestures = '';
 						this.mosaic.curvesGesturesFound = false;
 						
@@ -223,7 +247,7 @@
 							this.mosaic.searchFilter(foundGestures);
 							this.mosaic.curvesGesturesFound = false;
 							
-							$('.notifications').remove();
+							this.mosaic.removeNotifications();
 							this.mosaic.filterGesture(foundGestures, 'valid');
 							
 							foundGestures = '';
Binary file front_idill/src/snapshots-little/50 shots.jpg has changed
Binary file front_idill/src/snapshots-little/alger.jpg has changed
Binary file front_idill/src/snapshots-little/animalz.jpg has changed
Binary file front_idill/src/snapshots-little/aside.jpg has changed
Binary file front_idill/src/snapshots-little/deep end dance.jpg has changed
Binary file front_idill/src/snapshots-little/encontro cotidianos.jpg has changed
Binary file front_idill/src/snapshots-little/exotica.jpg has changed
Binary file front_idill/src/snapshots-little/fenella.jpg has changed
Binary file front_idill/src/snapshots-little/flying lesson.jpg has changed
Binary file front_idill/src/snapshots-little/i am my mother.jpg has changed
Binary file front_idill/src/snapshots-little/instrument.jpg has changed
Binary file front_idill/src/snapshots-little/joudance 2 in asakusa_stage1.jpg has changed
Binary file front_idill/src/snapshots-little/mue.jpg has changed
Binary file front_idill/src/snapshots-little/new under the sun.jpg has changed
Binary file front_idill/src/snapshots-little/nid de lune.jpg has changed
Binary file front_idill/src/snapshots-little/patria.jpg has changed
Binary file front_idill/src/snapshots-little/respire.jpg has changed
Binary file front_idill/src/snapshots-little/sliced.jpg has changed
Binary file front_idill/src/snapshots-little/stronger.jpg has changed
Binary file front_idill/src/snapshots-little/tank man tango a tiananmen memorial.jpg has changed
Binary file front_idill/src/snapshots-little/the rat.jpg has changed
Binary file front_idill/src/snapshots-little/vrtti.jpg has changed
Binary file front_idill/src/snapshots-little/you are you.jpg has changed
Binary file front_idill/src/snapshots/50 shots.jpg has changed
Binary file front_idill/src/snapshots/alger.jpg has changed
Binary file front_idill/src/snapshots/animalz.jpg has changed
Binary file front_idill/src/snapshots/aside.jpg has changed
Binary file front_idill/src/snapshots/deep end dance.jpg has changed
Binary file front_idill/src/snapshots/encontro cotidianos.jpg has changed
Binary file front_idill/src/snapshots/exotica.jpg has changed
Binary file front_idill/src/snapshots/fenella.jpg has changed
Binary file front_idill/src/snapshots/flying lesson.jpg has changed
Binary file front_idill/src/snapshots/i am my mother.jpg has changed
Binary file front_idill/src/snapshots/instrument.jpg has changed
Binary file front_idill/src/snapshots/joudance 2 in asakusa_stage1.jpg has changed
Binary file front_idill/src/snapshots/mue.jpg has changed
Binary file front_idill/src/snapshots/new under the sun.jpg has changed
Binary file front_idill/src/snapshots/nid de lune.jpg has changed
Binary file front_idill/src/snapshots/patria.jpg has changed
Binary file front_idill/src/snapshots/respire.jpg has changed
Binary file front_idill/src/snapshots/sliced.jpg has changed
Binary file front_idill/src/snapshots/stronger.jpg has changed
Binary file front_idill/src/snapshots/tank man tango a tiananmen memorial.jpg has changed
Binary file front_idill/src/snapshots/the rat.jpg has changed
Binary file front_idill/src/snapshots/vrtti.jpg has changed
Binary file front_idill/src/snapshots/you are you.jpg has changed