# HG changeset patch # User veltr # Date 1380893948 -7200 # Node ID 2f1ef2ded30c558a32e7c31ea76f90d466db4f63 # Parent 05c1161fa5017c8ff8098e8084fd9b07abe9f04b Added favorites display and participation count with random data diff -r 05c1161fa501 -r 2f1ef2ded30c timeline/css/timeline.css --- a/timeline/css/timeline.css Fri Oct 04 11:26:40 2013 +0200 +++ b/timeline/css/timeline.css Fri Oct 04 15:39:08 2013 +0200 @@ -40,6 +40,7 @@ .Tl-UniversLabels li:before { content: "."; position: absolute; height: 1px; text-indent: -9999px; width: 760px; top: 0; background: #DEDEDE; z-index: 5; + background: linear-gradient(to right, rgba(220,220,220,1) 80px, rgba(220,220,220,.1) 140px ); background: -moz-linear-gradient(to right, rgba(220,220,220,1) 80px, rgba(220,220,220,.1) 140px ); background: -webkit-linear-gradient(left, rgba(220,220,220,1) 80px, rgba(220,220,220,.1) 140px ); } @@ -58,6 +59,7 @@ .Tl-Grid { position: absolute; top: 0; bottom: 0; overflow: hidden; + background: linear-gradient(to right, #cccccc 0, #f8f8f8 10%, #ffffff 20%, #ffffff 80%, #f8f8f8 90%, #cccccc 100% ); background: -moz-linear-gradient(to right, #cccccc 0, #f8f8f8 10%, #ffffff 20%, #ffffff 80%, #f8f8f8 90%, #cccccc 100% ); background: -webkit-linear-gradient(left, #cccccc 0, #f8f8f8 10%, #ffffff 20%, #ffffff 80%, #f8f8f8 90%, #cccccc 100% ); } @@ -103,6 +105,15 @@ position: absolute; margin-left: -2px; margin-top: 8px; background: rgba(0,0,0,.9); } +.Tl-Occurrence-Favorite { + position: absolute; bottom: -8px; right: -8px; width: 16px; height: 16px; background: url(../img/favstar-small.png); +} + +.Tl-Occurrence-Participation { + position: absolute; top: -8px; right: -8px; text-align: right; line-height: 14px; font-size: 10px; color: #ffffff; background: #009e1e; + padding: 0 4px; border-radius: 8px; border: 1px solid #ffffff; font-weight: bold; +} + .Tl-Overlay-Container { position: absolute; top: 0; } @@ -144,8 +155,28 @@ min-height: 135px; font-size: 12px; position: relative; } -.Tl-Detail-Image { - float: left; +.Tl-Detail-Image-Wrapper { + float: left; position: relative; width: 135px; height: 135px; background: #e0e0e0; +} + +.Tl-Detail-Favorite { + float: right; width: 20px; height: 20px; background-image: url(../img/favstars-large.png); +} + +.Tl-Detail-Favorite:hover, .Tl-Detail-isFavorite { + background-position: -20px 0; +} + +.Tl-Detail-isFavorite:hover { + background-position: 0 0; +} + +.Tl-Detail-Participation { + position: absolute; bottom: 0; right: 0; padding: 10px; background: rgba(0,0,0,.5); color: #ffffff; font-size: 12px; +} + +.Tl-Participation-Icon { + width: 13px; height: 13px; display: inline-block; margin: 0 0 -2px 5px; background: url(../img/participation-icon.png); } .Tl-Detail-Title { diff -r 05c1161fa501 -r 2f1ef2ded30c timeline/img/favstar-small.png Binary file timeline/img/favstar-small.png has changed diff -r 05c1161fa501 -r 2f1ef2ded30c timeline/img/favstars-large.png Binary file timeline/img/favstars-large.png has changed diff -r 05c1161fa501 -r 2f1ef2ded30c timeline/img/participation-icon.png Binary file timeline/img/participation-icon.png has changed diff -r 05c1161fa501 -r 2f1ef2ded30c timeline/js/timeline.js --- a/timeline/js/timeline.js Fri Oct 04 11:26:40 2013 +0200 +++ b/timeline/js/timeline.js Fri Oct 04 15:39:08 2013 +0200 @@ -134,19 +134,19 @@ span : 7 * 86400 * 1000, grid_interval : 86400 * 1000, grid_date_format : '{{dayOfMonth}} {{monthName}}', - min_importance : 3 + min_importance : 3 //0 //pour les tests, mettre à 0 pour tout afficher }, { label : "3 jours", span : 3 * 86400 * 1000, grid_interval : 6 * 3600 * 1000, grid_date_format : '{{^isDayStart}}{{0hours}}h{{0minutes}}{{/isDayStart}}{{#isDayStart}}{{dayOfMonth}} {{shortMonthName}}{{/isDayStart}}', - min_importance : 2 + min_importance : 2 //0 //pour les tests, mettre à 0 pour tout afficher }, { label : "Journée", span : 86400 * 1000, grid_interval : 2 * 3600 * 1000, grid_date_format : '{{^isDayStart}}{{0hours}}h{{0minutes}}{{/isDayStart}}{{#isDayStart}}{{dayOfMonth}} {{shortMonthName}}{{/isDayStart}}', - min_importance : 1 + min_importance : 1 //0 //pour les tests, mettre à 0 pour tout afficher }, { label : "Demi-Journée", span : 6 * 3600 * 1000, @@ -236,12 +236,15 @@ Tlns.Templates.Occurrence = '{{#occurrences}}
{{detail_description}}
' + '').html(_data.resume || ""); var trimmedDesc = _tmp.text().trim().replace(/(\n|\r|\r\n)/mg,' '); this.description = trimmedDesc.replace(/(^.{60,80})[\s].+$/m,'$1…');