5 |
5 |
6 IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget(); |
6 IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget(); |
7 |
7 |
8 IriSP.Widgets.CreateAnnotation.prototype.defaults = { |
8 IriSP.Widgets.CreateAnnotation.prototype.defaults = { |
9 single_time_mode : false, |
9 single_time_mode : false, |
10 |
10 show_title_field : true, |
|
11 user_avatar : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" |
11 } |
12 } |
12 |
13 |
13 IriSP.Widgets.CreateAnnotation.prototype.messages = { |
14 IriSP.Widgets.CreateAnnotation.prototype.messages = { |
14 "en": { |
15 "en": { |
15 "from_time" : "from", |
16 "from_time" : "from", |
16 "to_time" : "to", |
17 "to_time" : "to", |
|
18 "at_time" : "at", |
17 "submit": "Submit", |
19 "submit": "Submit", |
18 "add_keywords": "Add keywords", |
20 "add_keywords": "Add keywords", |
19 "add_polemic_keywords": "Add polemic keywords", |
21 "add_polemic_keywords": "Add polemic keywords", |
20 "your_name": "Your name", |
22 "your_name": "Your name", |
|
23 "no_title" : "Annotate this video", |
|
24 "type_title": "Annotation title", |
21 "type_description": "Type the full description of your annotation here.", |
25 "type_description": "Type the full description of your annotation here.", |
22 "wait_while_processing": "Please wait while your request is being processed...", |
26 "wait_while_processing": "Please wait while your request is being processed...", |
23 "error_while_contacting": "An error happened while contacting the server. Your annotation has not been saved.", |
27 "error_while_contacting": "An error happened while contacting the server. Your annotation has not been saved.", |
24 "empty_annotation": "Your annotation is empty. Please write something before submitting.", |
28 "empty_annotation": "Your annotation is empty. Please write something before submitting.", |
25 "annotation_saved": "Thank you, your annotation has been saved.", |
29 "annotation_saved": "Thank you, your annotation has been saved.", |
29 "cancel": "Cancel" |
33 "cancel": "Cancel" |
30 }, |
34 }, |
31 "fr": { |
35 "fr": { |
32 "from_time" : "from", |
36 "from_time" : "from", |
33 "to_time" : "à", |
37 "to_time" : "à", |
|
38 "at_time" : "à", |
34 "submit": "Envoyer", |
39 "submit": "Envoyer", |
35 "add_keywords": "Ajouter des mots-clés", |
40 "add_keywords": "Ajouter des mots-clés", |
36 "add_polemic_keywords": "Ajouter des mots-clés polémiques", |
41 "add_polemic_keywords": "Ajouter des mots-clés polémiques", |
37 "your_name": "Votre nom", |
42 "your_name": "Votre nom", |
|
43 "no_title" : "Annoter cette vidéo", |
|
44 "type_title": "Titre de l'annotation", |
38 "type_description": "Rédigez le contenu de votre annotation ici.", |
45 "type_description": "Rédigez le contenu de votre annotation ici.", |
39 "wait_while_processing": "Veuillez patienter pendant le traitement de votre requête...", |
46 "wait_while_processing": "Veuillez patienter pendant le traitement de votre requête...", |
40 "error_while_contacting": "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée", |
47 "error_while_contacting": "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée", |
41 "empty_annotation": "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.", |
48 "empty_annotation": "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.", |
42 "annotation_saved": "Merci, votre annotation a été enregistrée.", |
49 "annotation_saved": "Merci, votre annotation a été enregistrée.", |
46 "cancel": "Cancel" |
53 "cancel": "Cancel" |
47 } |
54 } |
48 } |
55 } |
49 |
56 |
50 IriSP.Widgets.CreateAnnotation.prototype.template = |
57 IriSP.Widgets.CreateAnnotation.prototype.template = |
51 '<div class="Ldt-CreateAnnotation">' |
58 '<div class="Ldt-CreateAnnotation"><div class="Ldt-CreateAnnotation-Inner">' |
52 + ' <div class="Ldt-CreateAnnotation-Inner">' |
59 + '<form class="Ldt-CreateAnnotation-Screen Ldt-CreateAnnotation-Main">' |
|
60 + '<h3>{{#show_title_field}}<input class="Ldt-CreateAnnotation-Title" placeholder="{{l10n.type_title}}" />{{/show_title_field}}' |
|
61 + '{{^show_title_field}}<span class="Ldt-CreateAnnotation-NoTitle">{{l10n.no_title}}</span>{{/show_title_field}}' |
|
62 + ' <span class="Ldt-CreateAnnotation-Times">{{#single_time_mode}}{{l10n.at_time}}{{/single_time_mode}}' |
|
63 + '{{^single_time_mode}}{{l10n.from_time}}{{/single_time_mode}} <span class="Ldt-CreateAnnotation-Begin"></span>' |
|
64 + ' {{^single_time_mode}}{{l10n.to_time}} <span class="Ldt-CreateAnnotation-End"></span>{{/single_time_mode}}</span></h3>' |
|
65 + '' |
53 |
66 |
54 |
67 + '</form>' |
55 + ' </div>' |
68 + '</div></div>' |
56 + '</div>' |
|
57 |
69 |
58 /* |
70 /* |
59 + ' <div class="Ldt-CreateAnnotation-Screen Ldt-createAnnotation-startScreen">' |
71 + ' <div class="Ldt-CreateAnnotation-Screen Ldt-createAnnotation-startScreen">' |
60 + ' <div style="margin-bottom: 7px; overflow: auto;">' |
72 + ' <div style="margin-bottom: 7px; overflow: auto;">' |
61 + ' <div class="Ldt-createAnnotation-Title"></div>' |
73 + ' <div class="Ldt-createAnnotation-Title"></div>' |