front_idill/src/mosaic/js/notifications.js
author bastiena
Mon, 09 Jul 2012 14:24:42 +0200
changeset 47 4e1ee94d70b1
parent 46 9d7a2aa112fb
child 52 277c94533395
permissions -rw-r--r--
Front IDILL: Help adapted to screen size & mouse interactions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     1
/* ===============================================
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     2
 *												   *
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     3
 *		      ZONE DES NOTIFICATIONS			   *
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     4
 *												   *
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     5
   =============================================== */
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     6
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     7
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     8
 * Affiche l'aide.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
     9
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    10
mosaic.prototype.notifyHelp = function(inMosaic)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    11
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    12
	if(this.helpDisplayed)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    13
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    14
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    15
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    16
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    17
	console.log('HELP DISPLAYED');
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    18
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    19
	this.removeNotifications();
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    20
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    21
	this.helpDisplayed = true;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    22
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    23
	var search_2hands_tab;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    24
	var search_2hands_tab_opacities;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    25
	var search_body_tab;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    26
	var search_body_tab_opacities;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    27
	var controls_1hand_tab;
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    28
	var controls_1hand_tab;
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    29
	var controls_1hand_tab_opacities;
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    30
	var controls_1hand_tab_opacities;
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    31
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    32
	var img_directory = './pictos/help/';
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    33
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    34
	if(this.mouseInteractions)
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    35
	{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    36
		search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave', 'chute', 'knee_up', 'jump', 'bend'];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    37
		search_2hands_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    38
	}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    39
	else
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    40
	{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    41
		search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave'];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    42
		search_body_tab = ['chute', 'knee_up', 'jump', 'bend'];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    43
		search_2hands_tab_opacities = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    44
		search_body_tab_opacities = [1, 1, 1, 1];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    45
	}
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    46
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    47
	if(inMosaic)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    48
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    49
		controls_1hand_tab = ['selection'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    50
		controls_1hand_tab_opacities = [1];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    51
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    52
	else
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    53
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    54
		controls_1hand_tab = ['deplacer', 'precedent', 'suivant', 'mosaique_horizontal', 'mosaique_vertical', 'move_down', 'move_up', 'move_right', 'move_left'];
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    55
		controls_1hand_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1];
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    56
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    57
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    58
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    59
	var search_title = "<div id='search_title'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    60
	var search_img = "<div id='search_img' class='notify_imgs'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    61
	var search_2hands_text = "<div id='search_2hands_text'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    62
	var search_2hands_imgs = "<div id='search_2hands_imgs' class='notify_imgs_big'>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    63
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    64
	for(var i = 0 ; i < search_2hands_tab.length ; i++)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    65
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    66
		search_2hands_imgs += "<div id='2hands_" + search_2hands_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_2hands_tab_opacities[i] + ";'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    67
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    68
	search_2hands_imgs += "</div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    69
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    70
	var search_body_text;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    71
	var search_body_imgs;
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    72
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    73
	if(!this.mouseInteractions)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    74
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    75
		search_body_text = "<div id='search_body_text'></div>";
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    76
		search_body_imgs = "<div id='search_body_imgs' class='notify_imgs'>"
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    77
		
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    78
		for(var i = 0 ; i < search_body_tab.length ; i++)
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    79
		{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    80
			search_body_imgs += "<div id='body_" + search_body_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_body_tab_opacities[i] + ";'></div>";
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    81
		}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    82
		search_body_imgs += "</div>";
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    83
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    84
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    85
	var controls_title = "<div id='controls_title'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    86
	var controls_img = "<div id='controls_img' class='notify_imgs'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    87
	var controls_1hand_text = "<div id='controls_1hand_text'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    88
	var controls_1hand_imgs;
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    89
	var controls_1hand_imgs;
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    90
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    91
	controls_1hand_imgs = "<div id='controls_1hand_imgs' class='notify_imgs'>";
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    92
	for(var i = 0 ; i < controls_1hand_tab.length ; i++)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    93
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    94
		controls_1hand_imgs += "<div id='1hand_" + controls_1hand_tab[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities[i] + ";'></div>";
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    95
	}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    96
	controls_1hand_imgs += "</div>";
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    97
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    98
	var help_search;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
    99
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   100
	if(this.mouseInteractions)
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   101
	{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   102
		help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + "</div>";
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   103
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   104
	else
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   105
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   106
		help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + search_body_text + search_body_imgs + "</div>";
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   107
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   108
	var help_controls;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   109
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   110
	help_controls = "<div id='help_controls'>" + controls_title + controls_img + controls_1hand_text + controls_1hand_imgs + "</div>";
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   111
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   112
	var notification_help = "<div id='notify_help'>" + help_search + "<div id='help_sep'></div>" + help_controls + "</div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   113
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   114
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   115
	$('body').append(notification_help);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   116
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   117
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   118
	var notify_width = $(window).width(), notify_height = $(window).height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   119
	var notify_margin = parseInt($('#notify_help').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   120
	var notify_ = 10;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   121
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   122
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   123
	$('#notify_help').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   124
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   125
		left: "0px",
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   126
		top: "0px",
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   127
		width: notify_width - notify_margin * 2,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   128
		height: notify_height - notify_margin * 2,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   129
		'z-index': 2000
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   130
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   131
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   132
	// console.log(($('#help_search').width() - ($('.notify_imgs_small').width() * 5 + parseInt($('.notify_imgs_small').css('margin')))) / 2);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   133
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   134
	var margins = parseInt($('.notify_imgs_small').css('margin'));
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   135
	var widths = $('.notify_imgs_small').width();
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   136
	var heights = $('.notify_imgs_small').height();
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   137
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   138
	var sep_left = $('#help_sep').position().left;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   139
	var help_margin = parseInt($('#notify_help').css('margin'));
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   140
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   141
	//On calcule la taille d'une zone de recherche (une des deux parties).
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   142
	var help_column_width = sep_left - help_margin;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   143
	//Longueur d'une image.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   144
	var img_width = (margins * 2 + widths);
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   145
	//Longueur totale des images de recherche à deux mains mises bout à bout.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   146
	// var search_2hands_total_width = search_2hands_tab.length * img_width;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   147
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   148
	//On récupère le nombre d'images affichables horizontalement pour les gestures de recherche à deux mains dans une des parties de l'aide.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   149
	var search_2hands_n_imgs = Math.floor(help_column_width / img_width);
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   150
	//Calcul du padding-left de cette section.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   151
	var search_2hands_padding_left = (help_column_width - search_2hands_n_imgs * img_width) / 2;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   152
	
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   153
	$('#search_2hands_imgs').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   154
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   155
		// 'padding-left': ($('#help_search').width() - ($('.notify_imgs_small').width() * 5 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   156
		'padding-left': search_2hands_padding_left,
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   157
		'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   158
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   159
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   160
	//On récupère le nombre d'images affichables horizontalement pour les gestures de recherche corporelles dans une des parties de l'aide.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   161
	var search_body_n_imgs = Math.floor(help_column_width / img_width);
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   162
	//Calcul du padding-left de cette section.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   163
	var search_body_padding_left = (help_column_width - search_body_n_imgs * img_width) / 2;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   164
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   165
	$('#search_body_imgs').css(
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   166
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   167
		// 'padding-left': ($('#help_search').width() - ($('.notify_imgs_small').width() * 4 + parseInt($('.notify_imgs_small').css('margin')))) / 2,
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   168
		'padding-left': search_body_padding_left,
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   169
		'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   170
	});
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   171
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   172
	//On récupère le nombre d'images affichables horizontalement pour les gestures de controle dans une des parties de l'aide.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   173
	var controls_1hand_n_imgs = Math.floor(help_column_width / img_width);
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   174
	//Calcul du padding-left de cette section.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   175
	var controls_1hand_padding_left = (help_column_width - controls_1hand_n_imgs * img_width) / 2;
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   176
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   177
	$('#controls_1hand_imgs').css(
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   178
	{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   179
		// 'padding-left': ($('#help_controls').width() - ($('.notify_imgs_small').width())) / 2,
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   180
		'padding-left': controls_1hand_padding_left,
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   181
		'height': ($('.notify_imgs_small').height())
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   182
	});
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   183
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   184
	var search_width = $('#help_search').width();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   185
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   186
	$('#search_title').html('Recherche');
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   187
	
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   188
	if(this.mouseInteractions)
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   189
	{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   190
		$('#search_2hands_text').html('Courbes à effectuer avec la souris');
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   191
	}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   192
	else
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   193
	{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   194
		$('#search_2hands_text').html('Gestes à effectuer avec les deux mains');
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   195
	}
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   196
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   197
	for(var i = 0 ; i < search_2hands_tab.length ; i++)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   198
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   199
		$("#2hands_" + search_2hands_tab[i]).css("background-image", "url('" + img_directory + 'MI/' + search_2hands_tab[i] + ".png')");
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   200
		//console.log("url('../../pictos/help/" + search_2hands_tab[i] + ".png')");
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   201
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   202
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   203
	if(!this.mouseInteractions)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   204
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   205
		$('#search_body_text').html('Gestes à effectuer avec le corps entier');
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   206
		
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   207
		for(var i = 0 ; i < search_body_tab.length ; i++)
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   208
		{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   209
			$("#body_" + search_body_tab[i]).css("background-image", "url('" + img_directory + search_body_tab[i] + ".png')");
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   210
			//console.log("url('../../pictos/help/" + search_2hands_tab[i] + ".png')");
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   211
		}
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   212
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   213
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   214
	$('#controls_title').html('Contrôles');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   215
	$('#controls_1hand_text').html('Gestes à effectuer avec une seule main');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   216
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   217
	for(var i = 0 ; i < controls_1hand_tab.length ; i++)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   218
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   219
		$("#1hand_" + controls_1hand_tab[i]).css("background-image", "url('" + img_directory + controls_1hand_tab[i] + ".png')");
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   220
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   221
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   222
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   223
	$('#notify_help').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   224
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   225
		opacity: "1"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   226
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   227
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   228
	$('.notify_imgs_big').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   229
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   230
		opacity: "1"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   231
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   232
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   233
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   234
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   235
 * Supprime l'aide.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   236
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   237
mosaic.prototype.removeHelp = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   238
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   239
	if(!this.helpDisplayed)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   240
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   241
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   242
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   243
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   244
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   245
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   246
	$('#notify_help').fadeOut(this.timeNotifyFade, function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   247
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   248
		_this.helpDisplayed = false;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   249
		// _this.canNotifyHelp = false;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   250
		_this.canNotifyHelp = true;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   251
		console.log('CAN NOT NOTIFY HELP');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   252
		$('#notify_help').remove();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   253
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   254
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   255
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   256
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   257
 * Affiche la notification de validation/survol de gesture de filtrage.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   258
 * Mode prend pour valeurs : "valid" ou "hover".
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   259
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   260
mosaic.prototype.notifySearch1Gesture = function(gestureName, mode)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   261
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   262
	// console.log('C');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   263
	if($('#notify_search_1gesture').length > 0)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   264
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   265
		$('#notify_search_1gesture').remove();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   266
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   267
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   268
	//Si on a effectué une demande de recherche auparavant, on supprime la notification de demande de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   269
	if($('#notify_search').length > 0)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   270
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
   271
		this.removeNotifications();
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   272
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   273
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   274
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   275
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   276
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   277
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   278
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   279
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   280
	$('body').append(notification_search_1gesture);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   281
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   282
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   283
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   284
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   285
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   286
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   287
	var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   288
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   289
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   290
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   291
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + mode + '/' + gestureName + '.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   292
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   293
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   294
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   295
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   296
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   297
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   298
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   299
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   300
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   301
		top: 0,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   302
		left: ($(window).width() - notify_width) / 2
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   303
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   304
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   305
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   306
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   307
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   308
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   309
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   310
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   311
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   312
// /!\/!\/!\ //
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   313
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   314
/* NOUVELLES NOTIFICATIONS */
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   315
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   316
// /!\/!\/!\ //
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   317
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   318
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   319
 * Affichage de la notification de sélection & recherche dans la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   320
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   321
mosaic.prototype.mosaicSelectionAndSearch = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   322
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   323
	if(this.currentMode != 'MOSAIC')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   324
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   325
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   326
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   327
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   328
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   329
	var notification_selection = "<div id='notify_selection' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   330
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   331
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   332
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   333
	$('body').append(notification_selection + notification_search);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   334
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   335
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   336
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   337
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   338
	var selection_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   339
	var search_left = selection_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   340
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   341
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   342
	$('#notify_selection').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   343
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   344
		left: selection_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   345
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   346
	$('#notify_search').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   347
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   348
		left: search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   349
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   350
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   351
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   352
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   353
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   354
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   355
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   356
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   357
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   358
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   359
 * Affichage de la notification de sélection dans la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   360
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   361
mosaic.prototype.mosaicSelection = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   362
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   363
	if(this.currentMode != 'MOSAIC')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   364
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   365
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   366
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   367
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   368
	//On spécifie la notification en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   369
	var notification_selection = "<div id='notify_selection' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   370
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   371
	//On l'ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   372
	$('body').append(notification_selection);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   373
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   374
	//On calcule ses coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   375
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   376
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   377
	var selection_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   378
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   379
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   380
	$('#notify_selection').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   381
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   382
		left: selection_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   383
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   384
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   385
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   386
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   387
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   388
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   389
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   390
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   391
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   392
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   393
 * Affichage de la notification de recherche dans une demande de filtrage de la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   394
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   395
mosaic.prototype.filterSearch = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   396
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   397
	if(this.currentMode != 'FILTER' || this.filterSearchedType)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   398
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   399
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   400
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   401
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   402
	// window.location.reload();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   403
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   404
	//On spécifie la notification en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   405
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   406
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   407
	//On l'ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   408
	$('body').append(notification_search);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   409
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   410
	//On calcule ses coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   411
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   412
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   413
	var search_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   414
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   415
	//On la positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   416
	$('#notify_search').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   417
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   418
		left: search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   419
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   420
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   421
	//On la fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   422
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   423
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   424
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   425
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   426
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   427
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   428
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   429
 * Affichage de la notification de recherche & sélection dans une demande de filtrage de la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   430
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   431
mosaic.prototype.filterSearchAndSelection = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   432
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   433
	if(this.currentMode != 'FILTER' || this.filterSearchedType)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   434
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   435
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   436
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   437
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   438
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   439
	var notification_selection = "<div id='notify_selection' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   440
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   441
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   442
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   443
	$('body').append(notification_selection + notification_search);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   444
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   445
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   446
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   447
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   448
	var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   449
	var selection_left = search_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   450
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   451
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   452
	$('#notify_selection').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   453
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   454
		left: selection_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   455
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   456
	$('#notify_search').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   457
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   458
		left: search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   459
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   460
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   461
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   462
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   463
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   464
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   465
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   466
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   467
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   468
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   469
 * Affichage de la notification de résultat de gesture dans la mosaïque filtrée.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   470
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   471
mosaic.prototype.filterGesture = function(gestureName, mode)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   472
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   473
	if(this.currentMode != 'FILTER' || !this.filterSearchedType)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   474
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   475
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   476
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   477
	
46
9d7a2aa112fb Front IDILL:
bastiena
parents: 45
diff changeset
   478
	// console.trace();
9d7a2aa112fb Front IDILL:
bastiena
parents: 45
diff changeset
   479
	
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   480
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   481
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   482
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   483
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   484
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   485
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   486
	$('body').append(notification_search_1gesture);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   487
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   488
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   489
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   490
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   491
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   492
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   493
	var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   494
	
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   495
	// console.log('url("./pictos/big/' + (this.mouseInteractions ? 'MI' : '') + '/' + mode + '/' + gestureName + '.png")');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   496
	
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   497
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   498
	{
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   499
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI' : '') + '/' + (this.gestureDelRequested ? 'hover' : 'valid') + '/' + gestureName + '.png")');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   500
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   501
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   502
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   503
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   504
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   505
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   506
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   507
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   508
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   509
		top: 0,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   510
		left: ($(window).width() - notify_width) / 2
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   511
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   512
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   513
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   514
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   515
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   516
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   517
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   518
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   519
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   520
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   521
 * Affichage de la notification de résultat de gesture & de sélection dans la mosaïque filtrée.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   522
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   523
mosaic.prototype.filterGestureAndSelection = function(gestureName, mode)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   524
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   525
	if(this.currentMode != 'FILTER' || !this.filterSearchedType)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   526
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   527
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   528
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   529
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   530
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   531
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   532
	var notification_selection = "<div id='notify_selection' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   533
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   534
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   535
	$('body').append(notification_search_1gesture + notification_selection);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   536
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   537
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   538
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   539
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   540
	var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   541
	var selection_left = search_1gesture_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   542
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   543
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   544
	{
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   545
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI' : '') + '/' + mode + '/' + gestureName + '.png")');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   546
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   547
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   548
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   549
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   550
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   551
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   552
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   553
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   554
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   555
		left: search_1gesture_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   556
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   557
	$('#notify_selection').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   558
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   559
		left: selection_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   560
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   561
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   562
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   563
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   564
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   565
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   566
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   567
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   568
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   569
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   570
 * Affiche la notification de dezoom.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   571
 * Direction vaut left ou right.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   572
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   573
mosaic.prototype.videoSwipe = function(direction)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   574
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   575
	if(this.currentMode != 'VIDEO' || !this.isSwipe)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   576
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   577
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   578
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   579
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   580
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   581
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   582
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   583
	var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   584
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   585
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   586
	$('body').append(notification_swipe);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   587
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   588
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   589
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   590
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   591
	var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   592
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   593
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   594
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   595
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   596
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   597
	$('#notify_swipe').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   598
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   599
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   600
		left: -notifyLeft + ($(window).width() - notify_width - notify_margin) / 2,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   601
		'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   602
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   603
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   604
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   605
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   606
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   607
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   608
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   609
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   610
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   611
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   612
 * Affichage de la notification de résultat de move vers un voisin.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   613
*/
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   614
mosaic.prototype.videoMove = function(targetId)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   615
{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   616
	if(this.currentMode != 'VIDEO')
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   617
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   618
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   619
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   620
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   621
	var _this = this;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   622
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   623
	//On spécifie les notifications en div.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   624
	var notification_move = "<div id='notify_move' class='notifications'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   625
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   626
	//On les ajoute à la mosaïque.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   627
	$('body').append(notification_move);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   628
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   629
	//On calcule leurs coordonnées et dimensions.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   630
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   631
	var notify_margin = parseInt($('.notifications').css('margin'));
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   632
	var move_left = $(window).width() / 2 - (notify_width) / 2 + notify_margin;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   633
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   634
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   635
	// console.log(this.neighboursIds, parseInt(targetId), side);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   636
	if(side == -1)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   637
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   638
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   639
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   640
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   641
	var sides = ['left', 'right', 'up', 'down'];
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   642
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   643
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   644
	var notifyTop = 0, notifyLeft = 0;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   645
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   646
	//On les positionne.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   647
	$('#notify_move').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   648
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   649
		top: -notifyTop,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   650
		left: -notifyLeft + move_left,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   651
		'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   652
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   653
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   654
	//On les fait apparaître.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   655
	$('.notifications').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   656
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   657
		opacity: "0.9"
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   658
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   659
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   660
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   661
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   662
 * Affichage de la notification de résultat de move vers un voisin & de dézoom dans une vidéo.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   663
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   664
mosaic.prototype.videoMoveAndUnzoom = function(targetId)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   665
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   666
	if(this.currentMode != 'VIDEO')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   667
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   668
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   669
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   670
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   671
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   672
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   673
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   674
	var notification_move = "<div id='notify_move' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   675
	var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   676
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   677
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   678
	$('body').append(notification_move + notification_unzoom);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   679
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   680
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   681
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   682
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   683
	var move_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   684
	var unzoom_left = move_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   685
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   686
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   687
	// console.log(this.neighboursIds, parseInt(targetId), side);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   688
	if(side == -1)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   689
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   690
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   691
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   692
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   693
	var sides = ['left', 'right', 'up', 'down'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   694
	var unzooms = ['horizontal', 'vertical'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   695
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   696
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   697
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   698
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   699
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   700
	$('#notify_move').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   701
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   702
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   703
		left: -notifyLeft + move_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   704
		'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   705
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   706
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   707
	$('#notify_unzoom').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   708
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   709
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   710
		left: -notifyLeft + unzoom_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   711
		'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   712
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   713
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   714
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   715
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   716
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   717
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   718
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   719
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   720
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   721
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   722
 * Affichage de la notification de résultat de dézoom dans une vidéo.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   723
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   724
mosaic.prototype.videoUnzoom = function(targetId)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   725
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   726
	if(this.currentMode != 'VIDEO')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   727
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   728
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   729
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   730
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   731
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   732
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   733
	//On spécifie la notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   734
	var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   735
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   736
	//On l'ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   737
	$('body').append(notification_unzoom);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   738
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   739
	//On calcule ses coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   740
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   741
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   742
	var unzoom_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   743
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   744
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   745
	if(side == -1)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   746
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   747
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   748
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   749
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   750
	var unzooms = ['horizontal', 'vertical'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   751
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   752
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   753
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   754
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   755
	//On la positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   756
	$('#notify_unzoom').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   757
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   758
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   759
		left: -notifyLeft + unzoom_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   760
		'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   761
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   762
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   763
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   764
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   765
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   766
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   767
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   768
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   769
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   770
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   771
 * Affichage de la notification de timeline dans une vidéo/recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   772
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   773
mosaic.prototype.timelineTimeline = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   774
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   775
	if(this.currentMode != 'TIMELINE')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   776
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   777
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   778
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   779
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   780
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   781
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   782
	//On spécifie la notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   783
	var notification_timeline = "<div id='notify_timeline' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   784
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   785
	//On l'ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   786
	$('body').append(notification_timeline);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   787
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   788
	//On calcule ses coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   789
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   790
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   791
	var timeline_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   792
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   793
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   794
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   795
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   796
	//On la positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   797
	$('#notify_timeline').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   798
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   799
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   800
		left: -notifyLeft + timeline_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   801
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   802
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   803
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   804
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   805
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   806
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   807
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   808
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   809
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   810
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   811
 * Affichage de la notification de recherche dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   812
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   813
mosaic.prototype.searchSearch = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   814
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   815
	if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   816
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   817
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   818
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   819
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   820
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   821
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   822
	//On spécifie la notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   823
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   824
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   825
	//On l'ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   826
	$('body').append(notification_search);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   827
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   828
	//On calcule ses coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   829
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   830
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   831
	var search_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   832
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   833
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   834
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   835
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   836
	//On la positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   837
	$('#notify_search').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   838
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   839
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   840
		left: -notifyLeft + search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   841
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   842
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   843
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   844
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   845
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   846
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   847
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   848
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   849
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   850
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   851
 * Affichage de la notification de recherche & de swipe dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   852
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   853
mosaic.prototype.searchSearchAndSwipe = function(direction)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   854
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   855
	if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture || !this.isSwipe)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   856
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   857
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   858
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   859
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   860
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   861
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   862
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   863
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   864
	var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   865
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   866
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   867
	$('body').append(notification_search + notification_swipe);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   868
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   869
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   870
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   871
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   872
	var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   873
	var swipe_left = search_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   874
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   875
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   876
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   877
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   878
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   879
	$('#notify_search').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   880
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   881
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   882
		left: -notifyLeft + search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   883
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   884
	$('#notify_swipe').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   885
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   886
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   887
		left: -notifyLeft + swipe_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   888
		'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   889
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   890
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   891
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   892
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   893
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   894
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   895
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   896
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   897
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   898
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   899
 * Affichage de la notification de recherche, de move vers un voisin.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   900
*/
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   901
mosaic.prototype.searchSearchAndMove = function(targetId)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   902
{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   903
	if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   904
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   905
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   906
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   907
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   908
	//On spécifie les notifications en div.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   909
	var notification_search = "<div id='notify_search' class='notifications'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   910
	var notification_move = "<div id='notify_move' class='notifications'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   911
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   912
	//On les ajoute à la mosaïque.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   913
	$('body').append(notification_search + notification_move);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   914
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   915
	//On calcule leurs coordonnées et dimensions.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   916
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   917
	var notify_margin = parseInt($('.notifications').css('margin'));
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   918
	var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   919
	var move_left = search_left + notify_width + notify_margin;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   920
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   921
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   922
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   923
	if(side == -1)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   924
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   925
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   926
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   927
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   928
	var sides = ['left', 'right', 'up', 'down'];
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   929
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   930
	var notifyTop = 0, notifyLeft = 0;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   931
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   932
	//On les positionne.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   933
	$('#notify_search').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   934
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   935
		top: -notifyTop,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   936
		left: -notifyLeft + search_left
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   937
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   938
	$('#notify_move').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   939
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   940
		top: -notifyTop,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   941
		left: -notifyLeft + move_left,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   942
		'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   943
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   944
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   945
	//On les fait apparaître.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   946
	$('.notifications').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   947
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   948
		opacity: "0.9"
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   949
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   950
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   951
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   952
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   953
 * Affichage de la notification de recherche, de move vers un voisin & de dézoom dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   954
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   955
mosaic.prototype.searchSearchAndMoveAndUnzoom = function(targetId)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   956
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   957
	if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   958
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   959
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   960
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   961
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   962
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   963
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   964
	var notification_move = "<div id='notify_move' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   965
	var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   966
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   967
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   968
	$('body').append(notification_search + notification_move + notification_unzoom);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   969
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   970
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   971
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   972
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   973
	var search_left = $(window).width() / 2 - (notify_width * 3 + notify_margin * 4) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   974
	var move_left = search_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   975
	var unzoom_left = move_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   976
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   977
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   978
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   979
	if(side == -1)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   980
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   981
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   982
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   983
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   984
	var sides = ['left', 'right', 'up', 'down'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   985
	var unzooms = ['horizontal', 'vertical'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   986
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   987
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   988
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   989
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   990
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   991
	$('#notify_search').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   992
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   993
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   994
		left: -notifyLeft + search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   995
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   996
	$('#notify_move').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   997
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   998
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   999
		left: -notifyLeft + move_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1000
		'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1001
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1002
	$('#notify_unzoom').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1003
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1004
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1005
		left: -notifyLeft + unzoom_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1006
		'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1007
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1008
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1009
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1010
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1011
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1012
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1013
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1014
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1015
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1016
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1017
 * Affichage de la notification de recherche & de dézoom dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1018
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1019
mosaic.prototype.searchSearchAndUnzoom = function()
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1020
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1021
	if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1022
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1023
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1024
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1025
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1026
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1027
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1028
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1029
	var notification_search = "<div id='notify_search' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1030
	var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1031
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1032
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1033
	$('body').append(notification_search + notification_unzoom);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1034
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1035
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1036
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1037
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1038
	var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1039
	var unzoom_left = search_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1040
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1041
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1042
	// console.log(this.neighboursIds, parseInt(targetId), side);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1043
	if(side == -1)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1044
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1045
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1046
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1047
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1048
	var unzooms = ['horizontal', 'vertical'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1049
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1050
	// var notifyTop = this.notifyTopVideo, notifyLeft = this.notifyLeftVideo;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1051
	var notifyTop = 0, notifyLeft = 0;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1052
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1053
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1054
	$('#notify_move').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1055
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1056
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1057
		left: -notifyLeft + search_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1058
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1059
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1060
	$('#notify_unzoom').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1061
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1062
		top: -notifyTop,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1063
		left: -notifyLeft + unzoom_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1064
		'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1065
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1066
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1067
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1068
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1069
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1070
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1071
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1072
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1073
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1074
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1075
 * Affichage de la notification de résultat dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1076
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1077
mosaic.prototype.searchGesture = function(gestureName, mode)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1078
{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1079
	console.log('NOTIFY GESTURE ' + this.currentMode + ' ' + this.centerId + ' ' + this.currentSearchGesture[this.centerId]);
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1080
	if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1081
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1082
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1083
	}
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1084
	console.log('NOTIFY GESTURE');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1085
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1086
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1087
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1088
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1089
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1090
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1091
	$('body').append(notification_search_1gesture);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1092
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1093
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1094
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1095
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1096
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1097
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1098
	var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1099
	
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1100
	// console.log('SHOW GESTURE NOTIFICATION 1');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1101
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1102
	{
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1103
		// console.log('SHOW GESTURE NOTIFICATION 2');
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1104
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1105
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1106
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1107
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1108
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1109
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1110
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1111
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1112
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1113
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1114
		top: 0,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1115
		left: ($(window).width() - notify_width) / 2
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1116
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1117
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1118
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1119
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1120
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1121
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1122
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1123
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1124
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1125
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1126
 * Affichage de la notification de résultat & de swipe dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1127
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1128
mosaic.prototype.searchGestureAndSwipe = function(gestureName, mode, direction)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1129
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1130
	if(this.currentMode != 'SEARCH' || !this.isCurrentlyInASearchByGesture || !this.isSwipe)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1131
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1132
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1133
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1134
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1135
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1136
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1137
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1138
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1139
	var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1140
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1141
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1142
	$('body').append(notification_search_1gesture + notification_swipe);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1143
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1144
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1145
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1146
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1147
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1148
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1149
	var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1150
	var swipe_left = search_1gesture_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1151
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1152
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1153
	{
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1154
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1155
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1156
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1157
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1158
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1159
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1160
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1161
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1162
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1163
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1164
		left: search_1gesture_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1165
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1166
	$('#notify_swipe').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1167
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1168
		left: swipe_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1169
		'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1170
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1171
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1172
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1173
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1174
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1175
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1176
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1177
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1178
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1179
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1180
 * Affichage de la notification de résultat, de move vers un voisin.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1181
*/
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1182
mosaic.prototype.searchGestureAndMove = function(gestureName, mode, targetId)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1183
{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1184
	if(this.currentMode != 'SEARCH' || !this.isCurrentlyInASearchByGesture)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1185
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1186
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1187
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1188
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1189
	var _this = this;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1190
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1191
	//On spécifie les notifications en div.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1192
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1193
	var notification_move = "<div id='notify_move' class='notifications'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1194
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1195
	//On les ajoute à la mosaïque.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1196
	$('body').append(notification_search_1gesture + notification_move);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1197
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1198
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1199
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1200
	//On calcule leurs coordonnées et dimensions.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1201
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1202
	var notify_margin = parseInt($('.notifications').css('margin'));
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1203
	var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1204
	var move_left = search_1gesture_left + notify_width + notify_margin;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1205
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1206
	if(_.include(this.gestures, gestureName))
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1207
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1208
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1209
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1210
	else if(mode == 'none')
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1211
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1212
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1213
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1214
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1215
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1216
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1217
	if(side == -1)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1218
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1219
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1220
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1221
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1222
	var sides = ['left', 'right', 'up', 'down'];
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1223
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1224
	//On les positionne.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1225
	$('#notify_search_1gesture').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1226
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1227
		left: search_1gesture_left
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1228
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1229
	$('#notify_move').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1230
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1231
		left: move_left,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1232
		'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1233
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1234
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1235
	//On les fait apparaître.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1236
	$('.notifications').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1237
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1238
		opacity: "0.9"
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1239
	});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1240
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1241
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1242
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1243
 * Affichage de la notification de résultat, de move vers un voisin & de dézoom dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1244
*/
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1245
mosaic.prototype.searchGestureAndMoveAndUnzoom = function(gestureName, mode, targetId)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1246
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1247
	if(this.currentMode != 'SEARCH' || !this.isCurrentlyInASearchByGesture)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1248
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1249
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1250
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1251
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1252
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1253
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1254
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1255
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1256
	var notification_move = "<div id='notify_move' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1257
	var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1258
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1259
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1260
	$('body').append(notification_search_1gesture + notification_move + notification_unzoom);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1261
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1262
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1263
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1264
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1265
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1266
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1267
	var search_1gesture_left = $(window).width() / 2 - (notify_width * 3 + notify_margin * 4) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1268
	var move_left = search_1gesture_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1269
	var unzoom_left = move_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1270
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1271
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1272
	{
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1273
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1274
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1275
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1276
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1277
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1278
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1279
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1280
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1281
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1282
	if(side == -1)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1283
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1284
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1285
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1286
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1287
	var sides = ['left', 'right', 'up', 'down'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1288
	var unzooms = ['horizontal', 'vertical'];
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1289
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1290
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1291
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1292
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1293
		left: search_1gesture_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1294
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1295
	$('#notify_move').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1296
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1297
		left: move_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1298
		'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1299
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1300
	$('#notify_unzoom').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1301
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1302
		left: unzoom_left,
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1303
		'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1304
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1305
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1306
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1307
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1308
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1309
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1310
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1311
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1312
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1313
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1314
 * Affichage de la notification de résultat & de dézoom dans une vidéo de recherche.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1315
*/
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1316
mosaic.prototype.searchGestureAndUnzoom = function(gestureName, mode, targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1317
{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1318
	if(this.currentMode != 'SEARCH' || !this.isCurrentlyInASearchByGesture)
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1319
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1320
		return;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1321
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1322
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1323
	var _this = this;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1324
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1325
	//On spécifie les notifications en div.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1326
	var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1327
	var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1328
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1329
	//On les ajoute à la mosaïque.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1330
	$('body').append(notification_search_1gesture + notification_unzoom);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1331
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1332
	// console.log(this.player.config.gui.zoomTop + " " + this.player.config.gui.zoomLeft);
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1333
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1334
	//On calcule leurs coordonnées et dimensions.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1335
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1336
	var notify_margin = parseInt($('.notifications').css('margin'));
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1337
	var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1338
	var unzoom_left = search_1gesture_left + notify_width + notify_margin;
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1339
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1340
	if(_.include(this.gestures, gestureName))
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1341
	{
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1342
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1343
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1344
	else if(mode == 'none')
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1345
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1346
		$('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1347
	}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1348
	
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1349
	var side = $.inArray(parseInt(targetId), this.neighboursIds);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1350
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1351
	if(side == -1)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1352
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1353
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1354
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1355
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1356
	var unzooms = ['horizontal', 'vertical'];
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1357
	
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1358
	//On les positionne.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1359
	$('#notify_search_1gesture').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1360
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1361
		left: search_1gesture_left
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1362
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1363
	$('#notify_unzoom').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1364
	{
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1365
		left: unzoom_left,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1366
		'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1367
	});
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1368
	
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1369
	//On les fait apparaître.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1370
	$('.notifications').css(
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1371
	{
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1372
		opacity: "0.9"
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1373
	});
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1374
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1375
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1376
/*
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1377
 * Affichage des notifications de gestures trouvées dans une recherche par courbes.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1378
*/
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1379
mosaic.prototype.curvesGestures = function(gestures)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1380
{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1381
	//S'il n'y a pas de gestures à afficher.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1382
	if(gestures.length == 0)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1383
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1384
		console.log('NONE');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1385
		//On ajoute une seule notification.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1386
		var notification_curves = "<div class='notifications' id='notify_curves'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1387
		$('body').append(notification_curves);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1388
		
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1389
		//On calcule leurs dimensions et coordonnées.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1390
		var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1391
		var notify_margin = parseInt($('.notifications').css('margin'));
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1392
		var curves_left = $(window).width() / 2 - (notify_width + notify_margin * 2) / 2;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1393
		
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1394
		$('#notify_curves').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1395
		{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1396
			left: curves_left,
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1397
			'background-image': 'url("./pictos/big/normal/inconnu.png")',
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1398
			opacity: '0.9'
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1399
		});
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1400
		return;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1401
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1402
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1403
	//Sinon, on les met dans un tableau.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1404
	var gestures_tab = gestures.split(';');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1405
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1406
	var notifications_curves_gestures = '';
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1407
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1408
	//On crée autant de notifications qu'il y a de gestures.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1409
	for(var i = 0 ; i < gestures_tab.length ; i++)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1410
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1411
		notifications_curves_gestures += "<div class='notifications' id='notify_curves_" + gestures_tab[i] + "'></div>";
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1412
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1413
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1414
	//On les ajoute à la mosaïque.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1415
	$('body').append(notifications_curves_gestures);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1416
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1417
	//On calcule leurs dimensions.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1418
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1419
	var notify_margin = parseInt($('.notifications').css('margin'));
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1420
	var curves_gestures_left = [];
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1421
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1422
	//On calcule leurs dimensions et leur backgrounds.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1423
	curves_gestures_left[0] = $(window).width() / 2 - (notify_width * (gestures_tab.length) + notify_margin * (gestures_tab.length + 2)) / 2;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1424
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1425
	for(var i = 0 ; i < gestures_tab.length ; i++)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1426
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1427
		//On va chercher leurs backgrounds.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1428
		$('#notify_curves_' + gestures_tab[i]).css('background-image', 'url("./pictos/big/' + (this.mouseInteractions ? 'MI/' : '') + 'normal/' + gestures_tab[i] + '.png")');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1429
		// console.log('url("./pictos/big/MI/normal/' + gestures_tab[i] + '.png")');
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1430
		
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1431
		//On calcule leurs coordonnées.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1432
		if(i+1 < gestures_tab.length)
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1433
		{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1434
			curves_gestures_left[i+1] = curves_gestures_left[i] + notify_width + notify_margin * 2;
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1435
		}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1436
		
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1437
		//On les place.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1438
		$('#notify_curves_' + gestures_tab[i]).css('left', curves_gestures_left[i]);
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1439
	}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1440
	
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1441
	//On les fait apparaître.
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1442
	$('.notifications').css(
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1443
	{
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1444
		opacity: "0.9"
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1445
	});
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1446
}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1447
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1448
/*
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1449
 * Efface les notifications.
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1450
*/
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1451
mosaic.prototype.removeNotifications = function()
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1452
{
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1453
	// console.trace();
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1454
	$('.notifications').remove();
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1455
}