Removed Duration while we don't have it
authorveltr
Tue, 04 Dec 2012 13:31:01 +0100
changeset 97 213e81430f7a
parent 96 c16dbaa98389
child 98 9c9d78982380
child 104 1b84c7b2aeee
Removed Duration while we don't have it
integration/js/editor.js
src/hashcut/templates/mashup_all_mashups.html
src/hashcut/templates/mashup_home.html
src/hashcut/templates/mashup_profile.html
--- a/integration/js/editor.js	Mon Dec 03 16:00:01 2012 +0100
+++ b/integration/js/editor.js	Tue Dec 04 13:31:01 2012 +0100
@@ -46,7 +46,9 @@
         ),
         mashupstatus = '',
         mediasegmentscache = {},
-        addMode, currentMedia, currentSegment;
+        mashupModeAfterSave = false,
+        addMode = false,
+        currentMedia, currentSegment;
         
     IriSP.mashupcore(project, mashup);
     
@@ -521,10 +523,14 @@
             mashup.trigger("change");
             var segment = mashup.getAnnotation(currentSegment);
             currentSegment = undefined;
-            setMedia(mashup);
-            if (segment) {
-                mashup.setCurrentTime(segment.begin);
-                mashup.trigger("enter-annotation",segment);
+            if (mashupModeAfterSave) {
+                setMedia(mashup);
+                if (segment) {
+                    mashup.setCurrentTime(segment.begin);
+                    mashup.trigger("enter-annotation",segment);
+                }
+            } else {
+                
             }
         }
         return false;
@@ -626,6 +632,7 @@
         var currentItem = $(this).parents(".item-video"),
             media = project.getElement(currentItem.attr("data-media-id")),
             segment = project.getElement(currentItem.attr("data-segment-id"));
+        mashupModeAfterSave = !!(currentMedia === mashup);
         currentSegment = segment;
         setMedia(media);
         return false;
@@ -731,6 +738,7 @@
     
     $(".mashup-description .edit").click(function() {
         if (mashup.currentAnnotation) {
+            mashupModeAfterSave = !!(currentMedia === mashup);
             currentSegment = mashup.currentAnnotation.annotation;
             setMedia(mashup.currentAnnotation.getMedia());
         }
--- a/src/hashcut/templates/mashup_all_mashups.html	Mon Dec 03 16:00:01 2012 +0100
+++ b/src/hashcut/templates/mashup_all_mashups.html	Tue Dec 04 13:31:01 2012 +0100
@@ -53,7 +53,7 @@
         {% for m in results.object_list %}
         <div class="video-item">
             <a href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %}&nbsp;{% endthumbnail %}</a>
-            <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par {{ m.creator }} | <span class="duration">02:24</span> </h3>
+            <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m.creator %}">{{ m.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
         </div>
         {% endfor %}
     </div>
--- a/src/hashcut/templates/mashup_home.html	Mon Dec 03 16:00:01 2012 +0100
+++ b/src/hashcut/templates/mashup_home.html	Tue Dec 04 13:31:01 2012 +0100
@@ -61,13 +61,13 @@
                     <div class="video-item">
                         {% if m1 %}
                         <a href="{% url mashup_hashcut branding=branding ldt_id=m1.project.ldt_id %}" class="screenshot">{% thumbnail m1.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %}&nbsp;{% endthumbnail %}</a>
-                        <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m1.project.ldt_id %}">{{ m1.project.title }}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m1.creator %}">{{ m1.creator }}</a> | <span class="duration">02:24</span> </h3>
+                        <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m1.project.ldt_id %}">{{ m1.project.title }}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m1.creator %}">{{ m1.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
                         {% endif %}
                     </div>
                     <div class="video-item">
                         {% if m2 %}
                         <a href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}" class="screenshot">{% thumbnail m2.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %}&nbsp;{% endthumbnail %}</a>
-                        <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}">{{ m2.project.title }}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m2.creator %}">{{ m2.creator }}</a> | <span class="duration">02:24</span> </h3>
+                        <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}">{{ m2.project.title }}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m2.creator %}">{{ m2.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
                         {% endif %}
                     </div>
                 </div>
@@ -77,7 +77,7 @@
                     {% for m in mashups %}
                     <div class="video-item">
                         <a href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "142x95" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %}&nbsp;{% endthumbnail %}</a>
-                        <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m.creator %}">{{ m.creator }}</a> | <span class="duration">02:24</span> </h3>
+                        <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m.creator %}">{{ m.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
                     </div>
                     {% endfor %}
                 </div>
--- a/src/hashcut/templates/mashup_profile.html	Mon Dec 03 16:00:01 2012 +0100
+++ b/src/hashcut/templates/mashup_profile.html	Tue Dec 04 13:31:01 2012 +0100
@@ -39,7 +39,7 @@
         {% for m in mashups %}
         <div class="video-item">
             <a href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %}&nbsp;{% endthumbnail %}</a>
-            <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par {{ m.creator }} | <span class="duration">02:24</span> </h3>
+            <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a><!-- | <span class="duration">02:24</span> --></h3>
         </div>
         {% endfor %}
     </div>