Merge with 111a1333513a24f720249c59259d07b7e5401efa
authorrougeronj
Thu, 10 Sep 2015 14:49:04 +0200
changeset 110 d731c2917e76
parent 109 64a524142a7b (current diff)
parent 107 111a1333513a (diff)
child 111 61e2c48cf694
Merge with 111a1333513a24f720249c59259d07b7e5401efa
--- a/.hgtags	Thu Sep 10 14:47:32 2015 +0200
+++ b/.hgtags	Thu Sep 10 14:49:04 2015 +0200
@@ -21,3 +21,4 @@
 a96af8e8f660cc35f06c695e7548b440cb0daf6f 00.00.13
 935a4dd6bb0920b0223a950f0f2d8391147774a5 00.00.14
 a8d024370080f4e9d74172d63813fde5e67fd6dd 00.00.15
+294fdb24a1e288689a67804d36f2e1cad0835eba 00.00.16
--- a/server/src/remie/static/remie/css/markers.css	Thu Sep 10 14:47:32 2015 +0200
+++ b/server/src/remie/static/remie/css/markers.css	Thu Sep 10 14:49:04 2015 +0200
@@ -164,6 +164,7 @@
     background-color: #1abacc;
     border-color: #1abacc;
     font-weight: bold;
+    overflow: hidden;
 }
 .Ldt-Markers-Screen.Ldt-Markers-ScreenMain .Ldt-Markers-RoundButton.Ldt-Markers-Delete{
     font-size: 80px;
--- a/server/src/remie/static/remie/metadataplayer/CurrentSegmentInfobox.js	Thu Sep 10 14:47:32 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/CurrentSegmentInfobox.js	Thu Sep 10 14:49:04 2015 +0200
@@ -255,6 +255,7 @@
             if(_this.editable_segments&&_this.currentSegment){
                 _this.$.find(".Ldt-CurrentSegmentInfobox").click(_this.functionWrapper("enableEditMode"));             
             }
+            _this.$.toggleClass("editing", false);
             _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
         },
         error: function(_xhr, _error, _thrown) {
--- a/server/src/remie/static/remie/metadataplayer/Markers.js	Thu Sep 10 14:47:32 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Markers.js	Thu Sep 10 14:49:04 2015 +0200
@@ -168,6 +168,7 @@
 }
 
 IriSP.Widgets.Markers.prototype.sendDelete = function(){
+    _this = this;
     _url = Mustache.to_html(this.api_endpoint_template_delete, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
     IriSP.jQuery.ajax({
         url: _url,
@@ -175,27 +176,19 @@
         contentType: 'application/json',
         success: function(_data) {
             _this.showScreen('DeleteSuccess'); /* Si l'appel a fonctionné, on affiche l'écran "Annotation enregistrée" */
-            window.setTimeout(function(){
-                _this.showScreen("Main");
-                _this.cancelEdit();
-            },
-            (_this.after_send_timeout || 5000));
+            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
             if (_this.pause_on_write && _this.media.getPaused()) {
                 _this.media.play();
             }
             _this.markers.removeElement(_this.selectedMarker);
             _this.selectedMarker = false
-            _this.cancelEdit();
             _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
             _this.player.trigger("Markers.refresh");
         },
         error: function(_xhr, _error, _thrown) {
             IriSP.log("Error when sending annotation", _thrown);
             _this.showScreen('Failure');
-            window.setTimeout(function(){
-                _this.showScreen("Main");
-            },
-            (_this.after_send_timeout || 5000));
+            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
         }
     });
     this.showScreen("Sending")
@@ -272,6 +265,13 @@
         .siblings().hide();
 }
 
+IriSP.Widgets.Markers.prototype.revertToMainScreen = function(){
+    if (this.$.find(".Ldt-Markers-ScreenMain").is(":hidden")){
+        this.showScreen("Main");
+        this.cancelEdit();
+    }
+}
+
 IriSP.Widgets.Markers.prototype.drawMarkers = function(){
     this.$.remove("Ldt-Markers-Marker");
     this.$.find(".Ldt-Markers-List").html("")
@@ -424,11 +424,7 @@
         data: _export.serialize(), /* L'objet Source est sérialisé */
         success: function(_data) {
             _this.showScreen('Success'); /* Si l'appel a fonctionné, on affiche l'écran "Annotation enregistrée" */
-            window.setTimeout(function(){
-                _this.showScreen("Main");
-                _this.cancelEdit();
-            },
-            (_this.after_send_timeout || 5000));
+            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
             _export.getAnnotations().removeElement(_annotation, true); /* Pour éviter les doublons, on supprime l'annotation qui a été envoyée */
             _export.deSerialize(_data); /* On désérialise les données reçues pour les réinjecter */
             _annotation.id = _data.id;
@@ -438,7 +434,6 @@
             }
             _this.markers.push(_annotation);
             _this.selectedMarker = _annotation;
-            _this.cancelEdit();
             _this.drawMarkers();
             _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
             _this.player.trigger("Markers.refresh");
@@ -447,10 +442,7 @@
             IriSP.log("Error when sending annotation", _thrown);
             _export.getAnnotations().removeElement(_annotation, true);
             _this.showScreen('Failure');
-            window.setTimeout(function(){
-                _this.showScreen("Main");
-            },
-            (_this.after_send_timeout || 5000));
+            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
         }
     });
     this.showScreen('Sending');
--- a/server/src/remieplt/__init__.py	Thu Sep 10 14:47:32 2015 +0200
+++ b/server/src/remieplt/__init__.py	Thu Sep 10 14:49:04 2015 +0200
@@ -1,4 +1,4 @@
-VERSION = (0, 0, 15, "final", 0)
+VERSION = (0, 0, 16, "final", 0)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
 
--- a/server/src/requirement.txt	Thu Sep 10 14:47:32 2015 +0200
+++ b/server/src/requirement.txt	Thu Sep 10 14:49:04 2015 +0200
@@ -1,1 +1,1 @@
-ldt (==1.58.2)
+ldt (==1.59)