--- a/.hgtags Tue Sep 08 10:31:21 2015 +0200
+++ b/.hgtags Tue Sep 08 10:42:01 2015 +0200
@@ -18,3 +18,6 @@
80abd18d84d10ddb786473f20aaae58498795b80 00.00.10
530ddc8219562878681895aa1cb6ee1a95c4aa48 00.00.11
975c6a1fa0b8a9d75bb1e309a1473703743311af 00.00.12
+a96af8e8f660cc35f06c695e7548b440cb0daf6f 00.00.13
+935a4dd6bb0920b0223a950f0f2d8391147774a5 00.00.14
+a8d024370080f4e9d74172d63813fde5e67fd6dd 00.00.15
--- a/authserver/testCAS/app/Http/Controllers/HomeController.php Tue Sep 08 10:31:21 2015 +0200
+++ b/authserver/testCAS/app/Http/Controllers/HomeController.php Tue Sep 08 10:42:01 2015 +0200
@@ -35,7 +35,7 @@
{
$pt="Error getting PT";
$pt=phpCAS::retrievePT(env("LDT_URL")."/remie/workunit/segments_single?project_id=".env("TEST_PROJECT_ID"), $err_code, $err_msg);
- $iframe_url=env("LDT_URL")."/remie/workunit/segments_single?project_id=".env("TEST_PROJECT_ID")."&casticket=".$pt;
+ $iframe_url=env("LDT_URL")."/remie/workunit/segments_single?project_id=".env("TEST_PROJECT_ID");
$loginUrl=env("LDT_URL")."/accounts/cas/login";
--- a/server/README.md Tue Sep 08 10:31:21 2015 +0200
+++ b/server/README.md Tue Sep 08 10:42:01 2015 +0200
@@ -3,37 +3,42 @@
Pour générer une vue de scénario, il suffit d'appeler les url suivantes en source d'une iframe. Les url contiennent :
* un identifiant de projet d’annotation (voir ci-dessus pour récupérer manuellement l’identifiant d’un projet)
-* un ticket d’authentification CAS
### Scénario élève/annotation de segment en mode individuel
https://appiri.enteduc.fr/remie/remie/workunit/segments_single?project_id=<:id>&casticket=<:ticket>
* <:id> est l'id du projet considéré
-* <:ticket> est le ticket d'authentification CAS
### Scénario élève/annotation de segment en mode groupe
https://appiri.enteduc.fr/remie/remie/workunit/segments_group?project_id=<:id>&group_mode=true&casticket=<:ticket>
* <:id> est l'id du projet considéré
-* <:ticket> est le ticket d'authentification CAS
-Note: Le nom du paramètre du ticket CAS (par défaut “casticket”) est configurable de notre côté, si jamais il ne respecte pas les conventions de nommage d’Itop.
### Scénario professeur
-(à implémenter)
+
+ https://appiri.enteduc.fr/remie/remie/workunit/segments_teacher?project_id=<:id>
+
+* <:id> est l'id du projet considéré
### Scénario “marqueurs”
-(à implémenter)
+
+ https://appiri.enteduc.fr/remie/remie/workunit/markers?project_id=<:id>
+
+* <:id> est l'id du projet considéré
+
# Dupliquer un projet existant lors de l’instanciation d’un grain:
Un endpoint de l’API permet de dupliquer un projet existant. Pour cela il faut faire une requête POST à l’adresse suivante:
- https://appiri.enteduc.fr/remie/api/ldt/1.0/projects?format=json&source=<:project_id>&publish=true&casticket=<:ticket>
+ https://appiri.enteduc.fr/remie/api/ldt/1.0/projects?format=json&source=<:project_id>&publish=true&username=<:username>&api_key=<:api_key>
-* <:ticket> est le ticket d'authentification CAS
* <:project_id>: L’id du projet que l’on souhaite dupliquer
+* <:username>: L’id de l’utilisateur qui sera affecté comme “créateur” du projet (à priori admin, expliqué plus bas)
+* <:api_key>: La clé d’API qui permettra d’authentifier l’utilisateur (expliqué plus bas)
+
La requête POST doit être accompagnée de données sous la forme d’une chaîne de caractère de type json, selon le format suivant:
@@ -60,4 +65,9 @@
* <:title>: Le titre que prendra la copie du projet dupliqué (optionnel, prendra le même titre que le projet initial si non-renseigné)
* <:description> : La description que prendea la copie du projet dupliqué (optionnelle, prendra le même titre que le projet initial si non-renseigné)
-Dans la réponse à cette requête POST, le header “Location” contient l’URL à requêter (GET) pour obtenir les informations sur le projet créé. Il est possible d’en extraire l’id du projet afin de générer les scénario.
+Username et API key:
+Pour authentifier l’utilisateur afin de dupliquer le projet, il faut joindre à la requête les paramètres “username” et “api_key” comme indiqué plus haut. username est l’utilisateur qui possèdera le projet (à priori l’admin, le même utilisateur que celui qui aura créé les projets initiaux).
+L’API key peut être obtenue sur la plateforme en étant authentifié en tant qu’utilisateur admin.
+
+Il faut aller sur l’interface admin dont le lien se trouve en haut à droite de l’écran, menu Tastypie -> Api Keys pour obtenir la liste des utilisateurs et leurs clés d'API associées.
+
--- a/server/src/remie/static/remie/metadataplayer/Markers.css Tue Sep 08 10:31:21 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Markers.css Tue Sep 08 10:42:01 2015 +0200
@@ -33,7 +33,7 @@
margin-top: 1px;
}
-.Ldt-Markers-Create{
+.Ldt-Markers-RoundButton{
display: inline-block;
background-color: #d93c71;
color: #ffffff;
@@ -41,7 +41,7 @@
height: 20px;
width: 20px;
border-radius: 20px;
- font-size: 25;
+ font-size: 25px;
font-style: bold;
border: 1px solid;
border-color: #eca3bc #631e34 #36101c #e16e93;
@@ -68,7 +68,8 @@
margin: 0px;
}
-.Ldt-Markers-ScreenSending, .Ldt-Markers-ScreenFailure, .Ldt-Markers-ScreenSuccess{
+.Ldt-Markers-ScreenSending, .Ldt-Markers-ScreenFailure, .Ldt-Markers-ScreenSuccess,
+.Ldt-Markers-ScreenConfirmDelete, .Ldt-Markers-ScreenDeleteSuccess{
text-align: center;
vertical-align: middle;
line-height: 125px;
@@ -90,6 +91,15 @@
background: url(img/widget-control.png);
}
+a.Ldt-Markers-Screen-SubmitDelete, a.Ldt-Markers-Screen-CancelDelete {
+ color: #3366BB;
+ cursor: pointer;
+}
+
+a.Ldt-Markers-Screen-SubmitDelete:hover, a.Ldt-Markers-Screen-CancelDelete:hover {
+ color: #3a75ff;
+}
+
.Ldt-Markers-MarkerDescription{
height: 45%;
width: 90%;
@@ -149,7 +159,7 @@
vertical-align: top;
}
-.Ldt-Markers-Create:hover, .Ldt-Markers-MarkerSend:hover, .Ldt-Markers-MarkerCancel:hover{
+.Ldt-Markers-RoundButton:hover, .Ldt-Markers-MarkerSend:hover, .Ldt-Markers-MarkerCancel:hover{
background-color: #e15581;
border-color: #222222 #e87d9f #f0adc3 #68273c;
}
\ No newline at end of file
--- a/server/src/remie/static/remie/metadataplayer/Markers.js Tue Sep 08 10:31:21 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Markers.js Tue Sep 08 10:42:01 2015 +0200
@@ -15,9 +15,12 @@
ball_radius: 4,
pause_on_write: true,
api_serializer: "ldt_annotate",
- api_endpoint_template: "",
+ api_endpoint_template_create: "",
+ api_endpoint_template_edit: "",
+ api_endpoint_template_delete: "",
api_method_create: "POST",
- api_method_editing: "PUT",
+ api_method_edit: "PUT",
+ api_method_delete: "DELETE",
project_id: "",
creator_name: "",
after_send_timeout: 0,
@@ -31,7 +34,8 @@
+ '</div>'
+ '<div class="Ldt-Markers-Inputs">'
+ '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenMain">'
- + '<div class="Ldt-Markers-Create">+</div>'
+ + '<div class="Ldt-Markers-RoundButton Ldt-Markers-Create">+</div>'
+ + '<div class="Ldt-Markers-RoundButton Ldt-Markers-Delete">-</div>'
+ '<div class="Ldt-Markers-Info"></div>'
+ '</div>'
+ '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenSending">'
@@ -41,10 +45,22 @@
+ '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'
+ '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.annotation_saved}}</div>'
+ '</div>'
+ + '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenDeleteSuccess">'
+ + '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'
+ + '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.delete_saved}}</div>'
+ + '</div>'
+ '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenFailure">'
+ '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'
+ '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.error_while_contacting}}</div>'
+ '</div>'
+ + '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenConfirmDelete">'
+ + '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'
+ + '<div class="Ldt-Markers-Screen-InnerBox">'
+ + '{{l10n.delete_text}} '
+ + '<a class="Ldt-Markers-Screen-SubmitDelete">{{l10n.submit_delete}}</a> '
+ + '<a class="Ldt-Markers-Screen-CancelDelete">{{l10n.cancel}}</a>'
+ + '</div>'
+ + '</div>'
+ '</div>';
@@ -66,18 +82,24 @@
IriSP.Widgets.Markers.prototype.messages = {
en : {
send : "Send",
+ submit_delete: "Delete",
cancel : "Cancel",
wait_while_processing: "Please wait while your annotation is being processed...",
+ delete_text: "The selected marker will be deleted. Continue?",
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.",
+ delete_saved: "Thank you, your annotation has been deleted",
close_widget: "Close",
},
fr : {
send : "Envoyer",
+ submit_delete: "Supprimer",
cancel : "Annuler",
wait_while_processing: "Veuillez patienter pendant le traitement de votre annotation...",
+ delete_text: "Le marqueur sélectionné sera supprimé. Continuer?",
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.",
+ delete_saved: "Merci, votre annotation a été supprimée",
close_widget: "Fermer",
}
}
@@ -92,21 +114,13 @@
});
this.drawMarkers();
- this.$.find(".Ldt-Markers-Create").click(function(){
- if (!_this.selectedMarker){
- _this.toggleCreateMarker();
- }
- else {
- _this.selectedMarker = false;
- _this.$.find(".Ldt-Markers-Info").html("");
- _this.$.find(".Ldt-Markers-MarkerBall").css("background-color", _this.marker_color)
- _this.$.find(".Ldt-Markers-Create").html("+");
- }
- })
- this.$.find(".Ldt-Markers-Info").click(function(){
- if (_this.selectedMarker&&!_this.editing){
- _this.toggleCreateMarker();
- }
+ this.$.find(".Ldt-Markers-Create").click(this.functionWrapper("onCreateClick"));
+ this.$.find(".Ldt-Markers-Delete").hide();
+ this.$.find(".Ldt-Markers-Delete").click(this.functionWrapper("onDeleteClick"));
+ this.$.find(".Ldt-Markers-Screen-SubmitDelete").click(this.functionWrapper("sendDelete"));
+ this.$.find(".Ldt-Markers-Screen-CancelDelete").click(function(){
+ _this.showScreen("Main");
+ _this.cancelEdit();
})
this.showScreen("Main");
this.$.css({
@@ -117,12 +131,12 @@
this.$.find(".Ldt-Markers-Close").click(function() {
_this.showScreen("Main");
+ _this.cancelEdit();
});
this.onMediaEvent("timeupdate", "updatePosition");
this.onMdpEvent("Markers.refresh", this.functionWrapper("drawMarkers"));
- this.editing = false;
this.selectedMarker = false;
}
@@ -134,47 +148,105 @@
});
};
+IriSP.Widgets.Markers.prototype.onCreateClick = function(){
+ this.pauseOnWrite();
+ if (!this.selectedMarker){
+ this.startEdit();
+ }
+}
-IriSP.Widgets.Markers.prototype.toggleCreateMarker = function(){
- if(!this.editing){
- this.editing = true
+IriSP.Widgets.Markers.prototype.onDeleteClick = function(){
+ _this = this;
+ this.pauseOnWrite();
+ if(this.selectedMarker){
+ this.showScreen("ConfirmDelete");
}
else {
- this.editing = false
+ // Clic sur - sans marqueur sélectionné = retour à l'état initial
+ this.cancelEdit();
}
- var _divHtml = "";
- if (this.selectedMarker){
+}
+
+IriSP.Widgets.Markers.prototype.sendDelete = function(){
+ _url = Mustache.to_html(this.api_endpoint_template_delete, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
+ IriSP.jQuery.ajax({
+ url: _url,
+ type: this.api_method_delete,
+ 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));
+ 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));
+ }
+ });
+ this.showScreen("Sending")
+}
+
+IriSP.Widgets.Markers.prototype.startEdit = function(){
+ if (this.selectedMarker){
_divHtml = Mustache.to_html(this.infoTemplate, {
- edit: this.editing,
+ edit: true,
marker_info: this.selectedMarker.description,
send: this.l10n.send,
cancel: this.l10n.cancel
})
-
- this.$.find(".Ldt-Markers-Info").html(_divHtml);
- }
- else {
- if (this.editing) {
- _divHtml = Mustache.to_html(this.infoTemplate, {
- edit: this.editing,
- marker_info: "",
- send: this.l10n.send,
- cancel: this.l10n.cancel,
- })
- }
- this.$.find(".Ldt-Markers-Info").html(_divHtml);
- }
-
- if(this.editing){
- this.$.find(".Ldt-Markers-MarkerSend").click(this.functionWrapper("onSubmit"));
- this.$.find(".Ldt-Markers-MarkerCancel").click(this.functionWrapper("toggleCreateMarker"));
- this.$.find(".Ldt-Markers-MarkerTextArea").bind("change keyup input paste", this.functionWrapper("onDescriptionChange"));
- this.$.find(".Ldt-Markers-Create").html("-");
}
else {
- this.$.find(".Ldt-Markers-Create").html("+");
+ _divHtml = Mustache.to_html(this.infoTemplate, {
+ edit: true,
+ marker_info: "",
+ send: this.l10n.send,
+ cancel: this.l10n.cancel,
+ })
}
-};
+ this.$.find(".Ldt-Markers-Info").html(_divHtml);
+ this.$.find(".Ldt-Markers-MarkerSend").click(this.functionWrapper("onSubmit"));
+ this.$.find(".Ldt-Markers-MarkerCancel").click(this.functionWrapper("cancelEdit"));
+ this.$.find(".Ldt-Markers-MarkerTextArea").bind("change keyup input paste", this.functionWrapper("onDescriptionChange"));
+ this.$.find(".Ldt-Markers-Delete").show();
+ this.$.find(".Ldt-Markers-Create").hide();
+ this.editing = true;
+}
+
+IriSP.Widgets.Markers.prototype.cancelEdit = function(){
+ if (this.selectedMarker){
+ // Clic sur "cancel" pendant édition d'un marqueur = retour à l'état visualisation
+ _divHtml = Mustache.to_html(this.infoTemplate, {
+ edit: false,
+ marker_info: this.selectedMarker.description,
+ send: this.l10n.send,
+ cancel: this.l10n.cancel,
+ })
+ this.$.find(".Ldt-Markers-Info").html(_divHtml);
+ this.$.find(".Ldt-Markers-MarkerDescription").click(this.functionWrapper("startEdit"));
+ }
+ else {
+ // Clic sur "cancel" pendant la création d'un marqueur = retour à l'état initial
+ this.$.find(".Ldt-Markers-Info").html("");
+ this.$.find(".Ldt-Markers-Delete").hide();
+ this.$.find(".Ldt-Markers-Create").show();
+ }
+ this.editing = false;
+}
IriSP.Widgets.Markers.prototype.onDescriptionChange = function(){
var _field = this.$.find(".Ldt-Markers-MarkerTextArea"),
@@ -198,13 +270,11 @@
IriSP.Widgets.Markers.prototype.showScreen = function(_screenName) {
this.$.find('.Ldt-Markers-Screen' + _screenName).show()
.siblings().hide();
- if ((_screenName=="Main")&&(this.editing)){
- this.toggleCreateMarker();
- };
}
IriSP.Widgets.Markers.prototype.drawMarkers = function(){
this.$.remove("Ldt-Markers-Marker");
+ this.$.find(".Ldt-Markers-List").html("")
var _this = this,
_scale = this.width / this.source.getDuration(),
list_$ = this.$.find('.Ldt-Markers-List');
@@ -234,55 +304,42 @@
})
.click(function(){
_this.showScreen("Main");
+ _this.cancelEdit();
if (!((_this.selectedMarker)&&(_this.selectedMarker.id == _marker.id))){
- list_$.find(".Ldt-Markers-MarkerBall").css("background-color", _this.marker_color);
- _el.children().css("background-color", _this.selected_color);
+ // if there either is no marker selected or we click a different marker
+ list_$.find(".Ldt-Markers-MarkerBall").css("background-color", _this.marker_color)
list_$.find(".Ldt-Markers-MarkerBall").toggleClass("selected", false);
_el.children().toggleClass("selected", true);
+ _el.children().css("background-color", _this.selected_color)
_this.selectedMarker = _marker;
+
_divHtml = Mustache.to_html(_this.infoTemplate, {
- edit: _this.editing,
+ edit: false,
marker_info: _marker.description,
send: _this.l10n.send,
cancel: _this.l10n.cancel
})
_this.$.find(".Ldt-Markers-Info").html(_divHtml);
+ _this.$.find(".Ldt-Markers-MarkerDescription").click(_this.functionWrapper("startEdit"));
+ _this.$.find(".Ldt-Markers-Delete").show();
+ _this.$.find(".Ldt-Markers-Create").hide();
- if(_this.editing){
- _this.$.find(".Ldt-Markers-MarkerSend").click(_this.functionWrapper("onSubmit"));
- _this.$.find(".Ldt-Markers-MarkerCancel").click(_this.functionWrapper("toggleCreateMarker"));
- }
}
else {
+ // if we click the currently selected marker, we unselect it
var _divHtml = ""
- if (_this.editing){
- _divHtml = Mustache.to_html(_this.infoTemplate, {
- edit: _this.editing,
- marker_info: "",
- send: _this.l10n.send,
- cancel: _this.l10n.cancel
- });
- }
_el.children().css("background-color", _this.hover_color);
_this.selectedMarker = false;
+ list_$.find(".Ldt-Markers-MarkerBall").toggleClass("selected", false);
_this.$.find(".Ldt-Markers-Info").html(_divHtml);
+ _this.$.find(".Ldt-Markers-Create").show();
+ _this.$.find(".Ldt-Markers-Delete").hide();
- if(_this.editing){
- _this.$.find(".Ldt-Markers-MarkerSend").click(_this.functionWrapper("onSubmit"));
- _this.$.find(".Ldt-Markers-MarkerCancel").click(_this.functionWrapper("toggleCreateMarker"));
- }
- }
-
- if (_this.selectedMarker){
- _this.$.find(".Ldt-Markers-Create").html("-")
- }
- else {
- _this.$.find(".Ldt-Markers-Create").html("+")
}
if (_this.selectedMarker) {
- // If we unselect a marker we shouldn't trigger pause or time jump
+ // Only if we select a new marker do we pause video and time jump
_this.media.pause();
_marker.trigger("click");
}
@@ -291,6 +348,7 @@
})
}
+
IriSP.Widgets.Markers.prototype.onSubmit = function(){
/* Si les champs obligatoires sont vides, on annule l'envoi */
@@ -304,11 +362,11 @@
}
var _this = this,
- _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* Création d'une liste d'annotations contenant une annotation afin de l'envoyer au serveur */
- _url = Mustache.to_html(this.api_endpoint_template, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
+ _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager); /* Création d'une liste d'annotations contenant une annotation afin de l'envoyer au serveur */
if (this.selectedMarker){
var _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]})
- _annotation = this.selectedMarker;
+ _annotation = this.selectedMarker,
+ _url = Mustache.to_html(this.api_endpoint_template_edit, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
_annotation.source = _export
_annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(), /* Champ description */
_annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
@@ -318,7 +376,8 @@
var _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* Création d'un objet source utilisant un sérialiseur spécifique pour l'export */
_annotation = new IriSP.Model.Annotation(false, _export); /* Création d'une annotation dans cette source avec un ID généré à la volée (param. false) */
_annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
- _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)); /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
+ _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)), /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
+ _url = Mustache.to_html(this.api_endpoint_template_create);
/* Si nous avons dû générer un ID d'annotationType à la volée... */
if (!_annotationTypes.length) {
/* Il ne faudra pas envoyer l'ID généré au serveur */
@@ -326,11 +385,13 @@
/* Il faut inclure le titre dans le type d'annotation */
_annotationType.title = this.annotation_type;
}
-
+
_annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
- _currentTime = this.media.getCurrentTime();
- _annotation.setBegin(_currentTime); /* Timecode de la lecture de la video */
- _annotation.setEnd(_currentTime); /* Timecode de fin du widget */
+ if (!this.selectedMarker){
+ _currentTime = this.media.getCurrentTime();
+ _annotation.setBegin(_currentTime); /* Timecode de la lecture de la video */
+ _annotation.setEnd(_currentTime); /* Timecode de fin du widget */
+ }
_annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
if (this.project_id != ""){
/* Champ id projet, seulement si on l'a renseigné dans la config */
@@ -353,26 +414,29 @@
/* Envoi de l'annotation via AJAX au serveur ! */
IriSP.jQuery.ajax({
url: _url,
- type: this.selectedMarker ? this.api_method_editing : this.api_method_create,
+ type: this.selectedMarker ? this.api_method_edit : this.api_method_create,
contentType: 'application/json',
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.showScreen("Main");
+ _this.cancelEdit();
},
(_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;
_this.source.merge(_export); /* On récupère les données réimportées dans l'espace global des données */
if (_this.pause_on_write && _this.media.getPaused()) {
_this.media.play();
}
_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");
- _this.$.find(".Ldt-Markers-MarkerTextArea").val("")
},
error: function(_xhr, _error, _thrown) {
IriSP.log("Error when sending annotation", _thrown);
--- a/server/src/remie/templates/remie/iframe_markers.html Tue Sep 08 10:31:21 2015 +0200
+++ b/server/src/remie/templates/remie/iframe_markers.html Tue Sep 08 10:42:01 2015 +0200
@@ -74,9 +74,11 @@
disable_ctrl_f: true
},{
type: "Markers",
- annotation_type: "markers",
+ annotation_type: "markers_{{current_user}}",
line_height: 24,
- api_endpoint_template: "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}{% templatetag openvariable %}annotation_id{% templatetag closevariable %}",
+ api_endpoint_template_create: "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}",
+ api_endpoint_template_edit: "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}{% templatetag openvariable %}annotation_id{% templatetag closevariable %}/",
+ api_endpoint_template_delete: "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}{% templatetag openvariable %}annotation_id{% templatetag closevariable %}/",
creator_name : "{{current_user}}",
project_id: "{{project_id}}"
}
--- a/server/src/remieplt/__init__.py Tue Sep 08 10:31:21 2015 +0200
+++ b/server/src/remieplt/__init__.py Tue Sep 08 10:42:01 2015 +0200
@@ -1,4 +1,4 @@
-VERSION = (0, 0, 12, "final", 0)
+VERSION = (0, 0, 15, "final", 0)
VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
--- a/server/src/requirement.txt Tue Sep 08 10:31:21 2015 +0200
+++ b/server/src/requirement.txt Tue Sep 08 10:42:01 2015 +0200
@@ -1,1 +1,1 @@
-ldt (==1.58)
+ldt (==1.58.2)
--- a/server/virtualenv/res/lib/lib_create_env.py Tue Sep 08 10:31:21 2015 +0200
+++ b/server/virtualenv/res/lib/lib_create_env.py Tue Sep 08 10:42:01 2015 +0200
@@ -17,7 +17,7 @@
URLS = {
#'': {'setup': '', 'url':'', 'local':''},
'DISTRIBUTE': {'setup': 'distribute', 'url':'http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz', 'local':"distribute-0.6.34.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'DJANGO': {'setup': 'django', 'url': 'https://github.com/IRI-Research/django/archive/1.8.3+IRI.tar.gz', 'local':"Django-1.8.3.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'DJANGO': {'setup': 'django', 'url': 'https://github.com/django/django/archive/1.8.4.tar.gz', 'local':"django-1.8.3.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'DJANGO-EXTENSIONS': { 'setup': 'django-extensions', 'url':'https://github.com/django-extensions/django-extensions/archive/1.5.5.tar.gz', 'local':"django-extensions-1.5.5.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'DJANGO-REGISTRATION': { 'setup': 'django-registration', 'url':'https://github.com/macropin/django-registration/archive/v1.2.tar.gz', 'local':"django-registration-redux-1.2.tar.gz", 'install': {'method': 'easy_install', 'option_str': '-Z', 'dict_extra_env': None}},
'DJANGO-TEMPLATETAG-SUGAR': { 'setup': 'django-templatetag-sugar', 'url': 'https://github.com/IRI-Research/django-templatetag-sugar/archive/1.0.1.tar.gz', 'local': 'django-templatetag-sugar-1.0.1.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
Binary file server/virtualenv/res/src/Django-1.8.3.tar.gz has changed
Binary file server/virtualenv/res/src/Django-1.8.4.tar.gz has changed
--- a/server/virtualenv/web/res/requirements.txt Tue Sep 08 10:31:21 2015 +0200
+++ b/server/virtualenv/web/res/requirements.txt Tue Sep 08 10:42:01 2015 +0200
@@ -1,6 +1,6 @@
-f ../../res/src
defusedxml==0.4.1
-Django==1.8.3
+Django==1.8.4
django-chunked-uploads==0.7
django-cas-ng==3.4.2
django-cors-headers==1.1.0
--- a/server/virtualenv/web/virtualenv.py Tue Sep 08 10:31:21 2015 +0200
+++ b/server/virtualenv/web/virtualenv.py Tue Sep 08 10:42:01 2015 +0200
@@ -2,7 +2,7 @@
"""Create a "virtual" Python installation
"""
-__version__ = "13.1.0"
+__version__ = "13.1.2"
virtualenv_version = __version__ # legacy
import base64
@@ -2014,21 +2014,21 @@
##file activate.sh
ACTIVATE_SH = convert("""
-eJytVVFvokAQfudXTLEPtTlLeo9tvMSmJpq02hSvl7u2wRUG2QR2DSxSe7n/frOACEVNLlceRHa+
-nfl25pvZDswCnoDPQ4QoTRQsENIEPci4CsBMZBq7CAsuLOYqvmYKTTj3YxnBgiXBudGBjUzBZUJI
-BXEqgCvweIyuCjeG4eF2F5x14bcB9KQiQQWrjSddI1/oQIx6SYYeoFjzWIoIhYI1izlbhJjkKO7D
-M/QEmKfO9O7WeRo/zr4P7pyHwWxkwitcgwpQ5Ej96OX+PmiFwLeVjFUOrNYKaq1Nud3nR2n8nI2m
-k9H0friPTGVsUdptaxGrTEfpNVFEskxpXtUkkCkl1UNF9cgLBkx48J4EXyALuBtAwNYIjF5kcmUU
-abMKmMq1ULoiRbgsDEkTSsKSGFCJ6Z8vY/2xYiSacmtyAfCDdCNTVZoVF8vSTQOoEwSnOrngBkws
-MYGMBMg8/bMBLSYKS7pYEXP0PqT+ZmBT0Xuy+Pplj5yn4aM9nk72JD8/Wi+Gr98sD9eWSMOwkapD
-BbUv91XSvmyVkICt2tmXR4tWmrcUCsjWOpw87YidEC8i0gdTSOFhouJUNxR+4NYBG0MftoCTD9F7
-2rTtxG3oPwY1b2HncYwhrlmj6Wq924xtGDWqfdNxap+OYxplEurnMVo9RWks+rH8qKEtx7kZT5zJ
-4H7oOFclrN6uFe+d+nW2aIUsSgs/42EIPuOhXq+jEo3S6tX6w2ilNkDnIpHCWdEQhFgwj9pkk7FN
-l/y5eQvRSIQ5+TrL05lewxWpt/Lbhes5cJF3mLET1MGhcKCF+40tNWnUulxrpojwDo2sObdje3Bz
-N3QeHqf3D7OjEXMVV8LN3ZlvuzoWHqiUcNKHtwNd0IbvPGKYYM31nPKCgkUILw3KL+Y8l7aO1ArS
-Ad37nIU0fCj5NE5gQCuC5sOSu+UdI2NeXg/lFkQIlFpdWVaWZRfvqGiirC9o6liJ9FXGYrSY9mI1
-D/Ncozgn13vJvsznr7DnkJWXsyMH7e42ljdJ+aqNDF1bFnKWFLdj31xtaJYK6EXFgqmV/ymD/ROG
-+n8O9H8f5vsGOWXsL1+1k3g=
+eJytVVFv2jAQfs+vuIY+lGo0Yo+tmEQ1JJBaqBrWaWurYJKDWAo2ShxSWvW/7+yEEAhl0tY8EOI7
+332++75zA8YhT2DGI4RFmiiYIqQJBpBxFYKdyDT2EaZcOMxXfMUU2nA+i+UCpiwJz60GrGUKPhNC
+KohTAVxBwGP0VbS2rAA3u+CsCW8W0JOKBBUs14H0LbPQgBj1kowCQLHisRQLFApWLOZsGmFivPgM
+HqElwD5980Y3372Hwf34R/fGu+uO+613G57hClSIwjjrRxs69mnN2S498GUpY2Ucy7UcXW2Tsc/4
+cSS/xv3RsD+67R3GU5prqEpLHVtpOopw14twFoU1vU1CmVJpA1TUFdM2YCKA1yT8AlnI/RBCtkJg
+9CKTLxcLbVYhU4YRRSjihc+iiJihJMwJATWa/s1krD+WjKhTbE0uAH4Se2SqCrPiYl6E2XHUBYJT
+XV/wQybmmEBGNGSB/lmDphSlJXYsCTkG+9W/7rqm9S1ZLPx2+95D794djIYHW2AO2Irh6zcnwJUj
+0ijaKdiHnXXbh1vqtmu9dNv1Jrrto90rzBsUucvG2hs+bLGdaGgGSwdsIUWAiYpTLTHcg9cAF6MZ
+bBxO9gC0tGmjzU32d4vknNt5HGOEK7Yjw4qad3NbVgVtx/a8yqfn2VZRh+qRrJrEqJK5PIuPirfj
+edeDoTfs3vY877Jwq6q3xL1Vgi4YrZBFaRFkPIpgxnik16teifbSTNZcxMVSrYHORYSFs1wc5DFl
+AUlmnbF1k+L5Rk40JGFCsc5MOdMruCQml3GbcDUBLozarAqtjsyIDxSty7I3H/aPamnm5EledZJq
+9b8P3O71Tc+7ux/d3o3/ktTQuWSwiWi/bLuZx6CGwkkHXj6QQ919GxGjBCuhJ1QdFGyB8LTT7id7
+YgiuM9WSNEBPA84iGkfUAhow0KUVQRNjzv3i7pExL66NYgsihEotLx0ny7KLV1Q0Y1YXNIecRM5U
+xmJ0mI7i7B7msQJxQqEPgn2aTJ7hwCHLKGdHDtrcbiyul+JVmR26vSziLMlvzY69XNN0FdBa5Au2
+5v+njPpPGPP/OeL/dbwfGu1Utz87Sp7q
""")
##file activate.fish
Binary file server/virtualenv/web/virtualenv_support/pip-7.1.0-py2.py3-none-any.whl has changed
Binary file server/virtualenv/web/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl has changed
Binary file server/virtualenv/web/virtualenv_support/setuptools-18.0.1-py2.py3-none-any.whl has changed
Binary file server/virtualenv/web/virtualenv_support/setuptools-18.2-py2.py3-none-any.whl has changed