js/playscreen.js
changeset 25 5e1e1307f7fd
parent 24 b557f4bae85f
equal deleted inserted replaced
24:b557f4bae85f 25:5e1e1307f7fd
  1039 	        totalScroll = 0;
  1039 	        totalScroll = 0;
  1040 	    }
  1040 	    }
  1041 	    _event.preventDefault();
  1041 	    _event.preventDefault();
  1042     });
  1042     });
  1043     
  1043     
  1044     if (pageParams.keywords && pageParams.keywords.length) {
  1044     if (pageParams.keywords && pageParams.keywords.join("").length) {
  1045     	$(".keyword-search a").removeClass("placeholder").text(pageParams.keywords.join(", "));
  1045     	$(".keyword-search a").removeClass("placeholder").text(pageParams.keywords.join(", "));
  1046     }
  1046     }
  1047     
  1047     
  1048     var moveInterval;
  1048     var moveInterval;
  1049     
  1049     
  1107     $(".play-localtweets").on("click", "li a", function() {
  1107     $(".play-localtweets").on("click", "li a", function() {
  1108     	var userid = $(this).attr("data-user-id");
  1108     	var userid = $(this).attr("data-user-id");
  1109     	currentTweet = $(this).parents("li.tweet").attr("data-tweet-id");
  1109     	currentTweet = $(this).parents("li.tweet").attr("data-tweet-id");
  1110         $(".user-tweets").css({
  1110         $(".user-tweets").css({
  1111             display: "block",
  1111             display: "block",
  1112             left: $(window).width() + 20
  1112             left: $(".contents").width() + 20
  1113         }).animate({
  1113         }).animate({
  1114             left: "420px"
  1114             left: "420px"
  1115         });
  1115         });
  1116         $(".user-tweets-list").html("<li class='loading'>Chargement en cours</li>");
  1116         $(".user-tweets-list").html("<li class='loading'>Chargement en cours</li>");
  1117         $(".user-name").text($(this).parents("li.tweet").find("p a").text().replace(/(^@|:$)/g,""));
  1117         $(".user-name").text($(this).parents("li.tweet").find("p a").text().replace(/(^@|:$)/g,""));
  1160     	return false;
  1160     	return false;
  1161     });
  1161     });
  1162     
  1162     
  1163     $(window).on("resize", function() {
  1163     $(window).on("resize", function() {
  1164         throttledShowLocal
  1164         throttledShowLocal
  1165         $(".user-tweets").width($(window).width()-480);
  1165         $(".user-tweets").width($(".contents").width()-480);
  1166     });
  1166     });
  1167     
  1167     
  1168     $(".close-user-tweets").click(function() {
  1168     $(".close-user-tweets").click(function() {
  1169         currentTweetTc = -1;
  1169         currentTweetTc = -1;
  1170         $(".user-tweets").animate({
  1170         $(".user-tweets").animate({
  1171             left: $(window).width() + 20
  1171             left: $(".contents").width() + 20
  1172         }, function(){
  1172         }, function(){
  1173             $(this).hide();
  1173             $(this).hide();
  1174         });
  1174         });
  1175         return false;
  1175         return false;
  1176     })
  1176     })
  1177     
  1177     
  1178     $(".user-tweets").width($(window).width()-480);
  1178     $(".user-tweets").width($(".contents").width()-480);
  1179     checkOrGoNext();
  1179     checkOrGoNext();
  1180 }
  1180 }
  1181 
  1181 
  1182 var data = { topics: [] },
  1182 var data = { topics: [] },
  1183     colorset = ["#E41A1C", "#377EB8", "#4DAF4A", "#984EA3", "#FF7F00", "#A65628", "#F781BF"];
  1183     colorset = ["#E41A1C", "#377EB8", "#4DAF4A", "#984EA3", "#FF7F00", "#A65628", "#F781BF"];