--- a/integration/home.html Mon Dec 03 13:06:28 2012 +0100
+++ b/integration/home.html Mon Dec 03 13:57:52 2012 +0100
@@ -213,11 +213,10 @@
/* IF NOT CONNECTED */
$(function() {
$("a[href='edition.html']").click(function() {
- console.log("Arghl");
- $(".user.login").show();
+ $("#user").show();
return false;
});
- })
+ });
/* END IF */
</script>
--- a/integration/js/editor.js Mon Dec 03 13:06:28 2012 +0100
+++ b/integration/js/editor.js Mon Dec 03 13:57:52 2012 +0100
@@ -45,6 +45,7 @@
'<div class="media-found-list" style="height: <%= height %>px"><div class="media-segment-list-inner"></div><%= segments %></div>'
),
mashupstatus = '',
+ mediasegmentscache = {},
addMode, currentMedia, currentSegment;
IriSP.mashupcore(project, mashup);
@@ -127,7 +128,9 @@
serializer: IriSP.serializers.segmentapi
}).onLoad(function() {
var medias = this.getMedias(),
- annotations = this.getAnnotations();
+ annotations = this.getAnnotations().filter(function(annotation) {
+ return annotation.getDuration() > 0;
+ });;
if (medias && medias.length) {
var mediaid = medias[0].id;
el = $(".item-video[data-media-id='" + mediaid + "'] .media-count");
@@ -352,8 +355,6 @@
}
}
- var mediasegmentscache = {};
-
function setMedia(media) {
if (currentMedia) {
currentMedia.pause();
--- a/src/hashcut/static/hashcut/js/hashcut.js Mon Dec 03 13:06:28 2012 +0100
+++ b/src/hashcut/static/hashcut/js/hashcut.js Mon Dec 03 13:57:52 2012 +0100
@@ -2276,6 +2276,7 @@
'<div class="media-found-list" style="height: <%= height %>px"><div class="media-segment-list-inner"></div><%= segments %></div>'
),
mashupstatus = '',
+ mediasegmentscache = {},
addMode, currentMedia, currentSegment;
IriSP.mashupcore(project, mashup);
@@ -2358,7 +2359,9 @@
serializer: IriSP.serializers.segmentapi
}).onLoad(function() {
var medias = this.getMedias(),
- annotations = this.getAnnotations();
+ annotations = this.getAnnotations().filter(function(annotation) {
+ return annotation.getDuration() > 0;
+ });;
if (medias && medias.length) {
var mediaid = medias[0].id;
el = $(".item-video[data-media-id='" + mediaid + "'] .media-count");
@@ -2583,8 +2586,6 @@
}
}
- var mediasegmentscache = {};
-
function setMedia(media) {
if (currentMedia) {
currentMedia.pause();
--- a/src/hashcut/templates/mashup_home.html Mon Dec 03 13:06:28 2012 +0100
+++ b/src/hashcut/templates/mashup_home.html Mon Dec 03 13:57:52 2012 +0100
@@ -97,7 +97,7 @@
<h2>Comment faire ?</h2>
<ul>
<li class="inscription">
- <h3><a href="#user">1. S’inscrire</a></h3>
+ <h3><a class="open-popin" href="#user">1. S’inscrire</a></h3>
<p>Commencez par créer votre espace personnel sur cette plateforme !</p>
</li>
<li class="next-step"></li>
@@ -139,6 +139,18 @@
<script type="text/javascript" src="{% static 'hashcut/js/common.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/js/social.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/lib/ZeroClipboard.js' %}"></script>
+{% if not user.is_authenticated %}
+<script type="text/javascript">
+/* Forbid access to edit page if not connected */
+$(function() {
+ $("a[href='{% url mashup_edit branding=branding %}']").click(function() {
+ $("#user").show();
+ return false;
+ });
+});
+
+</script>
+{% endif %}
{% endblock %}
{% endblock %}
{% analytics %}