integ/js/iri-creation-cinecard.js
changeset 21 937b6ee27f06
parent 15 0dc883cf6bd2
child 22 5e41bc4feda8
equal deleted inserted replaced
16:4a2fdec4fa3c 21:937b6ee27f06
   115 		var rcode = v.rcode;
   115 		var rcode = v.rcode;
   116 		var title = v.title;
   116 		var title = v.title;
   117 		var urlAllocine = 'http://www.allocine.fr/film/fichefilm-'+ idMovie +'/photos/detail/?cmediafile='+ rcode;
   117 		var urlAllocine = 'http://www.allocine.fr/film/fichefilm-'+ idMovie +'/photos/detail/?cmediafile='+ rcode;
   118 		var itemImagess = 
   118 		var itemImagess = 
   119 			'<li class="cinecard-draggable" draggable="true">'+
   119 			'<li class="cinecard-draggable" draggable="true">'+
   120 				'<a target="_blank" href="'+ urlAllocine +'" title="'+title+'">'+
   120 				'<a class="tool-info" target="_blank" href="'+ urlAllocine +'" title="'+title+'">'+
   121 					'<img src="'+ urlThumb +'" alt="'+title+'" />'+
   121 					'<img src="'+ urlThumb +'" alt="'+title+'" />'+
   122 				'</a>'+
   122 				'</a>'+
   123 			'</li>';
   123 			'</li>';
   124 		$('#images-more').append(itemImagess);
   124 		$('#images-more').append(itemImagess);
   125 	});
   125 	});
   155 		var title = v.title;
   155 		var title = v.title;
   156 		var code = v.code;
   156 		var code = v.code;
   157 		var url = 'http://www.allocine.fr/video/player_gen_cmedia='+code+'&cfilm='+idMovie+'.html';
   157 		var url = 'http://www.allocine.fr/video/player_gen_cmedia='+code+'&cfilm='+idMovie+'.html';
   158 		var itemVideo = 
   158 		var itemVideo = 
   159 			'<li class="cinecard-draggable" draggable="true">'+
   159 			'<li class="cinecard-draggable" draggable="true">'+
   160 				'<a target="_blank" href="'+ url +'" title="'+title+'">'+
   160 				'<a class="tool-info" target="_blank" href="'+ url +'" title="'+title+'">'+
   161 					'<img src="'+ urlThumbnail +'" alt="'+title+'" />'+
   161 					'<img src="'+ urlThumbnail +'" alt="'+title+'" />'+
   162 				'</a>'+
   162 				'</a>'+
   163 			'</li>';
   163 			'</li>';
   164 		$('#videos-more').append(itemVideo);
   164 		$('#videos-more').append(itemVideo);
   165 	});
   165 	});
   166 });
   166 });
   167 
   167 
   168 //TOOLTIP
   168 //TOOLTIP
   169 var show_tooltip_info_iri = function(elem){
   169 var show_tooltip_info_iri = function(elem){
   170 	var tooltip = $('.tooltip-iri'),
   170 	var tooltip = $('.rate_tooltip'),
   171 		name = elem.attr('title'),
   171 		name = elem.attr('title'),
   172 		arrow = tooltip.find('.arrow_tooltip'),
   172 		arrow = tooltip.find('.arrow_l'),
   173 		top = elem.offset().top,
   173 		top = elem.offset().top,
   174 		right = elem.offset().left + elem.width() + arrow.width();
   174 		right = elem.offset().left + elem.width() + arrow.width();
   175 	tooltip.find('p').text(name)
   175 	tooltip.find('p').text(name)
   176 	tooltip.show();
   176 	tooltip.show();
   177 	tooltip.css({
   177 	tooltip.css({
   178 		top : top,
   178 		top : top,
   179 		left : right
   179 		left : right
   180 	});
   180 	});
   181 }
   181 }
   182 var hide_tooltip_info_iri = function(elem){
   182 var hide_tooltip_info_iri = function(elem){
   183 	var tooltip = $('.tooltip-iri');
   183 	var tooltip = $('.rate_tooltip');
   184 	tooltip.hide();
   184 	tooltip.hide();
   185 }
   185 }
   186 $(document).on({
   186 $(document).on({
   187     mouseenter: function() {
   187     mouseenter: function() {
   188     	show_tooltip_info_iri($(this));
   188     	show_tooltip_info_iri($(this));