Propagate changes
authorveltr
Wed, 28 Nov 2012 15:43:28 +0100
changeset 70 f2686ce658fd
parent 69 e56b4456668f
child 71 4360509f98e4
Propagate changes
src/hashcut/static/hashcut/iri/css/common.css
src/hashcut/static/hashcut/iri/css/edition.css
src/hashcut/static/hashcut/iri/css/home.css
src/hashcut/static/hashcut/js/hashcut.js
--- a/src/hashcut/static/hashcut/iri/css/common.css	Wed Nov 28 15:42:16 2012 +0100
+++ b/src/hashcut/static/hashcut/iri/css/common.css	Wed Nov 28 15:43:28 2012 +0100
@@ -171,24 +171,36 @@
 }
 .header .profil-wrap a{
 	width: 160px;
-	display: block;
+	display: inline-block;
 	text-align: right;
-	position: absolute;
 	right: 0;
-	font-size: 14px;
+	font-size: 13px;
 	color: #30036d;
 	padding-right: 18px;
 }
+.profil-wrap li{
+	text-align: right;
+	line-height: 18px;
+}
 .header .profil-wrap a:hover{
 	color: #FF00FC;
 }
-.header .profil-wrap a.all-hashcut{
-	top: 12px;
-	background: url(../img/arrow-top.png) right 2px no-repeat;
+a.all-hashcut{
+	top: 2px;
+	background: url(../img/arrow-top.png) right 3px no-repeat;
+}
+a.my-profil{
+	top: 42px;
+	background: url(../img/arrow-bot.png) right 6px no-repeat;
 }
-.header .profil-wrap a.my-profil{
-	top: 32px;
-	background: url(../img/arrow-bot.png) right 4px no-repeat;
+.space-top{
+	padding-top: 10px;
+}
+.space-top-2{
+	padding-top: 30px;
+}
+a.new-hashcut{
+	background: url(../img/pencil-icon.png) right 3px no-repeat;
 }
 /* content */
 .content{
@@ -204,6 +216,9 @@
 }
 .pointer{
 	position: absolute;
+	width: 20px;
+	height: 13px;
+	background: url(../img/popin-triangle.png);
 	top: 0;
 }
 .popin-content{
@@ -233,10 +248,10 @@
 }
 
 .user.popin{
-	top: 48px;
+	top: 55px;
 	right: 0;
 }
-.user.popin img.pointer{
+.user.popin .pointer{
 	right: 36px;
 }
 .button {
--- a/src/hashcut/static/hashcut/iri/css/edition.css	Wed Nov 28 15:42:16 2012 +0100
+++ b/src/hashcut/static/hashcut/iri/css/edition.css	Wed Nov 28 15:43:28 2012 +0100
@@ -3,7 +3,9 @@
 .empty-mode .bloc-pvw,
 .empty-mode .bloc-segmentation,
 .segment-mode .bloc-pvw,
-.pvw-mode .bloc-segmentation {
+.pvw-mode .bloc-segmentation,
+.empty-mode .publier-button,
+.segment-mode .publier-button {
     display: none;
 }
 
--- a/src/hashcut/static/hashcut/iri/css/home.css	Wed Nov 28 15:42:16 2012 +0100
+++ b/src/hashcut/static/hashcut/iri/css/home.css	Wed Nov 28 15:43:28 2012 +0100
@@ -9,6 +9,8 @@
 	font-size: 24px;
 	text-decoration: underline;
 	font-weight: bold;
+	background: url(../img/pencil-icon.png) right 12px no-repeat;
+	padding-right: 22px;
 }
 .title-header h2 a:hover{
 	text-decoration: none;
@@ -20,13 +22,10 @@
 	margin-right: 0;
 }
 
-
-
 .last .video-item:nth-child(4n+4){
 	margin-right: 0;
 }
 .last .video-item{
-    height: 130px;
 	width: 140px;
 	float: left;
 	margin: 0 20px 12px 0;
@@ -49,39 +48,41 @@
 .definition p a:hover{
 	text-decoration: none;
 }
-.how-to  li{
+.how-to li{
 	background-image: url(../img/how-to-sprite.png);
 	background-repeat: no-repeat;
 	margin-bottom: 2px;
 }
-.how-to  li h3{
-	color: #de2500;
+.how-to h3{
 	font-size: 18px;
 	font-weight: bold;
 	margin-bottom: 12px;
 }
-.how-to  li p{
+.how-to h3 a{
+    color: #de2500;
+}
+
+.how-to h3 a:hover{
+    text-decoration: underline;
+}
+.how-to p{
 	font-size: 12px; 
 	word-wrap: break-word;
 	width: 210px;
 }
-.how-to  li.inscription{
+.inscription{
 	height: 84px;
 	background-position: 212px 0;
 }
-.how-to  li.creation{
+.creation{
 	height: 100px;
 	background-position: 212px -128px;
 }
-.how-to  li.creation{
-	height: 100px;
-	background-position: 212px -128px;
-}
-.how-to  li.publier{
+.publier{
 	height: 90px;
 	background-position: 212px -266px;
 }
-.how-to  li.next-step{
+.next-step{
 	height: 24px;
 	background-position: 212px -377px;
 }
\ No newline at end of file
--- a/src/hashcut/static/hashcut/js/hashcut.js	Wed Nov 28 15:42:16 2012 +0100
+++ b/src/hashcut/static/hashcut/js/hashcut.js	Wed Nov 28 15:43:28 2012 +0100
@@ -1850,7 +1850,6 @@
         mashupSegmentEnd = mashup.currentAnnotation.annotation.end.milliseconds;
         mashupTimedelta = mashupSegmentBegin - mashup.currentAnnotation.begin.milliseconds;
         mashup.currentMedia = mashup.currentAnnotation.getMedia();
-        
         project.getMedias().forEach(function(_media) {
             if (_media !== mashup.currentMedia) {
                 _media.hide();
@@ -2058,7 +2057,7 @@
         });
         
         project.on("set-current", function(_m) {
-            if (_m !== media) {
+            if (_m !== media && (_m !== mashup || mashup.currentMedia !== media)) {
                 media.hide();
             }
         });
@@ -2641,7 +2640,6 @@
             }
             $(".add-segment").val(IriSP.translate(addMode ? "Add segment to hashcut" : "Save segment"));
             $(".create-or-edit").text(IriSP.translate(addMode ? "Create new segment" : "Edit existing segment"));
-            media.show();
             $("#segment-title").val(currentSegment.title);
             $("#segment-description").val(currentSegment.description);
             var segment_tags = $("#segment-tags");
@@ -2860,7 +2858,13 @@
         project.trigger("mouseout-annotation");
     })
     .on("click", ".item-video", function() {
-        project.trigger("click-annotation", project.getElement($(this).attr("data-segment-id")));
+        var segment = project.getElement($(this).attr("data-segment-id"));
+        if (currentMedia === mashup) {
+            project.trigger("click-annotation", segment);
+        } else {
+            currentSegment = segment;
+            setMedia(segment.getMedia());
+        }
     })
     .on("click", ".edit", function(e) {
         var currentItem = $(this).parents(".item-video"),
@@ -3089,7 +3093,7 @@
         postproject.addList("annotation",annotations);
         postproject.addList("media",medias);
         postproject.addList("mashup",[mashup]);
-        postproject.creator = "admin";
+        postproject.creator = options.creator;
         postproject.created = new Date();
         postproject.modified = new Date();
         postproject.title = mashup.title;
@@ -3099,7 +3103,9 @@
             url: IriSP.endpoints.project,
             data: IriSP.serializers.ldt.serialize(postproject),
             contentType: "application/cinelab",
-//            headers: {"X-CSRFToken": "{{csrf_token}}"},
+            headers: {
+                "X-CSRFToken": options.csrf_token
+            },
             success: function(data, status, request){
                 var location = request.getResponseHeader("Location"),
                     projid = location.match(/([^/]+)\/?$/)[1],