front_idill/src/player/metadataplayer/Timeline.js
changeset 47 4e1ee94d70b1
parent 46 9d7a2aa112fb
child 52 277c94533395
--- 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.