# HG changeset patch # User Anthony Ly # Date 1365780687 -7200 # Node ID 6917b55f901f8e16693713691d10d87576a02cc3 # Parent 84719280c84d5fe417497e754af099186d948aa5 update buzz diff -r 84719280c84d -r 6917b55f901f integ/css/iri-buzz.css --- a/integ/css/iri-buzz.css Fri Apr 12 15:08:00 2013 +0200 +++ b/integ/css/iri-buzz.css Fri Apr 12 17:31:27 2013 +0200 @@ -1,4 +1,9 @@ -.wrap-buzz{padding-top: 60px;} -.posters{border:1px solid #088;} -.posters li{float: left;} -.posters img{width: 100px;} \ No newline at end of file +.wrap-buzz{padding-top: 80px;} + +.timer-bar{width: 500px; height: 10px; border: 1px solid #ffd;} +.timer-bar-value{width: 200px; height: 100%; background-color: #aaa;} +.hours li{float: left;} + +.posters{ margin-top:-7px; margin-left: 5px;} +.posters li{float: left;width: 100px; height: 130px;overflow: hidden;margin-right: 10px;} +.posters img{} \ No newline at end of file diff -r 84719280c84d -r 6917b55f901f integ/iri-buzz.html --- a/integ/iri-buzz.html Fri Apr 12 15:08:00 2013 +0200 +++ b/integ/iri-buzz.html Fri Apr 12 17:31:27 2013 +0200 @@ -52,6 +52,20 @@
+ +
+
+
+
    +
  • 0h
  • +
  • 6h
  • +
  • 12h
  • +
  • 18h
  • +
  • 24h
  • +
+
+
+
    @@ -114,6 +128,8 @@ + + diff -r 84719280c84d -r 6917b55f901f integ/js/iri-buzz.js --- a/integ/js/iri-buzz.js Fri Apr 12 15:08:00 2013 +0200 +++ b/integ/js/iri-buzz.js Fri Apr 12 17:31:27 2013 +0200 @@ -1,5 +1,27 @@ $(function(){ +function resizeImg(parentId){ + $(parentId+" img").each(function() { + var img = $(this), + div = $(this).parent(); + img.load(function() { + var iw = img.width(), + ih = img.height(), + dw = div.width(), + dh = div.height(), + scale = Math.max(dw/iw, dh/ih), + niw = iw * scale, + nih = ih * scale; + img.css({ + width: niw, + height: nih, + "margin-left": (dw - niw) / 2, + "margin-top": (dh - nih) / 3 + }); + }); + }); +} + var CONFIG = { wChart : 100, now : new Date(), @@ -12,7 +34,7 @@ width : 960, height : 400, chart : { - spacer : 0 + spacer : 5 }, data : { model :[], @@ -38,7 +60,7 @@ var movies = data.feed.movie; nbMovies = movies.length; - bcSettings.width = nbMovies * CONFIG.wChart; + bcSettings.width = nbMovies * CONFIG.wChart + 10 * nbMovies; $('.posters').css('width', bcSettings.width); //var wItem = bcSettings.width / nbMovies; @@ -77,6 +99,7 @@ */ }); + resizeImg('.posters'); barChart = $("#data-viz").vs(bcSettings).data('visualSedimentation'); });