]> git.parisson.com Git - telemeta.git/commitdiff
done player link
authorriccardo <riccardo@parisson.com>
Wed, 22 Jun 2011 14:20:33 +0000 (16:20 +0200)
committerriccardo <riccardo@parisson.com>
Wed, 22 Jun 2011 14:20:33 +0000 (16:20 +0200)
telemeta/htdocs/timeside/js/rulermarker.js
telemeta/templates/telemeta_default/mediaitem_detail.html
telemeta/templates/telemeta_default/mediaitem_player.html

index ae0cd88e5c487e5df7bd8324f0625f6a6e21af1b..5409b194d9e539ccc758078f669f81bf62858a4d 100644 (file)
@@ -237,7 +237,15 @@ Timeside.classes.RulerMarker = Timeside.classes.TimesideClass.extend({
     //
     createCanvasPath: function(x,w){
         var halfW = w >>> 1;
-        var h = this.$J(window).height();
+        //in order to calculate the line height, we could simply set the wave height. However, due to potential
+        //resizing afterwards, the line could not stretch till the bottom (if it overflows it's fine, as the wave div container has 
+        //overflow = hidden). As we do not want to rebuild the canvas on resize,
+        //we assess an height which will 99% overflow the wave height in any case.
+        //We use the wave height and the window height, and take 2 times
+        //the maximum of those heights:
+        var wdwH = this.$J(window).height();
+        var waveH = this.getWaveHeight();
+        var h = 2* (wdwH > waveH ? wdwH : waveH);
         return 'M '+(x-halfW)+' 0 L '+(x)+' '+(halfW)+' L '+x+' '+h+
         ' L '+ (x+1)+' '+h+' L '+(x+1)+ ' '+(halfW)+' L '+(x+halfW+1)+' 0 z';
     },
index 822f7e26174d3425e95cab31c6c53736d3b058fa..412f80a32b412a275948dc30ec4382a535f32c57 100644 (file)
 </div> <!-- with-rightcol -->
 {% if user.is_authenticated and perms.telemeta.delete_mediaitem %}
 <div style="float: right;">
- <a href="{% url telemeta-item-delete item.public_id %}" class="component_icon button icon_delete">{% trans "Delete" %}</a>
+ <a href="#" onclick="if(confirm(gettrans('delete the marker permanently?'))){window.location.href='{% url telemeta-item-delete item.public_id %}';};return false;"  class="component_icon button icon_delete">{% trans "Delete" %}</a>
 </div>
 {% endif %}
 {% endblock %}
index 214dc4b1094ab175f450dd658e424a1be9a6dbfb..8bcaecd6e731c6823c6e8eafc0c48220062ea5c4 100644 (file)
@@ -2,7 +2,19 @@
 {% load telemeta_utils %}
 {% load i18n %}
 
-{% block header %}{% endblock %}
+
+{% block stylesheets %}
+{{ block.super }}
+    <style type="text/css">
+        #rightcol {
+            width: {{width}}px;
+        }
+        .ts-skin-lab .ts-player .ts-wave {
+            height: {{height}}px;
+        }
+    </style>
+{% endblock %}
+
 {% block title %}{% endblock %}
 {% block title_buttons %}{% endblock %}
 
@@ -26,8 +38,6 @@
 {% endif %}
 </div>
 
-width : {{ width }}, height : {{ height }}
-
 {% endblock content%}
 {% endblock layout %}