|
1 IriSP.Widgets.CreateAnnotation = function(player, config) { |
|
2 IriSP.Widgets.Widget.call(this, player, config); |
|
3 this.lastAnnotation = false; |
|
4 }; |
|
5 |
|
6 IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget(); |
|
7 |
|
8 IriSP.Widgets.CreateAnnotation.prototype.defaults = { |
|
9 single_time_mode : false, |
|
10 |
|
11 } |
|
12 |
|
13 IriSP.Widgets.CreateAnnotation.prototype.messages = { |
|
14 "en": { |
|
15 "from_time" : "from", |
|
16 "to_time" : "to", |
|
17 "submit": "Submit", |
|
18 "add_keywords": "Add keywords", |
|
19 "add_polemic_keywords": "Add polemic keywords", |
|
20 "your_name": "Your name", |
|
21 "type_description": "Type the full description of your annotation here.", |
|
22 "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.", |
|
24 "empty_annotation": "Your annotation is empty. Please write something before submitting.", |
|
25 "annotation_saved": "Thank you, your annotation has been saved.", |
|
26 "share_annotation": "Would you like to share it on social networks ?", |
|
27 "share_on": "Share on", |
|
28 "more_tags": "More tags", |
|
29 "cancel": "Cancel" |
|
30 }, |
|
31 "fr": { |
|
32 "from_time" : "from", |
|
33 "to_time" : "à", |
|
34 "submit": "Envoyer", |
|
35 "add_keywords": "Ajouter des mots-clés", |
|
36 "add_polemic_keywords": "Ajouter des mots-clés polémiques", |
|
37 "your_name": "Votre nom", |
|
38 "type_description": "Rédigez le contenu de votre annotation ici.", |
|
39 "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", |
|
41 "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.", |
|
43 "share_annotation": "Souhaitez-vous la partager sur les réseaux sociaux ?", |
|
44 "share_on": "Partager sur", |
|
45 "more_tags": "Plus de mots-clés", |
|
46 "cancel": "Cancel" |
|
47 } |
|
48 } |
|
49 |
|
50 IriSP.Widgets.CreateAnnotation.prototype.template = |
|
51 '<div class="Ldt-CreateAnnotation">' |
|
52 + ' <div class="Ldt-CreateAnnotation-Inner">' |
|
53 |
|
54 |
|
55 + ' </div>' |
|
56 + '</div>' |
|
57 |
|
58 /* |
|
59 + ' <div class="Ldt-CreateAnnotation-Screen Ldt-createAnnotation-startScreen">' |
|
60 + ' <div style="margin-bottom: 7px; overflow: auto;">' |
|
61 + ' <div class="Ldt-createAnnotation-Title"></div>' |
|
62 + ' <div class="Ldt-createAnnotation-TimeFrame"></div>' |
|
63 + ' {{^cinecast_version}} <div class="Ldt-createAnnotation-Minimize Ldt-TraceMe" title="Cancel"></div>' |
|
64 + ' {{/cinecast_version}}' |
|
65 + ' </div>' |
|
66 + ' <div class="Ldt-createAnnotation-Container">' |
|
67 + ' {{#show_from_field}}' |
|
68 + ' <label>{{l10n.your_name}} : </label><input class="Ldt-createAnnotation-userName Ldt-TraceMe" value="{{user_name}}" />' |
|
69 + ' {{/show_from_field}}' |
|
70 + ' <textarea class="Ldt-createAnnotation-Description Ldt-TraceMe"></textarea>' |
|
71 + ' <div class="Ldt-createAnnotation-userAvatar Ldt-TraceMe">' |
|
72 + ' {{^user_avatar}} <img src="https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png"></img>' |
|
73 + ' {{/user_avatar}}' |
|
74 + ' {{#user_avatar}} <img src="{{ user_avatar }}"></img>' |
|
75 + ' {{/user_avatar}}' |
|
76 + ' </div>' |
|
77 + ' <div class="Ldt-createAnnotation-profileArrow"></div>' |
|
78 + ' </div>' |
|
79 + ' <button class="Ldt-createAnnotation-submitButton Ldt-TraceMe">{{l10n.submit}}</button>' |
|
80 + ' {{#tags.length}}' |
|
81 + ' <div class="Ldt-createAnnotation-btnblock Ldt-createAnnotation-keywords">' |
|
82 + ' <label>{{l10n.add_keywords}} :</label>' |
|
83 + ' <ul class="Ldt-floatList">' |
|
84 + ' {{#tags}}' |
|
85 + ' <li><button class="Ldt-createAnnotation-keyword-button Ldt-TraceMe" tag-id="{{id}}">{{meta.description}}</button></li>' |
|
86 + ' {{/tags}}' |
|
87 + ' </ul>' |
|
88 + ' </div>' |
|
89 + ' {{#random_tags}}' |
|
90 + ' <button class="Ldt-createAnnotation-moar-keywordz">{{l10n.more_tags}}</button>' |
|
91 + ' {{/random_tags}}' |
|
92 + ' {{/tags.length}}' |
|
93 + ' {{#polemic_mode}}' |
|
94 + ' {{#polemics.length}}' |
|
95 + ' <div class="Ldt-createAnnotation-btnblock Ldt-createAnnotation-polemics">' |
|
96 + ' <label>{{l10n.add_polemic_keywords}} :</label>' |
|
97 + ' <ul class="Ldt-floatList">' |
|
98 + ' {{#polemics}}' |
|
99 + ' <li><button class="Ldt-createAnnotation-polemic-{{className}} Ldt-createAnnotation-polemic-button Ldt-TraceMe">{{keyword}}</button></li>' |
|
100 + ' {{/polemics}}' |
|
101 + ' </ul>' |
|
102 + ' </div>' |
|
103 + ' {{/polemics.length}}' |
|
104 + ' {{/polemic_mode}}' |
|
105 + ' </div>' |
|
106 + ' <div class="Ldt-createAnnotation-screen Ldt-createAnnotation-waitScreen" style="display: none; text-align: center">' |
|
107 + ' <div class="Ldt-createAnnotation-spinner"></div>' |
|
108 + ' {{l10n.wait_while_processed}}' |
|
109 + ' </div>' |
|
110 + ' <div class="Ldt-createAnnotation-screen Ldt-createAnnotation-errorScreen" style="display: none; text-align: center">' |
|
111 + ' <div class="Ldt-createAnnotation-Minimize" title="Hide"></div>' |
|
112 + ' {{l10n.error_while_contacting}}' |
|
113 + ' </div>' |
|
114 + ' <div class="Ldt-createAnnotation-screen Ldt-createAnnotation-endScreen" style="display: none">' |
|
115 + ' <div class="Ldt-createAnnotation-Minimize" title="Hide"></div>' |
|
116 + ' {{l10n.annotation_saved}}' |
|
117 + ' <br>' |
|
118 + ' {{^disable_share}}' |
|
119 + ' {{l10n.share_annotation}}' |
|
120 + ' <div style="margin-top: 12px; text-align: center;">' |
|
121 + ' <a target="_blank" class="Ldt-createAnnotation-endScreen-TweetLink Ldt-TraceMe"></a>' |
|
122 + ' <a target="_blank" class="Ldt-createAnnotation-endScreen-FbLink Ldt-TraceMe"></a>' |
|
123 + ' <a target="_blank" class="Ldt-createAnnotation-endScreen-GplusLink Ldt-TraceMe"></a>' |
|
124 + ' </div>' |
|
125 + ' {{/disable_share}}' |
|
126 + ' </div>' |
|
127 + ' <div class="Ldt-floatClear"></div>' |
|
128 */ |
|
129 |