--- a/integ/css/iri-buzz.css Thu Apr 18 11:56:24 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-.wrap-buzz{padding-top: 80px;}
-
-.timeline-head{position: fixed; width:100%; z-index:10; text-align: center;}
-.timeline-head-wrap{display: inline-block;}
-.timer-wrap{float:left;margin-right:34px;}
-.timer-bar{width: 500px; height: 8px; background-color: #151515; border-bottom: 1px solid #474747;}
-.timer-bar-value{width: 0; height: 100%; background-color: #6b6b6b;-webkit-box-shadow: inset 0px 1px 1px 0px #8d8d8d;box-shadow: inset 0px 1px 1px 0px #8d8d8d;}
-.hours li{padding-top: 10px;float: left;text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);color:#919191; font-size: 12px;}
-.hours li:last-child{float: right; margin-right: 0;}
-
-a.rejouer{float:left;width: 92px; height: 32px; display: inline-block; text-align: center; line-height: 32px; font-size: 11px; font-weight: bold;text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.8);-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px; background: #1899e1;background: -moz-linear-gradient(top, #1899e1 0%, #126ae3 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1899e1), color-stop(100%,#126ae3));background: -webkit-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: -o-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: -ms-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: linear-gradient(to bottom, #1899e1 0%,#126ae3 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1899e1', endColorstr='#126ae3',GradientType=0 );}
-a.rejouer:hover{background: #126ae3;background: -moz-linear-gradient(top, #126ae3 0%, #1899e1 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#126ae3), color-stop(100%,#1899e1)); background: -webkit-linear-gradient(top, #126ae3 0%,#1899e1 100%);background: -o-linear-gradient(top, #126ae3 0%,#1899e1 100%); background: -ms-linear-gradient(top, #126ae3 0%,#1899e1 100%); background: linear-gradient(to bottom, #126ae3 0%,#1899e1 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#126ae3', endColorstr='#1899e1',GradientType=0 );}
-
-.posters{ margin-top:-7px; margin-left: 5px;}
-.posters li{float: left;width: 150px; height: 200px;overflow: hidden;margin-right: 10px;}
-
-#data-viz{padding-top: 50px;}
-
-.comment{display:none;z-index:20;position:absolute;-webkit-border-radius: 6px;border-radius: 6px;border:2px solid #323232;width: 470px; min-height: 80px; background-color:rgba(0,0,0,.9); padding-top: 12px;}
-.comment-info{margin-bottom: 8px;}
-.comment .date{color: #626262; font-size: 10px;}
-.comment .username{color: #ffb500; font-size: 15px; font-weight: bold;}
-.comment .avatar{margin-left: 10px;float: left;width: 50px; height: 50px; border:1px solid #a4a3a8; overflow: hidden;}
-.comment-right{padding-bottom: 12px;width: 380px; padding-right: 15px;float: right;}
-.comment .rating{display: inline-block; float: right;}
-.comment .rating li{margin-right: 2px;background: url(../img/review-rating-star-sprite.png) top right no-repeat; width:19px; height: 16px;display: inline-block;}
-.comment .rating li:last-child{margin-right: 0;}
-.rating.rate-1 li:first-child{background-position: top left;}
-.rating.rate-2 li:first-child,.rating.rate-2 li:nth-child(2){background-position: top left;}
-.rating.rate-3 li:first-child,.rating.rate-3 li:nth-child(2),.rating.rate-3 li:nth-child(3){background-position: top left;}
-.rating.rate-4 li:first-child,.rating.rate-4 li:nth-child(2),.rating.rate-4 li:nth-child(3),.rating.rate-4 li:nth-child(4){background-position: top left;}
-.rating.rate-5 li{background-position: top left;}
-.comment p{color: #ededed; font-size: 13px; }
-
-.profile div[role="main"] { height: auto; }
\ No newline at end of file
--- a/integ/css/iri.css Thu Apr 18 11:56:24 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-.sidebar{display: table-cell; padding-top:60px; vertical-align: top;}
-.sidebar .content{width: 280px; padding: 18px 0 0 12px; height: 100%;}
-.inner-content{padding-right: 16px;}
-.sidebar h2{font-size: 20px; margin-bottom: 24px;}
-.user{ height: 30px; line-height: 30px;}
-.user img{width: 30px; height: 30px; margin: 0 24px 24px 0; float: left;}
-.user p{float: left; font-size: 13px;}
-h3.instruction{color: #c7c7c7; clear: both; padding-bottom: 14px; margin: 0; border-bottom: 1px solid #3b3b3b;}
-
-.sidebar ul a{display: block;}
-.sidebar ul li{-webkit-box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41);-moz-box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41);box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41);}
-.stickers.less{height: 90px; overflow-y: hidden;}
-.stickers li{margin: 0 10px 10px 0;float:left;}
-.stickers li a{width: 81px; height: 80px;background-color: #fff;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; background-repeat: no-repeat; background-position: center 13px;}
-.stickers li span{width: 100%;color: #212121; font-size: 12px;font-weight: bold; line-height: 12px; display: inline-block; text-align: center;padding-top: 48px;}
-a.culte{background-image: url(../img/culte-scene-icon.png);}
-a.star{background-image: url(../img/star-icon.png);}
-a.like{background-image: url(../img/like-icon.png);}
-.stickers li:nth-child(3n+3) { margin-right: 0;}
-.sidebar h3{font-size: 13px; font-weight: bold; margin-bottom: 12px;}
-
-.more{margin-bottom: 16px;width: 100%; height: 12px; background-color: #191919; display: inline-block;}
-.more:hover{background-color: #3b3b3b;}
-.more span{ margin: 4px auto 0 auto;width: 13px; height: 4px; background: url(../img/arrow-more.png) 0 0 no-repeat; display: block;}
-.more.less span{background-position: bottom left;}
-.more-hide{display: none;}
-
-.stars.less, .images.less{height: 90px; overflow-y: hidden;}
-.stars li:nth-child(4n+4) { margin-right: 0;}
-.stars li{margin: 0 8px 10px 0;width: 58px; height: 78px;border: 1px solid #767676; float: left;}
-.stars img{width: 58px; height: 78px;}
-
-.images li:nth-child(3n+3) { margin-right: 0;}
-.images li{margin: 0 8px 10px 0;border: 1px solid #767676; float: left; overflow: hidden;}
-.images li a{width: 80px; height: 80px;}
-
-.videos.less{height: 76px; overflow: hidden;}
-.videos li:nth-child(3n+3) { margin-right: 0;}
-.videos li a{width: 80px; height: 64px;}
-.videos li{overflow: hidden;margin: 0 8px 10px 0;border: 1px solid #767676; float: left;}
-
-.renkan{ overflow:hidden;height:100%;position: relative;display: table-cell; padding-top:60px; vertical-align: top; background-color: #eee; width:100%; background: url(../img/bg-renkan.png) 0 0; min-width: 400px;}
-.renkan .wrap-top{width: 100%; height: 56px; background-color:rgba(0,0,0,.4);}
-.renkan .wrap-top h2{ font-size: 30px; padding-left: 18px; line-height: 56px; display: inline-block;}
-
-.Rk-ZoomButtons,
-.zoom{width: 30px; margin: 18px 0 0 16px;-webkit-box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);-moz-box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);}
-.zoom li{padding: 0;width: 30px; height: 30px;}
-.Rk-ZoomIn, .Rk-ZoomOut,
-.zoom a{margin: 0;width: 30px; height: 30px; display: inline-block; background: url(../img/zoom.png) center top no-repeat;}
-.Rk-ZoomIn:hover, .Rk-ZoomOut:hover,
-.zoom a:hover{background-color: #191919;}
-.Rk-ZoomIn,
-.zoom .in{background-color: #929292; background-position: center 8px;}
-.Rk-ZoomOut,
-.zoom .out{background-color: #fff; background-position: center -22px;}
-
-.renkan .actions{width: 194px; float: right; margin: 12px 12px 0 0;}
-.renkan .actions li{float: left;}
-.renkan .actions a{width: 92px; height: 32px; display: inline-block; text-align: center; line-height: 32px; font-size: 11px; font-weight: bold;text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.8);-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;}
-a.cancel{margin-right: 8px;background: #555555; background: -moz-linear-gradient(top, #555555 0%, #7a7a7a 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#555555), color-stop(100%,#7a7a7a)); background: -webkit-linear-gradient(top, #555555 0%,#7a7a7a 100%); background: -o-linear-gradient(top, #555555 0%,#7a7a7a 100%); background: -ms-linear-gradient(top, #555555 0%,#7a7a7a 100%); background: linear-gradient(to bottom, #555555 0%,#7a7a7a 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#555555', endColorstr='#7a7a7a',GradientType=0 ); /* IE6-9 */}
-a.cancel:hover{background: #7a7a7a;background: -moz-linear-gradient(top, #7a7a7a 0%, #555555 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7a7a7a), color-stop(100%,#555555));background: -webkit-linear-gradient(top, #7a7a7a 0%,#555555 100%);background: -o-linear-gradient(top, #7a7a7a 0%,#555555 100%);background: -ms-linear-gradient(top, #7a7a7a 0%,#555555 100%);background: linear-gradient(to bottom, #7a7a7a 0%,#555555 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7a7a7a', endColorstr='#555555',GradientType=0 );}
-a.send{background: #126ae3;background: -moz-linear-gradient(top, #126ae3 0%, #1899e1 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#126ae3), color-stop(100%,#1899e1)); background: -webkit-linear-gradient(top, #126ae3 0%,#1899e1 100%);background: -o-linear-gradient(top, #126ae3 0%,#1899e1 100%); background: -ms-linear-gradient(top, #126ae3 0%,#1899e1 100%); background: linear-gradient(to bottom, #126ae3 0%,#1899e1 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#126ae3', endColorstr='#1899e1',GradientType=0 ); /* IE6-9 */}
-a.send:hover{background: #1899e1;background: -moz-linear-gradient(top, #1899e1 0%, #126ae3 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1899e1), color-stop(100%,#126ae3));background: -webkit-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: -o-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: -ms-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: linear-gradient(to bottom, #1899e1 0%,#126ae3 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1899e1', endColorstr='#126ae3',GradientType=0 );}
-
-.edit-cinecard {position: relative;}
-
-.logo-iri{z-index: 10;position: absolute;right: 25px;bottom: 66px;}
-
-div.rate_tooltip{ display:none; z-index:10;box-shadow: 2px 2px 10px 0px #000;padding: 0 8px;height: 21px;line-height: 21px;}
-div.rate_tooltip p{display: inline-block;}
-.rate_tooltip .arrow_l {background: url("skin/arrow_l.png") no-repeat 0 0;height: 15px;top: 3px;position: absolute;left: -8px;width: 8px;}
-
-
Binary file integ/css/skin/arrow_l.png has changed
Binary file integ/img/arrow-more.png has changed
Binary file integ/img/bg-renkan.png has changed
Binary file integ/img/culte-scene-icon.png has changed
Binary file integ/img/like-icon.png has changed
Binary file integ/img/logo-iri.png has changed
Binary file integ/img/review-rating-star-sprite.png has changed
Binary file integ/img/star-icon.png has changed
Binary file integ/img/stickers/mon-avis.png has changed
Binary file integ/img/stickers/pourquoi-j-ai-aime.png has changed
Binary file integ/img/stickers/pourquoi-le-voir.png has changed
Binary file integ/img/stickers/scenes-cultes.png has changed
Binary file integ/img/stickers/secrets-et-bonus.png has changed
Binary file integ/img/stickers/tu-vas-aimer.png has changed
Binary file integ/img/zoom.png has changed
--- a/integ/iri-buzz.html Thu Apr 18 11:56:24 2013 +0200
+++ b/integ/iri-buzz.html Thu Apr 18 18:20:50 2013 +0200
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/styles.css" />
<!-- IRI CSS -->
-<link rel="stylesheet" href="css/iri-buzz.css" />
+<link rel="stylesheet" href="iri/css/iri-buzz.css" />
<!-- Renkan CSS -->
<link rel="stylesheet" href="renkan/css/renkan.css" />
<!-- Custom scrollbars CSS -->
@@ -156,7 +156,7 @@
<script src="renkan/lib/underscore-min.js"></script>
<script src="js/vs/_VisualSedimentation.js"></script>
-<script src="js/iri-buzz.js"></script>
+<script src="iri/js/iri-buzz.js"></script>
</body>
</html>
\ No newline at end of file
--- a/integ/iri-creation-cinecard.html Thu Apr 18 11:56:24 2013 +0200
+++ b/integ/iri-creation-cinecard.html Thu Apr 18 18:20:50 2013 +0200
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/styles.css" />
<!-- IRI CSS -->
-<link rel="stylesheet" href="css/iri.css" />
+<link rel="stylesheet" href="iri/css/iri-creation-cinecard.css" />
<!-- Renkan CSS -->
<link rel="stylesheet" href="renkan/css/renkan.css" />
<!-- Custom scrollbars CSS -->
@@ -63,40 +63,45 @@
<p>Jean-Louis Frechin</p>
</div>
- <h3 class="instruction">Glisser un contenu dans la carte</h3>
+ <h3 class="instruction">Personnalisez votre carte cadeau en faisant glisser les éléments ci-dessous ou n'importe quelle ressource web.</h3>
<h3>Stickers</h3>
<ul class="stickers less" id="stickers-more">
- <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Scènes cultes" data-image="img/stickers/scenes-cultes.png" data-uri="none">
- <a class="culte" href="#">
- <span>SCENES CULTES</span>
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Scènes cultes" data-image="{stickers_base}scenes-cultes.png" data-uri="none">
+ <a class="eye" href="#">
+ <span>SCENES<br />CULTES</span>
</a>
</li>
- <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Mon avis" data-image="img/stickers/mon-avis.png" data-uri="none">
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Mon avis" data-image="{stickers_base}mon-avis.png" data-uri="none">
<a class="star" href="#">
<span>MON<br />AVIS</span>
</a>
</li>
- <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Tu vas aimer" data-image="img/stickers/tu-vas-aimer.png" data-uri="none">
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Tu vas aimer" data-image="{stickers_base}tu-vas-aimer.png" data-uri="none">
<a class="like" href="#">
<span>TU VAS<br />AIMER</span>
</a>
</li>
- <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Pourquoi le voir" data-image="img/stickers/pourquoi-le-voir.png" data-uri="none">
- <a class="culte" href="#">
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Pourquoi le voir" data-image="{stickers_base}pourquoi-le-voir.png" data-uri="none">
+ <a class="eye" href="#">
<span>POURQUOI<br/>LE VOIR</span>
</a>
</li>
- <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Secrets et bonus" data-image="img/stickers/secrets-et-bonus.png" data-uri="none">
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Secrets et bonus" data-image="{stickers_base}secrets-et-bonus.png" data-uri="none">
<a class="star" href="#">
<span>SECRETS<br />ET BONUS</span>
</a>
</li>
- <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Pourquoi j'ai aimé" data-image="img/stickers/pourquoi-j-ai-aime.png" data-uri="none">
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Pourquoi j'ai aimé" data-image="{stickers_base}pourquoi-j-ai-aime.png" data-uri="none">
<a class="like" href="#">
<span>POURQUOI<br />J'AI AIMÉ</span>
</a>
</li>
+ <li class="cinecard-draggable" draggable="true" data-title=" " data-description="Tapez ici votre message personnel" data-image="{stickers_base}message-perso.png" data-uri="none">
+ <a class="envelope" href="#">
+ <span>MESSAGE<br />PERSO</span>
+ </a>
+ </li>
</ul>
<a class="more" href="#stickers-more"><span></span></a>
@@ -123,16 +128,15 @@
<div class="renkan">
<div class="wrap-top">
- <h2></h2>
+ <h2><span class="movie-title"></span> <span class="movie-year"></span></h2>
<ul class="actions">
- <li><a class="cancel" href="#">ANNULER</a></li>
<li><a class="send" href="#">ENVOYER</a></li>
</ul>
</div>
<div class="edit-cinecard" id="cinecard"></div>
- <a class="logo-iri" href="http://www.iri.centrepompidou.fr/"><img src="img/logo-iri.png" alt="Institut de recherche et d’innovation du centre pompidou" /></a>
+ <a class="logo-iri" href="http://www.iri.centrepompidou.fr/" title="Institut de Recherche et d’Innovation"><img src="iri/img/logo-iri.png" alt="Logo IRI" /></a>
</div>
<!-- /renkan -->
@@ -177,11 +181,11 @@
);
}
- var getMovie = getURLParameter('movie');
- var idMovie = (getMovie != 'null') ? getMovie : 135082;
-
- var getPartner = getURLParameter('partner');
- var partnerCode = (getPartner != 'null') ? getPartner : 'B00015838755';
+ var getMovie = getURLParameter('movie'),
+ idMovie = (getMovie != 'null') ? getMovie : 135082,
+ partnerCode = 'B00015838755',
+ stickers_base = './iri/stickers/',
+ renkan_base = './renkan/';
</script>
<!-- RENKAN -->
@@ -195,9 +199,10 @@
<script src="renkan/js/defaults.js"></script>
<script src="renkan/js/models.js"></script>
<script src="renkan/js/i18n.js"></script>
+<script src="renkan/js/cinegift-labels.js"></script>
<script src="renkan/js/paper-renderer.js"></script>
-<script src="js/iri-creation-cinecard.js"></script>
+<script src="iri/js/iri-creation-cinecard.js"></script>
</body>
</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/integ/iri/css/iri-buzz.css Thu Apr 18 18:20:50 2013 +0200
@@ -0,0 +1,35 @@
+.wrap-buzz{padding-top: 80px;}
+
+.timeline-head{position: fixed; width:100%; z-index:10; text-align: center;}
+.timeline-head-wrap{display: inline-block;}
+.timer-wrap{float:left;margin-right:34px;}
+.timer-bar{width: 500px; height: 8px; background-color: #151515; border-bottom: 1px solid #474747;}
+.timer-bar-value{width: 0; height: 100%; background-color: #6b6b6b;-webkit-box-shadow: inset 0px 1px 1px 0px #8d8d8d;box-shadow: inset 0px 1px 1px 0px #8d8d8d;}
+.hours li{padding-top: 10px;float: left;text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);color:#919191; font-size: 12px;}
+.hours li:last-child{float: right; margin-right: 0;}
+
+a.rejouer{float:left;width: 92px; height: 32px; display: inline-block; text-align: center; line-height: 32px; font-size: 11px; font-weight: bold;text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.8);-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px; background: #1899e1;background: -moz-linear-gradient(top, #1899e1 0%, #126ae3 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1899e1), color-stop(100%,#126ae3));background: -webkit-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: -o-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: -ms-linear-gradient(top, #1899e1 0%,#126ae3 100%);background: linear-gradient(to bottom, #1899e1 0%,#126ae3 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1899e1', endColorstr='#126ae3',GradientType=0 );}
+a.rejouer:hover{background: #126ae3;background: -moz-linear-gradient(top, #126ae3 0%, #1899e1 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#126ae3), color-stop(100%,#1899e1)); background: -webkit-linear-gradient(top, #126ae3 0%,#1899e1 100%);background: -o-linear-gradient(top, #126ae3 0%,#1899e1 100%); background: -ms-linear-gradient(top, #126ae3 0%,#1899e1 100%); background: linear-gradient(to bottom, #126ae3 0%,#1899e1 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#126ae3', endColorstr='#1899e1',GradientType=0 );}
+
+.posters{ margin-top:-7px; margin-left: 5px;}
+.posters li{float: left;width: 150px; height: 200px;overflow: hidden;margin-right: 10px;}
+
+#data-viz{padding-top: 50px;}
+
+.comment{display:none;z-index:20;position:absolute;-webkit-border-radius: 6px;border-radius: 6px;border:2px solid #323232;width: 470px; min-height: 80px; background-color:rgba(0,0,0,.9); padding-top: 12px;}
+.comment-info{margin-bottom: 8px;}
+.comment .date{color: #626262; font-size: 10px;}
+.comment .username{color: #ffb500; font-size: 15px; font-weight: bold;}
+.comment .avatar{margin-left: 10px;float: left;width: 50px; height: 50px; border:1px solid #a4a3a8; overflow: hidden;}
+.comment-right{padding-bottom: 12px;width: 380px; padding-right: 15px;float: right;}
+.comment .rating{display: inline-block; float: right;}
+.comment .rating li{margin-right: 2px;background: url(../img/review-rating-star-sprite.png) top right no-repeat; width:19px; height: 16px;display: inline-block;}
+.comment .rating li:last-child{margin-right: 0;}
+.rating.rate-1 li:first-child{background-position: top left;}
+.rating.rate-2 li:first-child,.rating.rate-2 li:nth-child(2){background-position: top left;}
+.rating.rate-3 li:first-child,.rating.rate-3 li:nth-child(2),.rating.rate-3 li:nth-child(3){background-position: top left;}
+.rating.rate-4 li:first-child,.rating.rate-4 li:nth-child(2),.rating.rate-4 li:nth-child(3),.rating.rate-4 li:nth-child(4){background-position: top left;}
+.rating.rate-5 li{background-position: top left;}
+.comment p{color: #ededed; font-size: 13px; }
+
+.profile div[role="main"] { height: auto; }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/integ/iri/css/iri-creation-cinecard.css Thu Apr 18 18:20:50 2013 +0200
@@ -0,0 +1,312 @@
+.sidebar {
+ display: table-cell;
+ padding-top: 60px;
+ vertical-align: top;
+}
+.sidebar .content {
+ width: 280px;
+ padding: 18px 0 0 12px;
+ height: 100%;
+}
+.inner-content {
+ padding-right: 16px;
+}
+.sidebar h2 {
+ font-size: 20px;
+ margin-bottom: 24px;
+}
+.user {
+ height: 30px;
+ line-height: 30px;
+}
+.user img {
+ width: 30px;
+ height: 30px;
+ margin: 0 24px 24px 0;
+ float: left;
+}
+.user p {
+ float: left;
+ font-size: 13px;
+}
+h3.instruction {
+ color: #c7c7c7;
+ clear: both;
+ padding-bottom: 14px;
+ margin: 0;
+ border-bottom: 1px solid #3b3b3b;
+}
+
+.sidebar ul a {
+ display: block;
+}
+.sidebar ul li {
+ -webkit-box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41);
+ -moz-box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41);
+ box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41);
+}
+.stickers.less {
+ height: 90px;
+ overflow-y: hidden;
+}
+.stickers li {
+ margin: 0 10px 10px 0;
+ float: left;
+}
+.stickers li a {
+ width: 81px;
+ height: 80px;
+ background-color: #fff;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ background-repeat: no-repeat;
+ background-position: center 10px;
+}
+.stickers li span {
+ width: 100%;
+ color: #212121;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 12px;
+ display: inline-block;
+ text-align: center;
+ padding-top: 48px;
+}
+a.eye {
+ background-image: url(../img/eye-icon.png);
+}
+a.star {
+ background-image: url(../img/star-icon.png);
+}
+a.like {
+ background-image: url(../img/like-icon.png);
+}
+a.envelope {
+ background-image: url(../img/envelope-icon.png);
+}
+.stickers li:nth-child(3n+3) {
+ margin-right: 0;
+}
+.sidebar h3 {
+ font-size: 13px;
+ font-weight: bold;
+ margin-bottom: 12px;
+}
+
+.more {
+ margin-bottom: 16px;
+ width: 100%;
+ height: 14px;
+ background-color: #707070;
+ display: inline-block;
+}
+.more.less {
+ background-color: #404040;
+}
+.more:hover {
+ background-color: #909090;
+}
+.more span {
+ margin: 4px auto 0;
+ width: 0;
+ height: 0;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-top: 6px solid #202020;
+ display: block;
+}
+.more.less span {
+ border-top: none;
+ border-bottom: 6px solid #202020;
+}
+.more-hide {
+ display: none;
+}
+
+.stars.less, .images.less {
+ height: 90px;
+ overflow-y: hidden;
+}
+.stars li:nth-child(4n+4) {
+ margin-right: 0;
+}
+.stars li {
+ margin: 0 8px 10px 0;
+ width: 58px;
+ height: 78px;
+ border: 1px solid #767676;
+ float: left;
+}
+.stars img {
+ width: 58px;
+ height: 78px;
+}
+
+.images li:nth-child(3n+3) {
+ margin-right: 0;
+}
+.images li {
+ margin: 0 8px 10px 0;
+ border: 1px solid #767676;
+ float: left;
+ overflow: hidden;
+}
+.images li a {
+ width: 80px;
+ height: 80px;
+}
+
+.videos.less {
+ height: 76px;
+ overflow: hidden;
+}
+.videos li:nth-child(3n+3) {
+ margin-right: 0;
+}
+.videos li a {
+ width: 80px;
+ height: 64px;
+}
+.videos li {
+ overflow: hidden;
+ margin: 0 8px 10px 0;
+ border: 1px solid #767676;
+ float: left;
+}
+
+.renkan {
+ overflow: hidden;
+ height: 100%;
+ position: relative;
+ display: table-cell;
+ padding-top: 60px;
+ vertical-align: top;
+ background-color: #eee;
+ width: 100%;
+ background: url(../img/bg-renkan.png) 0 0;
+ min-width: 400px;
+}
+.wrap-top {
+ width: 100%;
+ height: 56px;
+ background-color: rgba(0,0,0,.4);
+}
+.wrap-top h2 {
+ font-size: 30px;
+ padding-left: 18px;
+ line-height: 56px;
+ display: inline-block;
+ font-size: 30px;
+}
+
+.wrap-top .movie-year {
+ margin-left: 10px; font-weight: normal;
+}
+
+.Rk-ZoomButtons, .zoom {
+ width: 30px;
+ margin: 18px 0 0 16px;
+ -webkit-box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);
+ box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);
+}
+.zoom li {
+ padding: 0;
+ width: 30px;
+ height: 30px;
+}
+.Rk-ZoomIn, .Rk-ZoomOut, .zoom a {
+ margin: 0;
+ width: 30px;
+ height: 30px;
+ display: inline-block;
+ background: url(../img/zoom.png) center top no-repeat;
+}
+.Rk-ZoomIn:hover, .Rk-ZoomOut:hover, .zoom a:hover {
+ background-color: #191919;
+}
+.Rk-ZoomIn, .zoom .in {
+ background-color: #929292;
+ background-position: center 8px;
+}
+.Rk-ZoomOut, .zoom .out {
+ background-color: #fff;
+ background-position: center -22px;
+}
+
+.actions {
+ float: right;
+ margin: 12px 12px 0 0;
+}
+.actions li {
+ float: right;
+}
+.actions a {
+ width: 92px;
+ height: 32px;
+ display: inline-block;
+ text-align: center;
+ line-height: 32px;
+ font-size: 11px;
+ font-weight: bold;
+ text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.8);
+ -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);
+ -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);
+ box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+a.send {
+ background: #126ae3;
+ background: -moz-linear-gradient(top, #126ae3 0%, #1899e1 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#126ae3), color-stop(100%,#1899e1));
+ background: -webkit-linear-gradient(top, #126ae3 0%,#1899e1 100%);
+ background: -o-linear-gradient(top, #126ae3 0%,#1899e1 100%);
+ background: -ms-linear-gradient(top, #126ae3 0%,#1899e1 100%);
+ background: linear-gradient(to bottom, #126ae3 0%,#1899e1 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#126ae3', endColorstr='#1899e1',GradientType=0 ); /* IE6-9 */
+}
+a.send:hover {
+ background: #1899e1;
+ background: -moz-linear-gradient(top, #1899e1 0%, #126ae3 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1899e1), color-stop(100%,#126ae3));
+ background: -webkit-linear-gradient(top, #1899e1 0%,#126ae3 100%);
+ background: -o-linear-gradient(top, #1899e1 0%,#126ae3 100%);
+ background: -ms-linear-gradient(top, #1899e1 0%,#126ae3 100%);
+ background: linear-gradient(to bottom, #1899e1 0%,#126ae3 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1899e1', endColorstr='#126ae3',GradientType=0 );
+}
+
+.edit-cinecard {
+ position: relative;
+}
+
+.logo-iri {
+ z-index: 10;
+ position: absolute;
+ right: 10px;
+ bottom: 62px;
+}
+
+div.rate_tooltip {
+ display: none;
+ z-index: 10;
+ box-shadow: 2px 2px 10px 0px #000;
+ padding: 0 8px;
+ height: 21px;
+ line-height: 21px;
+}
+div.rate_tooltip p {
+ display: inline-block;
+}
+.rate_tooltip .arrow_l {
+ background: url("skin/arrow_l.png") no-repeat 0 0;
+ height: 15px;
+ top: 3px;
+ position: absolute;
+ left: -8px;
+ width: 8px;
+}
+
Binary file integ/iri/img/arrow_l.png has changed
Binary file integ/iri/img/bg-renkan.png has changed
Binary file integ/iri/img/envelope-icon.png has changed
Binary file integ/iri/img/eye-icon.png has changed
Binary file integ/iri/img/like-icon.png has changed
Binary file integ/iri/img/logo-iri.png has changed
Binary file integ/iri/img/review-rating-star-sprite.png has changed
Binary file integ/iri/img/star-icon.png has changed
Binary file integ/iri/img/zoom.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/integ/iri/js/iri-buzz.js Thu Apr 18 18:20:50 2013 +0200
@@ -0,0 +1,332 @@
+$(function(){
+
+/*
+$(window).bind('resize', function(){
+ setSidebarContentHeight();
+});
+setSidebarContentHeight();
+function setSidebarContentHeight(){
+ var newHeight = $(window).height() - $('header').height() - $('footer').height();
+ $(".sidebar .content").css('height', newHeight);
+}
+
+*/
+
+
+
+var CONFIG = {
+ wChart : 150,
+ hVS : 200,
+ now : new Date(),
+ dayLimit : 1,
+ timelineMin : 5,
+ bar : []
+};
+
+function init(){
+ var wWin = ($(window).width()>520) ? $(window).width() : 520;
+ $('.timer-bar').width(wWin - 170);
+
+ var stepHour = CONFIG.dayLimit * 24 / 12;
+ var hourText = 0;
+ $('.hours li').each(function(k, v){
+ $(v).text(hourText+'h');
+ hourText = hourText + stepHour;
+ });
+
+ 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);
+ });
+
+
+ var spaceTop = 100, spaceBotPoster = 200;
+ CONFIG.hVS = $(window).height() - $('footer').height() - $('header').height() - spaceTop - spaceBotPoster;
+ CONFIG.hVS = (CONFIG.hVS>200) ? CONFIG.hVS : 200;
+
+ showHorloge();
+}
+
+init();
+
+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 bcSettings = {
+ width : 960,
+ height : CONFIG.hVS,
+ chart : {
+ spacer : 5
+ },
+ data : {
+ model :[],
+ strata:[],
+ stream : { provider : 'direct' }
+ },
+ sedimentation:{
+ aggregation:{height:100}
+ },
+ options:{layout:false}
+};
+
+
+var currentDay = new Date().getDate();
+var _reviewMovies = [];
+var nbMovies;
+var indiceMovie = 0;
+var indiceBar = 0;
+var barChart;
+
+var urlBestMovies = 'http://api.allocine.fr/rest/v3/movielist?partner='+ partnerCode +'&format=json&filter=top:week&count=15';
+$.getJSON(urlBestMovies, function(data) {
+
+ var movies = data.feed.movie;
+ nbMovies = movies.length;
+ bcSettings.width = nbMovies * CONFIG.wChart + (10 * nbMovies);
+ $('.posters').css('width', bcSettings.width);
+ //var wItem = bcSettings.width / nbMovies;
+
+ _.each(movies, function(d){
+
+ var dataMovie = {
+ title : d.originalTitle,
+ code : d.code,
+ posterUrl : d.poster.href,
+ userRating : d.statistics.userRating,
+ userReviewCount : d.statistics.userReviewCount
+ };
+
+ var poster =
+ '<li>'+
+ '<img src="'+ dataMovie.posterUrl +'" alt="'+ dataMovie.title +'" />'+
+ '</li>';
+ $('.posters').append(poster);
+
+ //getReviewsByFilm(dataMovie.code);
+
+ CONFIG.bar.push(dataMovie.code);
+
+ bcSettings.data.model.push({});
+
+ var userReviewCount = dataMovie.userReviewCount;
+ if(_.isUndefined(userReviewCount))userReviewCount = 0;
+ var initValue = userReviewCount;
+
+ initValue = 0;
+
+ bcSettings.data.strata.push([{initValue: initValue }]);
+/*
+ var item = $('<li>').attr('data-poster', dataMovie.posterUrl).attr('id', 'movie-'+dataMovie.code ).attr('id', 'movie-'+dataMovie.code ).css('width', wItem);
+ var nbReview = $('').addClass('nbReview').text(userReviewCount);
+ item.append(nbReview);
+ item.appendTo('.info-movies');
+*/
+ });
+
+ resizeImg('.posters');
+ barChart = $("#data-viz").vs(bcSettings).data('visualSedimentation');
+
+ barChart.settings.sedimentation.token.size.minimum=0;
+});
+
+var now = new Date();
+
+function reviewAllowSince(dateReview){
+ var diffNowReview = CONFIG.now.getTime() - new Date(dateReview).getTime();
+ var limit = (CONFIG.dayLimit * 24) * 60 * 60 * 1000;
+ if(diffNowReview<=limit){
+ var startDate = limit - diffNowReview;
+ return startDate;
+ }else{
+ return false;
+ }
+}
+
+function generateTimerByMin(time){
+ var timeLimit = (CONFIG.timelineMin*60)*1000;
+ return (time * timeLimit) / ((CONFIG.dayLimit*24)*60*60*1000)
+}
+
+function showHorloge(){
+
+ var timestampDateLimit = CONFIG.now.getTime() - ((CONFIG.dayLimit*24)*60*60*1000);
+ var dateLimit = new Date(timestampDateLimit);
+
+ var diff = CONFIG.now.getTime() - timestampDateLimit;
+
+ var oneHour = (CONFIG.timelineMin * 60 * 1000) / (CONFIG.dayLimit*24);
+ var oneMinute = oneHour / 60;
+
+
+ var wTimerBar = $('.timer-bar').width();
+ var timerBarValue = $('.timer-bar-value');
+ timerBarValue.width(0);
+ var indice = 0;
+
+ setInterval(function(){
+ if(indice>=diff) return;
+ indice = indice + (60 * 1000);
+ var wTimerBarValue = wTimerBar * indice / diff;
+ timerBarValue.width(wTimerBarValue);
+ },oneMinute);
+
+}
+
+
+
+function getReviewsByFilm(codeFilm){
+
+ var _movie = {
+ movieCode : codeFilm
+ };
+
+ var reviewCount = 100;
+ var urlCommentaireMovie = 'http://api.allocine.fr/rest/v3/reviewlist?partner='+ partnerCode +'&format=json&filter=public&count='+reviewCount+'&subject=movie:'+codeFilm;
+ $.getJSON(urlCommentaireMovie, function(data) {
+
+ var nbFilmSince = 0;
+ //console.log(data)
+ var totalResults = data.feed.totalResults;
+ if(totalResults > 0) {
+ var _reviews = new Array();
+ var reviews = data.feed.review;
+ _.each(reviews, function(d){
+ if(d.totalResults == 0) return;
+
+ var dataReview = {
+ commentaire : d.body,
+ date : d.creationDate,//"2013-03-10T
+ rating : d.rating,
+ author : d.writer.name
+ };
+
+ var startDate = reviewAllowSince(d.creationDate);
+
+ if(startDate){
+ nbFilmSince++
+ dataReview.startDate = startDate;
+ _reviews.push(dataReview);
+ }
+ });
+
+ var totalReviews = $('li#movie-'+codeFilm+' span.nbReview').text();
+ $('li#movie-'+codeFilm+' span.nbReview').text(totalReviews-nbFilmSince)
+
+ _movie.reviews = _reviews;
+ _reviewMovies.push(_movie);
+ }
+
+ indiceMovie++;
+ //console.log(indiceMovie)
+ if(indiceMovie == nbMovies){
+ showHorloge();
+ displayReviews();
+ }
+
+ });//getJson
+}//getReviewsByFilm
+
+function displayReviews(){
+ _.each(_reviewMovies, function(a){
+ var movieCode = a.movieCode;
+ var reviews = a.reviews;
+
+ var barCharCat;
+ $.each(CONFIG.bar, function(k,v){
+ if(movieCode == v)barCharCat = k;
+ });
+
+ _.each(reviews, function(b){
+
+ b.movieCode = movieCode;
+ var startDate = b.startDate;
+
+ var timer = generateTimerByMin(startDate);
+ setTimeout(function(){
+ addToken(barCharCat, b)
+ },timer);
+ });
+ });
+}//displayReviews
+
+function addToken(barCharCat, data){
+ var commentaire = data.commentaire;
+ var date = data.date;
+ var rating = data.rating;
+ var author = data.author;
+ var movieCode = data.movieCode;
+
+ var nbReview = $('li#movie-'+movieCode+' span.nbReview').text();
+ var newNbReview = parseInt(nbReview)+1;
+ $('li#movie-'+movieCode+' span.nbReview').text(newNbReview);
+ //console.log(data.author)
+ barChart.addToken({
+ commentaire : commentaire,
+ movieCode : movieCode,
+ date : date,
+ rating : rating,
+ author : author,
+ category:barCharCat,
+ size:1,
+shape:{
+ type:'box',
+ width:75,
+ height:2.5
+},
+ callback:{
+ mouseover:function(token){
+ var commentaire = token.attr('commentaire');
+ var author = token.attr('author');
+ var date = token.attr('date');
+ var movieCode = token.attr('movieCode');
+ $('.review .author').text(author+', '+date);
+ $('.review .comment').text(commentaire);
+ var poster = $('li#movie-'+movieCode).attr('data-poster');
+ $('.review img').attr('src', poster);
+ }
+ }
+ });
+}
+
+$('a.rejouer').bind('click', function(e){
+ e.preventDefault();
+ addTokenTest()
+});
+
+function addTokenTest(){
+ barChart.addToken({
+ category:0,
+ size:1,
+
+ callback:{
+
+ }
+ });
+}
+});//load
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/integ/iri/js/iri-creation-cinecard.js Thu Apr 18 18:20:50 2013 +0200
@@ -0,0 +1,282 @@
+$(function(){
+
+function setSidebarContentHeight(){
+ var newHeight = $(window).height() - $('header').height() - $('footer').height();
+ $(".sidebar .content").css('height', newHeight);
+}
+$(window).on('resize', setSidebarContentHeight);
+setSidebarContentHeight();
+
+$(".sidebar .content").mCustomScrollbar({
+ advanced:{
+ updateOnContentResize: true
+ }
+});
+
+$('a.more').bind('click', function(e){
+ e.preventDefault();
+ var target = $(this).attr('href');
+ if($(target).hasClass('less')){
+ $(target).removeClass('less');
+ $(this).addClass('less');
+ }else{
+ $(target).addClass('less');
+ $(this).removeClass('less');
+ }
+});// a.more
+
+$('.stickers a').bind('click', function(e){
+ e.preventDefault();
+});
+
+$('[data-image*="{stickers_base}"]').each(function() {
+ var el = $(this);
+ el.attr("data-image", el.attr("data-image").replace("{stickers_base}",stickers_base));
+});
+
+//-- API allocine
+
+//-- movie
+var urlMovie = 'http://api.allocine.fr/rest/v3/movie?partner='+partnerCode+'&code='+ idMovie;
+$.getJSON(urlMovie, function(data) {
+ var movie = data.movie;
+
+ //-- title
+ $('.wrap-top .movie-title').text(movie.title);
+ $('.wrap-top .movie-year').text(movie.productionYear);
+
+ //-- stars
+ var castMember = movie.castMember;
+
+ $.each(castMember, function(k, v){
+ var name = v.person.name;
+ var codeActor = v.person.code;
+ var urlPicture;
+ if(v.picture !== undefined) {
+ urlPicture = v.picture.href;
+ }else{
+ urlPicture = 'http://fr.web.img3.acsta.net/c_160_213/b_1_d6d6d6/commons/emptymedia/empty_star.jpg';
+ }
+ var urlFichePersonne = 'http://www.allocine.fr/personne/fichepersonne_gen_cpersonne='+codeActor+'.html';
+ var itemStar =
+ '<li class="cinecard-draggable" draggable="true">'+
+ '<a class="tool-info" target="_blank" href="'+ urlFichePersonne +'" data-title="'+ name +'">'+
+ '<img src="'+ urlPicture +'" alt="'+ name +'" />'+
+ '</a>'+
+ '</li>';
+ $('#stars-more').append(itemStar);
+ });
+
+ /* Creating Renkan Template */
+ var _posterData = {
+ title: movie.title,
+ image: movie.poster.href,
+ uri: _(movie.link).find(function(l) { return l.rel === "aco:web" }).href,
+ position: {
+ x: 0,
+ y: 0
+ },
+ description: "Affiche du film",
+ size: 4
+ },
+ _stickers = [
+ "pourquoi-j-ai-aime.png",
+ "pourquoi-le-voir.png",
+ "secrets-et-bonus.png",
+ "message-perso.png"
+ ],
+ _startAngle = Math.PI / 4,
+ _stickerDistance = 220,
+ _filmNode = _renkan.project.addNode(_posterData);
+
+ _(_stickers).each(function(v, k) {
+ var _a = _startAngle + 2 * Math.PI * k / _stickers.length,
+ _stickerData = {
+ title: " ",
+ position: {
+ x: _stickerDistance * Math.cos(_a),
+ y: - _stickerDistance * Math.sin(_a)
+ },
+ image: stickers_base + v,
+ size: 0
+ }
+ _stickerNode = _renkan.project.addNode(_stickerData);
+ var _edgeData = {
+ from: _filmNode,
+ to: _stickerNode
+ }
+ _renkan.project.addEdge(_edgeData);
+ });
+
+
+});
+
+//-- picture
+var urlPicture = 'http://api.allocine.fr/rest/v3/picturelist?partner='+partnerCode+'&subject=movie:'+ idMovie;
+$.getJSON(urlPicture, function(data) {
+ var media = data.feed.media;
+ $.each(media, function(k, v){
+ var urlThumb = v.thumbnail.href;
+ var rcode = v.rcode;
+ var title = v.title;
+ var urlAllocine = 'http://www.allocine.fr/film/fichefilm-'+ idMovie +'/photos/detail/?cmediafile='+ rcode;
+ var itemImagess =
+ '<li class="cinecard-draggable" draggable="true">'+
+ '<a class="tool-info" target="_blank" href="'+ urlAllocine +'" data-title="'+title+'">'+
+ '<img src="'+ urlThumb +'" alt="'+title+'" />'+
+ '</a>'+
+ '</li>';
+ $('#images-more').append(itemImagess);
+ });
+ resizeImg('#images-more');
+});//get
+
+//-- trailer
+var urlTrailers = 'http://api.allocine.fr/rest/v3/videolist?partner='+partnerCode+'&mediafmt=flv&subject=movie:'+ idMovie;
+$.getJSON(urlTrailers, function(data) {
+ var media = data.feed.media;
+ $.each(media, function(k, v){
+ console.log(v)
+ var urlThumbnail = v.thumbnail.href;
+ var title = v.title;
+ var code = v.code;
+ var url = 'http://www.allocine.fr/video/player_gen_cmedia='+code+'&cfilm='+idMovie+'.html';
+ var itemVideo =
+ '<li class="cinecard-draggable" draggable="true">'+
+ '<a class="tool-info" target="_blank" href="'+ url +'" data-title="'+title+'">'+
+ '<img src="'+ urlThumbnail +'" alt="'+title+'" />'+
+ '</a>'+
+ '</li>';
+ $('#videos-more').append(itemVideo);
+ resizeImg('#videos-more');
+ });
+});
+
+
+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
+ });
+ });
+ });
+}
+
+//TOOLTIP
+var show_tooltip_info_iri = function(elem){
+ var tooltip = $('.rate_tooltip'),
+ name = elem.attr('data-title'),
+ arrow = tooltip.find('.arrow_l'),
+ top = elem.offset().top,
+ right = elem.offset().left + elem.width() + arrow.width();
+ tooltip.find('p').text(name)
+ tooltip.show();
+ tooltip.css({
+ top : top,
+ left : right
+ });
+}
+var hide_tooltip_info_iri = function(elem){
+ var tooltip = $('.rate_tooltip');
+ tooltip.hide();
+}
+$(document).on({
+ mouseenter: function() {
+ show_tooltip_info_iri($(this));
+ },
+ mouseleave: function() {
+ hide_tooltip_info_iri($(this));
+ }
+}, 'a.tool-info');
+
+//Renkan initialization
+var _renkan = new Rkns.Renkan({
+ user_id: "u-iri",
+ language: "fr_cg",
+ container: "cinecard",
+ show_bins: false,
+ show_top_bar: false,
+ show_minimap: false,
+ show_node_circles: false,
+ clip_node_images: false,
+ size_bug_fix: false,
+ allow_double_click: false,
+ node_size_base: 40,
+ default_user_color: "#808080",
+ static_url: renkan_base
+});
+
+var elementDropped = false;
+
+// Attach drag and drop events
+$(".sidebar")
+ .on("mousemove", ".cinecard-draggable", function(e) {
+ try {
+ this.dragDrop();
+ }
+ catch(err) {}
+ })
+ .on("dragstart", ".cinecard-draggable", function(e) {
+ $(".cinecard-draggable").css("opacity", .5);
+ $(this).css("opacity",1);
+ var div = document.createElement('div');
+ div.appendChild(this.cloneNode(true));
+ try {
+ e.originalEvent.dataTransfer.setData("text/html",div.innerHTML);
+ }
+ catch(err) {
+ e.originalEvent.dataTransfer.setData("text",div.innerHTML);
+ }
+ })
+ .on("dragend", ".cinecard-draggable", function(e) {
+ $(".cinecard-draggable").css("opacity", 1);
+ })
+ .on("touchstart", ".cinecard-draggable", function(e) {
+ elementDropped = false;
+ $(".cinecard-draggable").css("opacity", .5);
+ $(this).css("opacity",1);
+ })
+ .on("touchmove", ".cinecard-draggable", function(e) {
+ e.preventDefault();
+ var touch = e.originalEvent.changedTouches[0],
+ off = _renkan.renderer.canvas_$.offset(),
+ w = _renkan.renderer.canvas_$.width(),
+ h = _renkan.renderer.canvas_$.height();
+ if (touch.pageX >= off.left && touch.pageX < (off.left + w) && touch.pageY >= off.top && touch.pageY < (off.top + h)) {
+ if (elementDropped) {
+ _renkan.renderer.onMouseMove(touch, true);
+ } else {
+ elementDropped = true;
+ var div = document.createElement('div');
+ div.appendChild(this.cloneNode(true));
+ _renkan.renderer.dropData({"text/html": div.innerHTML}, touch);
+ _renkan.renderer.onMouseDown(touch, true);
+ }
+ }
+ })
+ .on("touchend", ".cinecard-draggable", function(e) {
+ $(".cinecard-draggable").css("opacity", 1);
+ if (elementDropped) {
+ _renkan.renderer.onMouseUp(e.originalEvent.changedTouches[0], true);
+ }
+ elementDropped = false;
+ });
+
+$(".send").click(function() {
+ alert("Save JSON data:\n\n" + JSON.stringify(_renkan.project.toJSON()));
+});
+
+});
\ No newline at end of file
Binary file integ/iri/stickers/message-perso.png has changed
Binary file integ/iri/stickers/mon-avis.png has changed
Binary file integ/iri/stickers/pourquoi-j-ai-aime.png has changed
Binary file integ/iri/stickers/pourquoi-le-voir.png has changed
Binary file integ/iri/stickers/scenes-cultes.png has changed
Binary file integ/iri/stickers/secrets-et-bonus.png has changed
Binary file integ/iri/stickers/tu-vas-aimer.png has changed
--- a/integ/js/iri-buzz.js Thu Apr 18 11:56:24 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-$(function(){
-
-/*
-$(window).bind('resize', function(){
- setSidebarContentHeight();
-});
-setSidebarContentHeight();
-function setSidebarContentHeight(){
- var newHeight = $(window).height() - $('header').height() - $('footer').height();
- $(".sidebar .content").css('height', newHeight);
-}
-
-*/
-
-
-
-var CONFIG = {
- wChart : 150,
- hVS : 200,
- now : new Date(),
- dayLimit : 1,
- timelineMin : 5,
- bar : []
-};
-
-function init(){
- var wWin = ($(window).width()>520) ? $(window).width() : 520;
- $('.timer-bar').width(wWin - 170);
-
- var stepHour = CONFIG.dayLimit * 24 / 12;
- var hourText = 0;
- $('.hours li').each(function(k, v){
- $(v).text(hourText+'h');
- hourText = hourText + stepHour;
- });
-
- 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);
- });
-
-
- var spaceTop = 100, spaceBotPoster = 200;
- CONFIG.hVS = $(window).height() - $('footer').height() - $('header').height() - spaceTop - spaceBotPoster;
- CONFIG.hVS = (CONFIG.hVS>200) ? CONFIG.hVS : 200;
-
- showHorloge();
-}
-
-init();
-
-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 bcSettings = {
- width : 960,
- height : CONFIG.hVS,
- chart : {
- spacer : 5
- },
- data : {
- model :[],
- strata:[],
- stream : { provider : 'direct' }
- },
- sedimentation:{
- aggregation:{height:100}
- },
- options:{layout:false}
-};
-
-
-var currentDay = new Date().getDate();
-var _reviewMovies = [];
-var nbMovies;
-var indiceMovie = 0;
-var indiceBar = 0;
-var barChart;
-
-var urlBestMovies = 'http://api.allocine.fr/rest/v3/movielist?partner='+ partnerCode +'&format=json&filter=top:week&count=15';
-$.getJSON(urlBestMovies, function(data) {
-
- var movies = data.feed.movie;
- nbMovies = movies.length;
- bcSettings.width = nbMovies * CONFIG.wChart + (10 * nbMovies);
- $('.posters').css('width', bcSettings.width);
- //var wItem = bcSettings.width / nbMovies;
-
- _.each(movies, function(d){
-
- var dataMovie = {
- title : d.originalTitle,
- code : d.code,
- posterUrl : d.poster.href,
- userRating : d.statistics.userRating,
- userReviewCount : d.statistics.userReviewCount
- };
-
- var poster =
- '<li>'+
- '<img src="'+ dataMovie.posterUrl +'" alt="'+ dataMovie.title +'" />'+
- '</li>';
- $('.posters').append(poster);
-
- //getReviewsByFilm(dataMovie.code);
-
- CONFIG.bar.push(dataMovie.code);
-
- bcSettings.data.model.push({});
-
- var userReviewCount = dataMovie.userReviewCount;
- if(_.isUndefined(userReviewCount))userReviewCount = 0;
- var initValue = userReviewCount;
-
- initValue = 0;
-
- bcSettings.data.strata.push([{initValue: initValue }]);
-/*
- var item = $('<li>').attr('data-poster', dataMovie.posterUrl).attr('id', 'movie-'+dataMovie.code ).attr('id', 'movie-'+dataMovie.code ).css('width', wItem);
- var nbReview = $('').addClass('nbReview').text(userReviewCount);
- item.append(nbReview);
- item.appendTo('.info-movies');
-*/
- });
-
- resizeImg('.posters');
- barChart = $("#data-viz").vs(bcSettings).data('visualSedimentation');
-
- barChart.settings.sedimentation.token.size.minimum=0;
-});
-
-var now = new Date();
-
-function reviewAllowSince(dateReview){
- var diffNowReview = CONFIG.now.getTime() - new Date(dateReview).getTime();
- var limit = (CONFIG.dayLimit * 24) * 60 * 60 * 1000;
- if(diffNowReview<=limit){
- var startDate = limit - diffNowReview;
- return startDate;
- }else{
- return false;
- }
-}
-
-function generateTimerByMin(time){
- var timeLimit = (CONFIG.timelineMin*60)*1000;
- return (time * timeLimit) / ((CONFIG.dayLimit*24)*60*60*1000)
-}
-
-function showHorloge(){
-
- var timestampDateLimit = CONFIG.now.getTime() - ((CONFIG.dayLimit*24)*60*60*1000);
- var dateLimit = new Date(timestampDateLimit);
-
- var diff = CONFIG.now.getTime() - timestampDateLimit;
-
- var oneHour = (CONFIG.timelineMin * 60 * 1000) / (CONFIG.dayLimit*24);
- var oneMinute = oneHour / 60;
-
-
- var wTimerBar = $('.timer-bar').width();
- var timerBarValue = $('.timer-bar-value');
- timerBarValue.width(0);
- var indice = 0;
-
- setInterval(function(){
- if(indice>=diff) return;
- indice = indice + (60 * 1000);
- var wTimerBarValue = wTimerBar * indice / diff;
- timerBarValue.width(wTimerBarValue);
- },oneMinute);
-
-}
-
-
-
-function getReviewsByFilm(codeFilm){
-
- var _movie = {
- movieCode : codeFilm
- };
-
- var reviewCount = 100;
- var urlCommentaireMovie = 'http://api.allocine.fr/rest/v3/reviewlist?partner='+ partnerCode +'&format=json&filter=public&count='+reviewCount+'&subject=movie:'+codeFilm;
- $.getJSON(urlCommentaireMovie, function(data) {
-
- var nbFilmSince = 0;
- //console.log(data)
- var totalResults = data.feed.totalResults;
- if(totalResults > 0) {
- var _reviews = new Array();
- var reviews = data.feed.review;
- _.each(reviews, function(d){
- if(d.totalResults == 0) return;
-
- var dataReview = {
- commentaire : d.body,
- date : d.creationDate,//"2013-03-10T
- rating : d.rating,
- author : d.writer.name
- };
-
- var startDate = reviewAllowSince(d.creationDate);
-
- if(startDate){
- nbFilmSince++
- dataReview.startDate = startDate;
- _reviews.push(dataReview);
- }
- });
-
- var totalReviews = $('li#movie-'+codeFilm+' span.nbReview').text();
- $('li#movie-'+codeFilm+' span.nbReview').text(totalReviews-nbFilmSince)
-
- _movie.reviews = _reviews;
- _reviewMovies.push(_movie);
- }
-
- indiceMovie++;
- //console.log(indiceMovie)
- if(indiceMovie == nbMovies){
- showHorloge();
- displayReviews();
- }
-
- });//getJson
-}//getReviewsByFilm
-
-function displayReviews(){
- _.each(_reviewMovies, function(a){
- var movieCode = a.movieCode;
- var reviews = a.reviews;
-
- var barCharCat;
- $.each(CONFIG.bar, function(k,v){
- if(movieCode == v)barCharCat = k;
- });
-
- _.each(reviews, function(b){
-
- b.movieCode = movieCode;
- var startDate = b.startDate;
-
- var timer = generateTimerByMin(startDate);
- setTimeout(function(){
- addToken(barCharCat, b)
- },timer);
- });
- });
-}//displayReviews
-
-function addToken(barCharCat, data){
- var commentaire = data.commentaire;
- var date = data.date;
- var rating = data.rating;
- var author = data.author;
- var movieCode = data.movieCode;
-
- var nbReview = $('li#movie-'+movieCode+' span.nbReview').text();
- var newNbReview = parseInt(nbReview)+1;
- $('li#movie-'+movieCode+' span.nbReview').text(newNbReview);
- //console.log(data.author)
- barChart.addToken({
- commentaire : commentaire,
- movieCode : movieCode,
- date : date,
- rating : rating,
- author : author,
- category:barCharCat,
- size:1,
-shape:{
- type:'box',
- width:75,
- height:2.5
-},
- callback:{
- mouseover:function(token){
- var commentaire = token.attr('commentaire');
- var author = token.attr('author');
- var date = token.attr('date');
- var movieCode = token.attr('movieCode');
- $('.review .author').text(author+', '+date);
- $('.review .comment').text(commentaire);
- var poster = $('li#movie-'+movieCode).attr('data-poster');
- $('.review img').attr('src', poster);
- }
- }
- });
-}
-
-$('a.rejouer').bind('click', function(e){
- e.preventDefault();
- addTokenTest()
-});
-
-function addTokenTest(){
- barChart.addToken({
- category:0,
- size:1,
-
- callback:{
-
- }
- });
-}
-});//load
\ No newline at end of file
--- a/integ/js/iri-creation-cinecard.js Thu Apr 18 11:56:24 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-$(function(){
-
-$(window).bind('resize', function(){
- setSidebarContentHeight();
-});
-setSidebarContentHeight();
-function setSidebarContentHeight(){
- var newHeight = $(window).height() - $('header').height() - $('footer').height();
- $(".sidebar .content").css('height', newHeight);
-}
-
-$(".sidebar .content").mCustomScrollbar({
- advanced:{
- updateOnContentResize: true
- }
-});
-
-$('a.more').bind('click', function(e){
- e.preventDefault();
- var target = $(this).attr('href');
- if($(target).hasClass('less')){
- $(target).removeClass('less');
- $(this).addClass('less');
- }else{
- $(target).addClass('less');
- $(this).removeClass('less');
- }
-});// a.more
-
-$('.stickers a').bind('click', function(e){
- e.preventDefault();
-});
-
-//-- API allocine
-
-//-- movie
-var urlMovie = 'http://api.allocine.fr/rest/v3/movie?partner='+partnerCode+'&code='+ idMovie;
-$.getJSON(urlMovie, function(data) {
- var movie = data.movie;
-
- //-- title
- var titleMovie = movie.title;
- $('.renkan .wrap-top h2').text(titleMovie);
-
- //-- stars
- var castMember = movie.castMember;
-
- $.each(castMember, function(k, v){
- var name = v.person.name;
- var codeActor = v.person.code;
- var urlPicture;
- if(v.picture !== undefined) {
- urlPicture = v.picture.href;
- }else{
- urlPicture = 'http://fr.web.img3.acsta.net/c_160_213/b_1_d6d6d6/commons/emptymedia/empty_star.jpg';
- }
- var urlFichePersonne = 'http://www.allocine.fr/personne/fichepersonne_gen_cpersonne='+codeActor+'.html';
- var itemStar =
- '<li class="cinecard-draggable" draggable="true">'+
- '<a class="tool-info" target="_blank" href="'+ urlFichePersonne +'" data-title="'+ name +'">'+
- '<img src="'+ urlPicture +'" alt="'+ name +'" />'+
- '</a>'+
- '</li>';
- $('#stars-more').append(itemStar);
- });
-
- /* Creating Renkan Template */
- var _posterData = {
- title: movie.title,
- image: movie.poster.href,
- uri: _(movie.link).find(function(l) { return l.rel === "aco:web" }).href,
- position: {
- x: 0,
- y: 0
- },
- description: "Affiche du film",
- size: 4
- },
- _stickers = [
- "img/stickers/pourquoi-j-ai-aime.png",
- "img/stickers/pourquoi-le-voir.png",
- "img/stickers/secrets-et-bonus.png"
- ],
- _stickerDistance = 220,
- _filmNode = _renkan.project.addNode(_posterData);
-
- _(_stickers).each(function(v, k) {
- var _a = 2 * Math.PI * k / _stickers.length,
- _stickerData = {
- title: " ",
- position: {
- x: - _stickerDistance * Math.cos(_a),
- y: _stickerDistance * Math.sin(_a)
- },
- image: v,
- size: 0
- }
- _stickerNode = _renkan.project.addNode(_stickerData);
- var _edgeData = {
- from: _filmNode,
- to: _stickerNode
- }
- _renkan.project.addEdge(_edgeData);
- });
-
-
-});
-
-//-- picture
-var urlPicture = 'http://api.allocine.fr/rest/v3/picturelist?partner='+partnerCode+'&subject=movie:'+ idMovie;
-$.getJSON(urlPicture, function(data) {
- var media = data.feed.media;
- $.each(media, function(k, v){
- var urlThumb = v.thumbnail.href;
- var rcode = v.rcode;
- var title = v.title;
- var urlAllocine = 'http://www.allocine.fr/film/fichefilm-'+ idMovie +'/photos/detail/?cmediafile='+ rcode;
- var itemImagess =
- '<li class="cinecard-draggable" draggable="true">'+
- '<a class="tool-info" target="_blank" href="'+ urlAllocine +'" data-title="'+title+'">'+
- '<img src="'+ urlThumb +'" alt="'+title+'" />'+
- '</a>'+
- '</li>';
- $('#images-more').append(itemImagess);
- });
- resizeImg('#images-more');
-});//get
-
-//-- trailer
-var urlTrailers = 'http://api.allocine.fr/rest/v3/videolist?partner='+partnerCode+'&mediafmt=flv&subject=movie:'+ idMovie;
-$.getJSON(urlTrailers, function(data) {
- var media = data.feed.media;
- $.each(media, function(k, v){
- console.log(v)
- var urlThumbnail = v.thumbnail.href;
- var title = v.title;
- var code = v.code;
- var url = 'http://www.allocine.fr/video/player_gen_cmedia='+code+'&cfilm='+idMovie+'.html';
- var itemVideo =
- '<li class="cinecard-draggable" draggable="true">'+
- '<a class="tool-info" target="_blank" href="'+ url +'" data-title="'+title+'">'+
- '<img src="'+ urlThumbnail +'" alt="'+title+'" />'+
- '</a>'+
- '</li>';
- $('#videos-more').append(itemVideo);
- resizeImg('#videos-more');
- });
-});
-
-
-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
- });
- });
- });
-}
-
-//TOOLTIP
-var show_tooltip_info_iri = function(elem){
- var tooltip = $('.rate_tooltip'),
- name = elem.attr('data-title'),
- arrow = tooltip.find('.arrow_l'),
- top = elem.offset().top,
- right = elem.offset().left + elem.width() + arrow.width();
- tooltip.find('p').text(name)
- tooltip.show();
- tooltip.css({
- top : top,
- left : right
- });
-}
-var hide_tooltip_info_iri = function(elem){
- var tooltip = $('.rate_tooltip');
- tooltip.hide();
-}
-$(document).on({
- mouseenter: function() {
- show_tooltip_info_iri($(this));
- },
- mouseleave: function() {
- hide_tooltip_info_iri($(this));
- }
-}, 'a.tool-info');
-
-//Renkan initialization
-var _renkan = new Rkns.Renkan({
- user_id: "u-iri",
- language: "fr",
- container: "cinecard",
- show_bins: false,
- show_top_bar: false,
- show_minimap: false,
- show_node_circles: false,
- clip_node_images: false,
- size_bug_fix: false,
- node_size_base: 40,
- default_user_color: "#808080",
- static_url: "renkan/"
-});
-
-var elementDropped = false;
-
-// Attach drag and drop events
-$(".sidebar")
- .on("mousemove", ".cinecard-draggable", function(e) {
- try {
- this.dragDrop();
- }
- catch(err) {}
- })
- .on("dragstart", ".cinecard-draggable", function(e) {
- $(".cinecard-draggable").css("opacity", .5);
- $(this).css("opacity",1);
- var div = document.createElement('div');
- div.appendChild(this.cloneNode(true));
- try {
- e.originalEvent.dataTransfer.setData("text/html",div.innerHTML);
- }
- catch(err) {
- e.originalEvent.dataTransfer.setData("text",div.innerHTML);
- }
- })
- .on("dragend", ".cinecard-draggable", function(e) {
- $(".cinecard-draggable").css("opacity", 1);
- })
- .on("touchstart", ".cinecard-draggable", function(e) {
- elementDropped = false;
- $(".cinecard-draggable").css("opacity", .5);
- $(this).css("opacity",1);
- })
- .on("touchmove", ".cinecard-draggable", function(e) {
- e.preventDefault();
- var touch = e.originalEvent.changedTouches[0],
- off = _renkan.renderer.canvas_$.offset(),
- w = _renkan.renderer.canvas_$.width(),
- h = _renkan.renderer.canvas_$.height();
- if (touch.pageX >= off.left && touch.pageX < (off.left + w) && touch.pageY >= off.top && touch.pageY < (off.top + h)) {
- if (elementDropped) {
- _renkan.renderer.onMouseMove(touch, true);
- } else {
- elementDropped = true;
- var div = document.createElement('div');
- div.appendChild(this.cloneNode(true));
- _renkan.renderer.dropData({"text/html": div.innerHTML}, touch);
- _renkan.renderer.onMouseDown(touch, true);
- }
- }
- })
- .on("touchend", ".cinecard-draggable", function(e) {
- $(".cinecard-draggable").css("opacity", 1);
- if (elementDropped) {
- _renkan.renderer.onMouseUp(e.originalEvent.changedTouches[0], true);
- }
- elementDropped = false;
- });
-
-$(".send").click(function() {
- alert("Save JSON data:\n\n" + JSON.stringify(_renkan.project.toJSON()));
-});
-
-});
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/integ/renkan/js/cinegift-labels.js Thu Apr 18 18:20:50 2013 +0200
@@ -0,0 +1,7 @@
+Rkns.i18n.fr_cg = {
+ "Edit Node": "Édition d’un élément",
+ "URI:": "URL :",
+ "Description:": "Contenu du message :",
+ "Add Node": "Ajouter un élément",
+ "Do you really wish to remove node ": "Voulez-vous réellement supprimer l’élément "
+}
\ No newline at end of file
--- a/integ/renkan/js/defaults.js Thu Apr 18 11:56:24 2013 +0200
+++ b/integ/renkan/js/defaults.js Thu Apr 18 18:20:50 2013 +0200
@@ -25,6 +25,7 @@
default_user_color: "#303030",
size_bug_fix: true,
/* Resize the canvas after load (fixes a bug on iPad and FF Mac) */
+ allow_double_click: true,
/* MINI-MAP OPTIONS */
--- a/integ/renkan/js/main.js Thu Apr 18 11:56:24 2013 +0200
+++ b/integ/renkan/js/main.js Thu Apr 18 18:20:50 2013 +0200
@@ -120,9 +120,6 @@
this.project = new Rkns.Models.Project();
- this.translate = function(_text) {
- return (Rkns.i18n[_this.options.language] || Rkns.i18n[_this.options.language.substr(0,2)] || {})[_text] || _text;
- }
if (typeof this.options.user_id !== "undefined") {
this.current_user = this.options.user_id;
}
@@ -268,11 +265,20 @@
+ '<ul class="Rk-Bin-List"></ul></div><% } %><div class="Rk-Render Rk-Render-<% if (options.show_bins) { %>Panel<% } else { %>Full<% } %>"></div>'
);
+Rkns.Renkan.prototype.translate = function(_text) {
+ if (Rkns.i18n[this.options.language] && Rkns.i18n[this.options.language][_text]) {
+ return Rkns.i18n[this.options.language][_text];
+ }
+ if (this.options.language.length > 2 && Rkns.i18n[this.options.language.substr(0,2)] && Rkns.i18n[this.options.language.substr(0,2)][_text]) {
+ return Rkns.i18n[this.options.language.substr(0,2)][_text];
+ }
+ return _text;
+}
+
Rkns.Renkan.prototype.onStatusChange = function() {
this.renderer.onStatusChange();
}
-
Rkns.Renkan.prototype.setSearchEngine = function(_key) {
this.search_engine = this.search_engines[_key];
this.$.find(".Rk-Search-Current").attr("class","Rk-Search-Current " + this.search_engine.getBgClass());
--- a/integ/renkan/js/paper-renderer.js Thu Apr 18 11:56:24 2013 +0200
+++ b/integ/renkan/js/paper-renderer.js Thu Apr 18 18:20:50 2013 +0200
@@ -12,6 +12,8 @@
_MIN_SCALE: 1/20,
_MAX_SCALE: 20,
_AUTOSCALE_MARGIN: 50,
+ _DOUBLETAP_DELAY: 800,
+ _DOUBLETAP_DISTANCE: 20*20,
_USER_PLACEHOLDER : function(_renkan) {
return {
color: _renkan.options.default_user_color,
@@ -25,11 +27,8 @@
return "(function(a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r){a=document;b=a.body;c=a.location.href;j='draggable';m='text/x-iri-';d=a.createElement('div');d.innerHTML='<p_style=\"position:fixed;top:0;right:0;font:bold_18px_sans-serif;color:#fff;background:#909;padding:10px;z-index:100000;\">"
+ _renkan.translate("Drag items from this website, drop them in Renkan").replace(/ /g,"_")
+ "</p>'.replace(/_/g,String.fromCharCode(32));b.appendChild(d);e=[{r:/https?:\\/\\/[^\\/]*twitter\\.com\\//,s:'.tweet',n:'twitter'},{r:/https?:\\/\\/[^\\/]*google\\.[^\\/]+\\//,s:'.g',n:'google'},{r:/https?:\\/\\/[^\\/]*lemonde\\.fr\\//,s:'[data-vr-contentbox]',n:'lemonde'}];f=false;e.forEach(function(g){if(g.r.test(c)){f=g;}});if(f){h=function(){Array.prototype.forEach.call(a.querySelectorAll(f.s),function(i){i[j]=true;k=i.style;k.borderWidth='2px';k.borderColor='#909';k.borderStyle='solid';k.backgroundColor='rgba(200,0,180,.1)';})};window.setInterval(h,500);h();};a.addEventListener('dragstart',function(k){l=k.dataTransfer;l.setData(m+'source-uri',c);l.setData(m+'source-title',a.title);n=k.target;if(f){o=n;while(!o.attributes[j]){o=o.parentNode;if(o==b){break;}}}if(f&&o.attributes[j]){p=o.cloneNode(true);l.setData(m+'specific-site',f.n)}else{q=a.getSelection();if(q.type==='Range'||!q.type){p=q.getRangeAt(0).cloneContents();}else{p=n.cloneNode();}}r=a.createElement('div');r.appendChild(p);l.setData('text/x-iri-selected-text',r.textContent.trim());l.setData('text/x-iri-selected-html',r.innerHTML);},false);})();"
- }
-}
-
-Rkns.Renderer.Utils = {
- shortenText : function(_text, _maxlength) {
+ },
+ shortenText : function(_text, _maxlength) {
return (_text.length > _maxlength ? (_text.substr(0,_maxlength) + '…') : _text);
},
drawEditBox : function(_options, _coords, _path, _xmargin, _selector) {
@@ -234,7 +233,7 @@
this.last_circle_radius = this.circle_radius;
var _text = this.model.get("title") || this.renkan.translate("(untitled)");
- _text = Rkns.Renderer.Utils.shortenText(_text, this.options.node_label_max_length);
+ _text = Rkns.Renderer.shortenText(_text, this.options.node_label_max_length);
this.title.text(_text);
this.title.css({
left: this.paper_coords.x,
@@ -509,7 +508,7 @@
_textdelta = _textdelta.multiply(-1);
}
var _text = this.model.get("title");
- _text = Rkns.Renderer.Utils.shortenText(_text, this.options.node_label_max_length);
+ _text = Rkns.Renderer.shortenText(_text, this.options.node_label_max_length);
this.text.text(_text);
var _textpos = this.paper_coords.add(_textdelta);
this.text.css({
@@ -725,17 +724,17 @@
}
Rkns.Renderer.NodeEditor.prototype.template = Rkns._.template(
- '<h2><span class="Rk-CloseX">×</span><%-translate("Edit Node")%></span></h2>'
- + '<p><label><%-translate("Title:")%></label><input class="Rk-Edit-Title" type="text" value="<%-node.title%>"/></p>'
- + '<p><label><%-translate("URI:")%></label><input class="Rk-Edit-URI" type="text" value="<%-node.uri%>"/><a class="Rk-Edit-Goto" href="<%-node.uri%>" target="_blank"></a></p>'
- + '<p><label><%-translate("Description:")%></label><textarea class="Rk-Edit-Description"><%-node.description%></textarea></p>'
- + '<p><span class="Rk-Editor-Label"><%-translate("Size:")%></span><a href="#" class="Rk-Edit-Size-Down">-</a><span class="Rk-Edit-Size-Value"><%-node.size%></span><a href="#" class="Rk-Edit-Size-Up">+</a></p>'
- + '<div class="Rk-Editor-p"><span class="Rk-Editor-Label"><%-translate("Node color:")%></span><div class="Rk-Edit-ColorPicker-Wrapper"><span class="Rk-Edit-Color" style="background:<%-node.color%>;"><span class="Rk-Edit-ColorTip"></span></span><ul class="Rk-Edit-ColorPicker">'
- + '<% _(Rkns.pickerColors).each(function(c) { %><li data-color="<%=c%>" style="background: <%=c%>"></li><% }); %></ul><span class="Rk-Edit-ColorPicker-Text"><%- translate("Choose color") %></span></div></div>'
+ '<h2><span class="Rk-CloseX">×</span><%-renkan.translate("Edit Node")%></span></h2>'
+ + '<p><label><%-renkan.translate("Title:")%></label><input class="Rk-Edit-Title" type="text" value="<%-node.title%>"/></p>'
+ + '<p><label><%-renkan.translate("URI:")%></label><input class="Rk-Edit-URI" type="text" value="<%-node.uri%>"/><a class="Rk-Edit-Goto" href="<%-node.uri%>" target="_blank"></a></p>'
+ + '<p><label><%-renkan.translate("Description:")%></label><textarea class="Rk-Edit-Description"><%-node.description%></textarea></p>'
+ + '<p><span class="Rk-Editor-Label"><%-renkan.translate("Size:")%></span><a href="#" class="Rk-Edit-Size-Down">-</a><span class="Rk-Edit-Size-Value"><%-node.size%></span><a href="#" class="Rk-Edit-Size-Up">+</a></p>'
+ + '<div class="Rk-Editor-p"><span class="Rk-Editor-Label"><%-renkan.translate("Node color:")%></span><div class="Rk-Edit-ColorPicker-Wrapper"><span class="Rk-Edit-Color" style="background:<%-node.color%>;"><span class="Rk-Edit-ColorTip"></span></span><ul class="Rk-Edit-ColorPicker">'
+ + '<% _(Rkns.pickerColors).each(function(c) { %><li data-color="<%=c%>" style="background: <%=c%>"></li><% }); %></ul><span class="Rk-Edit-ColorPicker-Text"><%- renkan.translate("Choose color") %></span></div></div>'
+ '<img class="Rk-Edit-ImgPreview" src="<%-node.image || node.image_placeholder%>" />'
- + '<p><label><%-translate("Image URL:")%></label><input class="Rk-Edit-Image" type="text" value="<%-node.image%>"/></p>'
- + '<p><label><%-translate("Choose Image File:")%></label><input class="Rk-Edit-Image-File" type="file" accept="image/*"/></p>'
- + '<% if (node.has_creator) { %><p><span class="Rk-Editor-Label"><%-translate("Created by:")%></span> <span class="Rk-UserColor" style="background:<%-node.created_by_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(node.created_by_title, 25) %></p><% } %>'
+ + '<p><label><%-renkan.translate("Image URL:")%></label><input class="Rk-Edit-Image" type="text" value="<%-node.image%>"/></p>'
+ + '<p><label><%-renkan.translate("Choose Image File:")%></label><input class="Rk-Edit-Image-File" type="file" accept="image/*"/></p>'
+ + '<% if (node.has_creator) { %><p><span class="Rk-Editor-Label"><%-renkan.translate("Created by:")%></span> <span class="Rk-UserColor" style="background:<%-node.created_by_color%>;"></span><%- Rkns.Renderer.shortenText(node.created_by_title, 25) %></p><% } %>'
);
Rkns.Renderer.NodeEditor.prototype.readOnlyTemplate = Rkns._.template(
@@ -744,7 +743,7 @@
+ '<% if (node.uri) { %><p class="Rk-Display-URI"><a href="<%-node.uri%>" target="_blank"><%-node.short_uri%></a></p><% } %>'
+ '<p><%-node.description%></p>'
+ '<% if (node.image) { %><img class="Rk-Display-ImgPreview" src="<%-node.image%>" /><% } %>'
- + '<% if (node.has_creator) { %><p><span class="Rk-Editor-Label"><%-translate("Created by:")%></span><span class="Rk-UserColor" style="background:<%-node.created_by_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(node.created_by_title, 25) %></p><% } %>'
+ + '<% if (node.has_creator) { %><p><span class="Rk-Editor-Label"><%-renkan.translate("Created by:")%></span><span class="Rk-UserColor" style="background:<%-node.created_by_color%>;"></span><%- Rkns.Renderer.shortenText(node.created_by_title, 25) %></p><% } %>'
);
Rkns.Renderer.NodeEditor.prototype.draw = function() {
@@ -759,7 +758,7 @@
has_creator: !!_model.get("created_by"),
title: _model.get("title"),
uri: _model.get("uri"),
- short_uri: Rkns.Renderer.Utils.shortenText((_model.get("uri") || "").replace(/^(https?:\/\/)?(www\.)?/,'').replace(/\/$/,''),40),
+ short_uri: Rkns.Renderer.shortenText((_model.get("uri") || "").replace(/^(https?:\/\/)?(www\.)?/,'').replace(/\/$/,''),40),
description: _model.get("description"),
image: _model.get("image") || "",
image_placeholder: _image_placeholder,
@@ -768,7 +767,7 @@
created_by_title: _created_by.get("title"),
size: (_size > 0 ? "+" : "") + _size
},
- translate: this.renkan.translate
+ renkan: this.renkan
}));
this.redraw();
var _this = this,
@@ -874,7 +873,7 @@
Rkns.Renderer.NodeEditor.prototype.redraw = function() {
var _coords = this.source_representation.paper_coords;
- Rkns.Renderer.Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * .75, this.editor_$);
+ Rkns.Renderer.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * .75, this.editor_$);
this.editor_$.show();
paper.view.draw();
}
@@ -907,20 +906,20 @@
}
Rkns.Renderer.EdgeEditor.prototype.template = Rkns._.template(
- '<h2><span class="Rk-CloseX">×</span><%-translate("Edit Edge")%></span></h2>'
- + '<p><label><%-translate("Title:")%></label><input class="Rk-Edit-Title" type="text" value="<%-edge.title%>"/></p>'
- + '<p><label><%-translate("URI:")%></label><input class="Rk-Edit-URI" type="text" value="<%-edge.uri%>"/><a class="Rk-Edit-Goto" href="<%-edge.uri%>" target="_blank"></a></p>'
- + '<% if (properties.length) { %><p><label><%-translate("Choose from vocabulary:")%></label><select class="Rk-Edit-Vocabulary">'
- + '<% _(properties).each(function(ontology) { %><option class="Rk-Edit-Vocabulary-Class" value=""><%- translate(ontology.label) %></option>'
+ '<h2><span class="Rk-CloseX">×</span><%-renkan.translate("Edit Edge")%></span></h2>'
+ + '<p><label><%-renkan.translate("Title:")%></label><input class="Rk-Edit-Title" type="text" value="<%-edge.title%>"/></p>'
+ + '<p><label><%-renkan.translate("URI:")%></label><input class="Rk-Edit-URI" type="text" value="<%-edge.uri%>"/><a class="Rk-Edit-Goto" href="<%-edge.uri%>" target="_blank"></a></p>'
+ + '<% if (properties.length) { %><p><label><%-renkan.translate("Choose from vocabulary:")%></label><select class="Rk-Edit-Vocabulary">'
+ + '<% _(properties).each(function(ontology) { %><option class="Rk-Edit-Vocabulary-Class" value=""><%- renkan.translate(ontology.label) %></option>'
+ '<% _(ontology.properties).each(function(property) { var uri = ontology["base-uri"] + property.uri; %><option class="Rk-Edit-Vocabulary-Property" value="<%- uri %>'
- + '"<% if (uri === edge.uri) { %> selected<% } %>><%- translate(property.label) %></option>'
+ + '"<% if (uri === edge.uri) { %> selected<% } %>><%- renkan.translate(property.label) %></option>'
+ '<% }) %><% }) %></select></p><% } %>'
- + '<div class="Rk-Editor-p"><span class="Rk-Editor-Label"><%-translate("Edge color:")%></span><div class="Rk-Edit-ColorPicker-Wrapper"><span class="Rk-Edit-Color" style="background:<%-edge.color%>;"><span class="Rk-Edit-ColorTip"></span></span><ul class="Rk-Edit-ColorPicker">'
- + '<% _(Rkns.pickerColors).each(function(c) { %><li data-color="<%=c%>" style="background: <%=c%>"></li><% }); %></ul><span class="Rk-Edit-ColorPicker-Text"><%- translate("Choose color") %></span></div></div>'
- + '<p><span class="Rk-Edit-Direction"><%- translate("Change edge direction") %></span></p>'
- + '<p><span class="Rk-Editor-Label"><%-translate("From:")%></span><span class="Rk-UserColor" style="background:<%-edge.from_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(edge.from_title, 25) %></p>'
- + '<p><span class="Rk-Editor-Label"><%-translate("To:")%></span><span class="Rk-UserColor" style="background:<%-edge.to_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(edge.to_title, 25) %></p>'
- + '<% if (edge.has_creator) { %><p><span class="Rk-Editor-Label"><%-translate("Created by:")%></span><span class="Rk-UserColor" style="background:<%-edge.created_by_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(edge.created_by_title, 25) %></p><% } %>'
+ + '<div class="Rk-Editor-p"><span class="Rk-Editor-Label"><%-renkan.translate("Edge color:")%></span><div class="Rk-Edit-ColorPicker-Wrapper"><span class="Rk-Edit-Color" style="background:<%-edge.color%>;"><span class="Rk-Edit-ColorTip"></span></span><ul class="Rk-Edit-ColorPicker">'
+ + '<% _(Rkns.pickerColors).each(function(c) { %><li data-color="<%=c%>" style="background: <%=c%>"></li><% }); %></ul><span class="Rk-Edit-ColorPicker-Text"><%- renkan.translate("Choose color") %></span></div></div>'
+ + '<p><span class="Rk-Edit-Direction"><%- renkan.translate("Change edge direction") %></span></p>'
+ + '<p><span class="Rk-Editor-Label"><%-renkan.translate("From:")%></span><span class="Rk-UserColor" style="background:<%-edge.from_color%>;"></span><%- Rkns.Renderer.shortenText(edge.from_title, 25) %></p>'
+ + '<p><span class="Rk-Editor-Label"><%-renkan.translate("To:")%></span><span class="Rk-UserColor" style="background:<%-edge.to_color%>;"></span><%- Rkns.Renderer.shortenText(edge.to_title, 25) %></p>'
+ + '<% if (edge.has_creator) { %><p><span class="Rk-Editor-Label"><%-renkan.translate("Created by:")%></span><span class="Rk-UserColor" style="background:<%-edge.created_by_color%>;"></span><%- Rkns.Renderer.shortenText(edge.created_by_title, 25) %></p><% } %>'
);
Rkns.Renderer.EdgeEditor.prototype.readOnlyTemplate = Rkns._.template(
@@ -928,9 +927,9 @@
+ '<span class="Rk-Display-Title"><% if (edge.uri) { %><a href="<%-edge.uri%>" target="_blank"><% } %><%-edge.title%><% if (edge.uri) { %></a><% } %></span></h2>'
+ '<% if (edge.uri) { %><p class="Rk-Display-URI"><a href="<%-edge.uri%>" target="_blank"><%-edge.short_uri%></a></p><% } %>'
+ '<p><%-edge.description%></p>'
- + '<p><span class="Rk-Editor-Label"><%-translate("From:")%></span><span class="Rk-UserColor" style="background:<%-edge.from_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(edge.from_title, 25) %></p>'
- + '<p><span class="Rk-Editor-Label"><%-translate("To:")%></span><span class="Rk-UserColor" style="background:<%-edge.to_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(edge.to_title, 25) %></p>'
- + '<% if (edge.has_creator) { %><p><span class="Rk-Editor-Label"><%-translate("Created by:")%></span><span class="Rk-UserColor" style="background:<%-edge.created_by_color%>;"></span><%- Rkns.Renderer.Utils.shortenText(edge.created_by_title, 25) %></p><% } %>'
+ + '<p><span class="Rk-Editor-Label"><%-renkan.translate("From:")%></span><span class="Rk-UserColor" style="background:<%-edge.from_color%>;"></span><%- Rkns.Renderer.shortenText(edge.from_title, 25) %></p>'
+ + '<p><span class="Rk-Editor-Label"><%-renkan.translate("To:")%></span><span class="Rk-UserColor" style="background:<%-edge.to_color%>;"></span><%- Rkns.Renderer.shortenText(edge.to_title, 25) %></p>'
+ + '<% if (edge.has_creator) { %><p><span class="Rk-Editor-Label"><%-renkan.translate("Created by:")%></span><span class="Rk-UserColor" style="background:<%-edge.created_by_color%>;"></span><%- Rkns.Renderer.shortenText(edge.created_by_title, 25) %></p><% } %>'
);
Rkns.Renderer.EdgeEditor.prototype.draw = function() {
@@ -945,7 +944,7 @@
has_creator: !!_model.get("created_by"),
title: _model.get("title"),
uri: _model.get("uri"),
- short_uri: Rkns.Renderer.Utils.shortenText((_model.get("uri") || "").replace(/^(https?:\/\/)?(www\.)?/,'').replace(/\/$/,''),40),
+ short_uri: Rkns.Renderer.shortenText((_model.get("uri") || "").replace(/^(https?:\/\/)?(www\.)?/,'').replace(/\/$/,''),40),
description: _model.get("description"),
color: _model.get("color") || _created_by.get("color"),
from_title: _from_model.get("title"),
@@ -955,7 +954,7 @@
created_by_color: _created_by.get("color"),
created_by_title: _created_by.get("title")
},
- translate: this.renkan.translate,
+ renkan: this.renkan,
properties: this.options.properties
}));
this.redraw();
@@ -1032,7 +1031,7 @@
Rkns.Renderer.EdgeEditor.prototype.redraw = function() {
var _coords = this.source_representation.paper_coords;
- Rkns.Renderer.Utils.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$);
+ Rkns.Renderer.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$);
this.editor_$.show();
paper.view.draw();
}
@@ -1285,7 +1284,10 @@
var _this = this,
_allowScroll = true,
_originalScale,
- _zooming = false;
+ _zooming = false,
+ _lastTapDate,
+ _lastTapX,
+ _lastTapY;
this.imageCache = {};
@@ -1316,12 +1318,26 @@
},
touchstart: function(_event) {
_event.preventDefault();
- _originalScale = _this.scale;
- _zooming = false;
- _this.onMouseDown(_event.originalEvent.touches[0], true);
+ var _touches = _event.originalEvent.touches[0];
+ if (
+ _renkan.options.allow_double_click
+ && new Date() - _lastTap < Rkns.Renderer._DOUBLETAP_DELAY
+ && ( Math.pow(_lastTapX - _touches.pageX, 2) + Math.pow(_lastTapY - _touches.pageY, 2) < Rkns.Renderer._DOUBLETAP_DISTANCE )
+ ) {
+ _lastTap = 0;
+ _this.onDoubleClick(_touches);
+ } else {
+ _lastTap = new Date();
+ _lastTapX = _touches.pageX;
+ _lastTapY = _touches.pageY;
+ _originalScale = _this.scale;
+ _zooming = false;
+ _this.onMouseDown(_touches, true);
+ }
},
touchmove: function(_event) {
_event.preventDefault();
+ _lastTap = 0;
if (_event.originalEvent.touches.length == 1) {
_this.onMouseMove(_event.originalEvent.touches[0], true);
} else {
@@ -1349,7 +1365,9 @@
},
dblclick: function(_event) {
_event.preventDefault();
- _this.onDoubleClick(_event);
+ if (_renkan.options.allow_double_click) {
+ _this.onDoubleClick(_event);
+ }
},
mouseleave: function(_event) {
_event.preventDefault();
@@ -1695,9 +1713,17 @@
_grp.remove();
}
}
- var _raster = new paper.Raster(_img);
- _raster.position = _imgdelta.add(_grp.position).subtract(_delta);
- _grp.addChild(_raster);
+ function showImage() {
+ var _raster = new paper.Raster(_img);
+ _raster.position = _imgdelta.add(_grp.position).subtract(_delta);
+ _grp.addChild(_raster);
+ }
+ if (_img.width) {
+ showImage();
+ } else {
+ Rkns.$(_img).on("load",showImage);
+ }
+
return _res
}