widget doc update
authorcavaliet
Tue, 07 Jan 2014 12:46:58 +0100
changeset 1023 4b9594182ffd
parent 1022 793b3727d433
child 1024 894079bece86
widget doc update
doc/architecture.en.md
doc/architecture.fr.md
--- a/doc/architecture.en.md	Tue Jan 07 12:00:04 2014 +0100
+++ b/doc/architecture.en.md	Tue Jan 07 12:46:58 2014 +0100
@@ -136,12 +136,13 @@
 
 Located in the *src/widgets* directory, they’re composed of a mandatory JavaScript file, *WidgetName.js* and an optional stylesheet, *WidgetName.css*
 
-### Common video player Widget oOptions ###
+### Common video player Widget options ###
 
 - **video**, video file URL.
 - **height**, video player height (width is defined in the main *config* of IriSP.Metadataplayer(*config*) ).
 - **autostart**, as its name implies, *true* or *false*.
 - **url\_transform**, function to transform the video url, if a transformation is needed before integration.
+    Ex: url\_transform: function(url) { return url + ".mp4"; }
 
 Here is the list of available video player widget with their options. No specific css used.
 
@@ -206,7 +207,7 @@
     - **site\_name**: "Lignes de Temps", site name to display when users click on "Share on social networks".
 - Uses a CSS stylesheet: yes
 
-### AnnotationsList ###
+#### AnnotationsList ####
 
 - **Role**: Show a list of annotations.
 - **Options**:
@@ -250,18 +251,25 @@
 
 - **Role**: Displays a form to create a new annotation
 - **Options**:
-    - **show\_title\_field**: (default: true), shows or hides the annotation title field.
+    - **after\_send\_timeout**: (default: 0), add annotation request timeout.
+    - **always\_visible**: (default: false), widget always visible or not.
+    - **annotation\_type**: (default: "Contributions"), see *Common widget options*.
+    - **api\_endpoint\_template**: API Endpoint URL, with {{id\}\} as a placeholder for project ID, e.g.: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/annotations/{{id}}.json".
+    - **api\_method**: (default: "POST"), HTTP method used to send annotations.
+    - **api\_serializer**: (default: "ldt\_annotate"), serializer to use when sending annotations.
+    - **close\_after\_send**: (default: false), closes the widget after adding annotation.
+    - **close\_widget\_timeout**: (default: 0), duration in milliseconds before widget is closed after send. If value is set to 0, the widget stays open.
+    - **creator\_avatar**: Creator profile thumbnail URL.
     - **creator\_name**: Default annotation creator name.
-    - **creator\_avatar**: Creator profile thumbnail URL.
+    - **max\_tags**: (default: 8), maximum number of tags to display.
+    - **pause\_on\_write**: (default: true), pauses video when we start to write.
+    - **polemics**: polemic buttons to display, as an array of objects, e.g.: [ { keyword: "++", background\_color: "#00a000", text\_color: "#ffffff" } ]
+    - **show\_title\_field**: (default: true), shows or hides the annotation title field.
+    - **show\_creator\_field**: (default: true), shows or hides the annotation author field.
+    - **start\_visible**: (default: true), widget visible at start.
+    - **tag\_prefix**: (default: "#"), as its name implies.
     - **tag\_titles**: (default: false), list of tags to display, as an array of strings: [ "#firstTag", "#secondTag" ]
     - **tags**: (default: false), list of tags to display, as an array of objects: [ { id: "tag-001", title: "#firstTag" } ]. Overrides *tag\_titles*. If both options are set to *false*, the most frequent tags in the project will be displayed.
-    - **max\_tags**: (default: 8), maximum number of tags to display.
-    - **polemics**: polemic buttons to display, as an array of objects, e.g.: [ { keyword: "++", background\_color: "#00a000", text\_color: "#ffffff" } ]
-    - **annotation\_type**: (default: "Contributions"), see *Common widget options*.
-    - **api\_serializer**: (default: "ldt\_annotate"), serializer to use when sending annotations.
-    - **api\_endpoint\_template**: API Endpoint URL, with {{id\}\} as a placeholder for project ID, e.g.: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/annotations/{{id}}.json".
-    - **api\_method**: (default: "PUT"), HTTP method used to send annotations. *Lignes de temps* platform uses PUT.
-    - **close\_widget\_timeout**: (default: 0), duration in milliseconds before widget is closed after send. If value is set to 0, the widget stays open.
 - Uses a CSS stylesheet: yes
 
 #### HelloWorld ####
@@ -271,7 +279,7 @@
     - **text**: (default: "world"), text to display after "Hello, "
 - Uses a CSS stylesheet: yes
 
-#### Media ####
+#### MediaList ####
 
 - **Role**: Shows current media, as well as other medias in the project. Mostly used for mashups
 - **Options**:
@@ -286,6 +294,13 @@
 - No options
 - Uses a CSS stylesheet: no
 
+#### MultiSegments ####
+
+- **Rôle**: Displays horizontaly all the media's *annotation\_type* as Segments.
+- **Options**:
+    - **visible_by_default**: true by default or false, as its name implies.
+- Utilise un fichier CSS: non
+
 #### Polemic ####
 
 - **Role**: Shows the *polemical timeline*, i.e. tweets colored according to the polemical syntax. Depending on the number of tweets, two visualization modes exist:
--- a/doc/architecture.fr.md	Tue Jan 07 12:00:04 2014 +0100
+++ b/doc/architecture.fr.md	Tue Jan 07 12:46:58 2014 +0100
@@ -142,6 +142,7 @@
 - **height**, hauteur du lecteur vidéo (la largeur est défini dans la *config* générale du IriSP.Metadataplayer(*config*) ).
 - **autostart**, comme son nom l'indique, *true* ou *false*.
 - **url\_transform**, fonction pour traiter l'url s'il y a besoin de la transformer avant de l'intégrer.
+    Ex: url\_transform: function(url) { return url + ".mp4"; }
 
 Voici la liste des widgets player actuellement disponibles avec leurs options. Aucun player n'utilise de fichier css spécifique.
 
@@ -252,17 +253,25 @@
 
 - **Rôle**: Permet de créer une annotation en affichant un formulaire
 - **Options**:
-    - **show\_title\_field**: (défaut: true), affiche un champ permettant de saisir le titre de l’annotation.
-    - **creator\_name**: nom d’utilisateur du créateur de l’annotation.
+    - **after\_send\_timeout**: (défaut: 0), timeout de la requête d'ajout d'annotation.
+    - **always\_visible**: (défaut: false), widget toujours visible ou non.
+    - **annotation\_type**: (défaut: "Contributions"), cf. *Options courantes*, plus haut.
+    - **api\_endpoint\_template**: URL de l’API, où {{id\}\} est remplacé par l’ID du projet, ex: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/annotations/{{id}}.json".
+    - **api\_method**: (défaut: "POST"), méthode HTTP utilisée pour envoyer les annotations.
+    - **api\_serializer**: (défaut: "ldt\_annotate"), sérialiseur à utiliser pour l’envoi des annotations.
+    - **close\_after\_send**: (défaut: false), ferme le widget après avoir créé une annotation.
+    - **close\_widget\_timeout**: (défaut: 0), durée en millisecondes avant que le widget ne soit refermé après l’envoi d’une annotation. Si la valeur est 0, le widget ne se referme pas.
     - **creator\_avatar**: URL de l’image de profil du créateur de l’annotation.
-    - **tags**: (défaut: false), liste des tags à afficher, sous la forme d’un tableau d’objets type [ { id: "tag-001", title: "" } ]. Si la valeur est false, affiche les tags les plus utilisés du projet.
+    - **creator\_name**: nom d’utilisateur du créateur de l’annotation.
     - **max\_tags**: (défaut: 8), nombre de tags à afficher.
+    - **pause\_on\_write**: (défaut: true), arrête la lecture quand on commence à écrire.
     - **polemics**: boutons polémiques à afficher, sous la forme d’un tableau d’objets indiquant mot-clé à ajouter, couleur du fond du bouton, couleur du bouton, ex: [ { keyword: "++", background\_color: "#00a000", text\_color: "#ffffff" } ]
-    - **annotation\_type**: (défaut: "Contributions"), cf. *Options courantes*, plus haut.
-    - **api\_serializer**: (défaut: "ldt\_annotate"), sérialiseur à utiliser pour l’envoi des annotations.
-    - **api\_endpoint\_template**: URL de l’API, où {{id\}\} est remplacé par l’ID du projet, ex: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/annotations/{{id}}.json".
-    - **api\_method**: (défaut: "PUT"), méthode HTTP utilisée pour envoyer les annotations. La plateforme *Lignes de temps* utilise PUT, mais cette méthode devrait être réservée pour la création d’une ressource dont l’URL est connue à l’avance.
-    - **close\_widget\_timeout**: (défaut: 0), durée en millisecondes avant que le widget ne soit refermé après l’envoi d’une annotation. Si la valeur est 0, le widget ne se referme pas.
+    - **show\_title\_field**: (défaut: true), affiche un champ permettant de saisir le titre de l’annotation.
+    - **show\_creator\_field**: (défaut: true), affiche un champ permettant de saisir l'auteur de l’annotation.
+    - **start\_visible**: (défaut: true), widget visible au démarrage.
+    - **tag\_prefix**: (défaut: "#"), comme son nom l'indique.
+    - **tag\_titles**: (default: false), liste des tags à afficher, sous la forme d’un tableau de strings: [ "#premierTag", "#secondTag" ]
+    - **tags**: (défaut: false), liste des tags à afficher, sous la forme d’un tableau d’objets type [ { id: "tag-001", title: "" } ]. Si la valeur est false, affiche les tags les plus utilisés du projet.
 - Utilise un fichier CSS: oui
 
 #### HelloWorld ####
@@ -272,7 +281,7 @@
     - **text**: (défaut: "world"), texte à afficher après "Hello, "
 - Utilise un fichier CSS: oui
 
-#### Media ####
+#### MediaList ####
 
 - **Rôle**: Affiche le média en cours, ainsi que la liste des autres médias du projet. Utilisé principalement pour les mashups
 - **Options**:
@@ -287,6 +296,13 @@
 - Pas d’options
 - Utilise un fichier CSS: non.
 
+#### MultiSegments ####
+
+- **Rôle**: Affiche tous les *annotation\_type* du média sous forme de Segments, en horizontal.
+- **Options**:
+    - **visible_by_default**: true ou false, comme son nom l'indique.
+- Utilise un fichier CSS: non
+
 #### Polemic ####
 
 - **Rôle**: Affiche la *timeline polémique*, c’est à dire les tweets colorés en fonction de la syntaxe polémique. Selon le volume de tweets, deux modes de représentation existent:
@@ -316,13 +332,6 @@
     - **height**: hauteur du widget
 - Utilise un fichier CSS: oui
 
-#### MultiSegments ####
-
-- **Rôle**: Affiche tous les *annotation\_type* du média sous forme de Segment, en horizontal.
-- **Options**:
-    - **visible_by_default**: true ou false, comme son nom l'indique.
-- Utilise un fichier CSS: non
-
 #### Slider ####
 
 - **Rôle**: Barre de progression et *Slider* indiquant la position de la tête de lecture vidéo et permettant de la déplacer.