Move the header title of the annotationList box and LatestAnnotation Box, inside the widget
authorjulien <julien@erret.com>
Fri, 31 Jul 2015 18:33:02 +0200
changeset 67 6e041b15bc78
parent 66 4209729fcaf6
child 68 5002976e742d
Move the header title of the annotationList box and LatestAnnotation Box, inside the widget
server/src/remie/static/remie/metadataplayer/AnnotationsList.js
server/src/remie/static/remie/metadataplayer/LatestAnnotation.js
server/src/remie/templates/remie/iframe.html
--- a/server/src/remie/static/remie/metadataplayer/AnnotationsList.js	Thu Jul 30 18:41:04 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/AnnotationsList.js	Fri Jul 31 18:33:02 2015 +0200
@@ -72,17 +72,20 @@
     en: {
         voice_annotation: "Voice Annotation",
         now_playing: "Now playing...",
-        everyone: "Everyone"
+        everyone: "Everyone",
+        header: "My contributions"
     },
     fr: {
         voice_annotation: "Annotation Vocale",
         now_playing: "Lecture en cours...",
-        everyone: "Tous"
+        everyone: "Tous",
+        header: "Mes contributions"
     }
 };
 
 IriSP.Widgets.AnnotationsList.prototype.template =
-    '<div class="Ldt-AnnotationsListWidget">'
+    "<p class='Ldt-AnnotationsList-header'>{{l10n.header}}</p>"
+    + '<div class="Ldt-AnnotationsListWidget">'
     + '{{#show_filters}}'
     + '<div class="Ldt-AnnotationsList-Filters">'
     +    '<input class="Ldt-AnnotationsList-filter-text" id="Ldt-AnnotationsList-keywordsFilter" type="text" value=""></input>'
@@ -426,16 +429,20 @@
 };
 
 IriSP.Widgets.AnnotationsList.prototype.hide = function() {
+    var _this = this;
     if (this.visible){
         this.visible = false;
-        this.widget_$.slideUp()
+        this.widget_$.slideUp(function(){
+            _this.$.find('.Ldt-AnnotationsList-header').hide();            
+        });
     }
 }
 
 IriSP.Widgets.AnnotationsList.prototype.show = function() {
     if(!this.visible){
         this.visible = true;
-        this.widget_$.slideDown()
+        this.$.find('.Ldt-AnnotationsList-header').show();
+        this.widget_$.slideDown();
     }
 }
 
--- a/server/src/remie/static/remie/metadataplayer/LatestAnnotation.js	Thu Jul 30 18:41:04 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/LatestAnnotation.js	Fri Jul 31 18:33:02 2015 +0200
@@ -31,16 +31,19 @@
 IriSP.Widgets.LatestAnnotation.prototype.messages = {
     fr : {
         copy_and_edit: "Copier et Editer",
-        empty : "Aucune annotation à afficher"
+        empty : "Aucune annotation à afficher",
+        header: "Ma dernière contribution"
     },
     en: {
         copy_and_edit: "Copy and Edit",
-        empty: "No annotation to display"
+        empty: "No annotation to display",
+        header: "My last contribution"
     }
 }
 
 IriSP.Widgets.LatestAnnotation.prototype.template = 
-    "<div class='Ldt-LatestAnnotation'>"
+    "<p class='Ldt-LatestAnnotation-header'>{{l10n.header}}</p>"
+    + "<div class='Ldt-LatestAnnotation'>"
     + "</div>";
 
 IriSP.Widgets.LatestAnnotation.prototype.annotationTemplate =
@@ -190,6 +193,7 @@
 IriSP.Widgets.LatestAnnotation.prototype.hide = function() {
     if (this.visible){
         this.visible = false;
+        this.$.find('.Ldt-LatestAnnotation-header').hide();
         this.annotationContainer_$.hide()
     }
 }
@@ -197,6 +201,7 @@
 IriSP.Widgets.LatestAnnotation.prototype.show = function() {
     if(!this.visible){
         this.visible = true;
+        this.$.find('.Ldt-LatestAnnotation-header').show();
         this.annotationContainer_$.show()
     }
 }
--- a/server/src/remie/templates/remie/iframe.html	Thu Jul 30 18:41:04 2015 +0200
+++ b/server/src/remie/templates/remie/iframe.html	Fri Jul 31 18:33:02 2015 +0200
@@ -12,11 +12,9 @@
   </div>
   <div id="info_panel">
     <div id="CurrentSegmentInfobox_container"></div>
-    <p>Ma dernière contribution</p>
     <div id="LatestAnnotation_container"></div>
     <div id="AnnotationsController_container"></div>
     <div id="CreateAnnotation_container"></div>
-    <p>Mes dernières contributions</p>
     <div id="AnnotationsList_container"></div>
   </div>
   <script type="text/javascript" src='{% static "remie/metadataplayer/LdtPlayer-core.js" %}'></script>