diff -r 539c9bee5372 -r 7623f9af9272 src/widgets/CreateAnnotation.js --- a/src/widgets/CreateAnnotation.js Fri Sep 25 14:45:38 2015 +0200 +++ b/src/widgets/CreateAnnotation.js Fri Oct 02 11:27:17 2015 +0200 @@ -2,6 +2,13 @@ IriSP.Widgets.CreateAnnotation = function(player, config) { IriSP.Widgets.Widget.call(this, player, config); + if (_this.editable_storage != '' && window.localStorage[_this.editable_storage]) { + this.source.onLoad(function () { + var _export = _this.player.sourceManager.newLocalSource({serializer: IriSP.serializers['ldt_localstorage']}); + _export.deSerialize(window.localStorage[_this.editable_storage]); + _this.source.merge(_export); + }); + }; }; IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget(); @@ -48,6 +55,8 @@ api_serializer: "ldt_annotate", api_endpoint_template: "", api_method: "POST", + // Id that will be used as localStorage key + editable_storage: "", project_id: "", after_send_timeout: 0, close_after_send: false, @@ -69,9 +78,9 @@ add_keywords_: "Add keywords:", add_polemic_keywords_: "Add polemic attributes :", your_name_: "Your name:", - annotate_video: "Annotate this video", + annotate_video: "New note", type_title: "Annotation title", - type_description: "Type the full contents of your annotation here.", + type_description: "Enter a new note...", wait_while_processing: "Please wait while your annotation is being processed...", error_while_contacting: "An error happened while contacting the server. Your annotation has not been saved.", annotation_saved: "Thank you, your annotation has been saved.", @@ -80,7 +89,10 @@ "polemic++": "Agree", "polemic--": "Disagree", "polemic??": "Question", - "polemic==": "Reference" + "polemic==": "Reference", + "in_tooltip": "Set begin time to current player time", + "out_tooltip": "Set begin time to current player time", + "play_tooltip": "Play the fragment" }, fr: { from_time: "de", @@ -92,9 +104,9 @@ add_keywords_: "Ajouter des mots-clés\u00a0:", add_polemic_keywords_: "Ajouter des attributs polémiques\u00a0:", your_name_: "Votre nom\u00a0:", - annotate_video: "Annoter cette vidéo", + annotate_video: "Entrez une nouvelle note...", type_title: "Titre de l'annotation", - type_description: "Rédigez ici le contenu de votre annotation.", + type_description: "Prenez vos notes...", wait_while_processing: "Veuillez patienter pendant le traitement de votre annotation...", error_while_contacting: "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée.", annotation_saved: "Merci, votre annotation a été enregistrée.", @@ -103,12 +115,15 @@ "polemic++": "Accord", "polemic--": "Désaccord", "polemic??": "Question", - "polemic==": "Référence" + "polemic==": "Référence", + "in_tooltip": "Utiliser le temps courant comme début", + "out_tooltip": "Utiliser le temps courant comme fin", + "play_tooltip": "Jouer le fragment" } }; IriSP.Widgets.CreateAnnotation.prototype.template = - '{{#show_slice}}
{{/show_slice}}' + '{{#show_slice}}{{/show_slice}}' + '{{^show_slice}}{{#show_arrow}}{{/show_arrow}}{{/show_slice}}' + '