integ/js/iri-buzz.js
changeset 30 a96fd5fdc4b9
parent 29 6917b55f901f
child 41 8d64ffdaf5e3
--- a/integ/js/iri-buzz.js	Fri Apr 12 17:31:27 2013 +0200
+++ b/integ/js/iri-buzz.js	Mon Apr 15 16:34:31 2013 +0200
@@ -1,5 +1,41 @@
 $(function(){
 
+/*
+$(window).bind('resize', function(){
+	setSidebarContentHeight();
+});
+setSidebarContentHeight();
+function setSidebarContentHeight(){
+	var newHeight = $(window).height() - $('header').height() - $('footer').height();
+	$(".sidebar .content").css('height', newHeight);
+}
+
+
+$(".central").mCustomScrollbar({
+	advanced:{
+	    updateOnContentResize: true
+	}
+});
+
+*/
+function init(){
+	var wWin = ($(window).width()>520) ? $(window).width() : 520;
+	$('.timer-bar').width(wWin - 170);
+
+
+	var wTimerBar = $('.timer-bar').width(),
+		nbIndicator = $('.hours li').length-1;
+		mrIndicator = wTimerBar/ (nbIndicator);
+	$('.timeline-head').css('min-width', wWin);
+	$('.hours li').each(function(k,v){
+		if(k >= nbIndicator - 1) return;
+		var mr = mrIndicator  - $('.hours li:last-child').width()/2 - $(v).width()/2;
+		$(v).css('margin-right', mr);
+	});
+}
+
+init();
+
 function resizeImg(parentId){
 	$(parentId+" img").each(function() {
 	    var img = $(this),
@@ -60,7 +96,7 @@
 	
 	var movies = data.feed.movie;
 	nbMovies = movies.length;
-	bcSettings.width = nbMovies * CONFIG.wChart + 10 * nbMovies;
+	bcSettings.width = nbMovies * CONFIG.wChart + (10 * nbMovies);
 	$('.posters').css('width', bcSettings.width);
 	//var wItem = bcSettings.width / nbMovies;