client/js/tweetvote-anim.js
changeset 26 83cf3d8be396
parent 23 d473ebde73a3
child 27 5e1d7f77f355
--- a/client/js/tweetvote-anim.js	Tue Feb 21 15:28:05 2012 +0100
+++ b/client/js/tweetvote-anim.js	Tue Feb 21 19:20:44 2012 +0100
@@ -433,39 +433,23 @@
   
 
 	$("#"+t.id_str).mouseover(function() {
-    console.log(t.id_str);
-
-		$("#tooltip-bulle .tweet-screen-name").text(t.from_user);
-		$("#tooltip-bulle .tweet-full-name").text(t.from_user_name);
-		$("#tooltip-bulle .tweet-text").text(t.text);
-		$("#tooltip-bulle .tweet-time").text(t.created_at);
-		$("#tooltip-bulle .tweet-img-avatar").attr( 'src' , t.profile_image_url );
-		var thisX = parseInt($(this).css('left'),10)+10;
-
-		 $('#bulle-tooltip-template').css('visibility','visible');
-		 //$('#bulle-tooltip-template').css('top', thisX).css('left', thisY);
-		$(this).css('cursor','pointer');
-		if(thisX<960/2){
-			$('#accolade-left').css('visibility','visible');
-		}else{
-			$('#accolade-right').css('visibility','visible');
-		}
-	    
-	});
-  
-	$("#"+t.id_str).mouseout(function() {
-		$('#bulle-tooltip-template').css('visibility','hidden');
-    $('#accolade-right').css('visibility','hidden');
-		$('#accolade-left').css('visibility','hidden');
-		$(this).css('cursor','auto');
-		
-		//$(this).dequeue();
+	    var _of = $(this).offset();
+	    $(this).css({
+	        "cursor": "pointer"
+	    });
+	    showTooltip(t, _of.left, _of.top);  
+	}).mouseout(hideTooltip).click(function() {
+        addTweetToSelection(t.id_str);
+	    $(this).fadeTo(100,.25, function() {
+	        $(this).fadeTo(100,1);
+	        showControlPanel();
+	    })
 	});
    
-  $("#"+t.id_str).click(function() {
+/*  $("#"+t.id_str).click(function() {
 		if(!isMouseDragging) {
             fancyBoxTwitter(t.from_user, (t.candidats && t.candidats.length ? candidats[t.candidats[0]].couleur : '#666699'));
 //      window.open("https://twitter.com/#!/"+t.from_user+"/status/"+t.id_str);
     }
-  });  
+  });   */
 }
\ No newline at end of file