|
880
|
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, |
|
881
|
10 |
show_title_field : true, |
|
|
11 |
user_avatar : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" |
|
880
|
12 |
} |
|
|
13 |
|
|
|
14 |
IriSP.Widgets.CreateAnnotation.prototype.messages = { |
|
|
15 |
"en": { |
|
|
16 |
"from_time" : "from", |
|
|
17 |
"to_time" : "to", |
|
881
|
18 |
"at_time" : "at", |
|
880
|
19 |
"submit": "Submit", |
|
|
20 |
"add_keywords": "Add keywords", |
|
|
21 |
"add_polemic_keywords": "Add polemic keywords", |
|
|
22 |
"your_name": "Your name", |
|
881
|
23 |
"no_title" : "Annotate this video", |
|
|
24 |
"type_title": "Annotation title", |
|
880
|
25 |
"type_description": "Type the full description of your annotation here.", |
|
|
26 |
"wait_while_processing": "Please wait while your request is being processed...", |
|
|
27 |
"error_while_contacting": "An error happened while contacting the server. Your annotation has not been saved.", |
|
|
28 |
"empty_annotation": "Your annotation is empty. Please write something before submitting.", |
|
|
29 |
"annotation_saved": "Thank you, your annotation has been saved.", |
|
|
30 |
"share_annotation": "Would you like to share it on social networks ?", |
|
|
31 |
"share_on": "Share on", |
|
|
32 |
"more_tags": "More tags", |
|
|
33 |
"cancel": "Cancel" |
|
|
34 |
}, |
|
|
35 |
"fr": { |
|
|
36 |
"from_time" : "from", |
|
|
37 |
"to_time" : "à", |
|
881
|
38 |
"at_time" : "à", |
|
880
|
39 |
"submit": "Envoyer", |
|
|
40 |
"add_keywords": "Ajouter des mots-clés", |
|
|
41 |
"add_polemic_keywords": "Ajouter des mots-clés polémiques", |
|
|
42 |
"your_name": "Votre nom", |
|
881
|
43 |
"no_title" : "Annoter cette vidéo", |
|
|
44 |
"type_title": "Titre de l'annotation", |
|
880
|
45 |
"type_description": "Rédigez le contenu de votre annotation ici.", |
|
|
46 |
"wait_while_processing": "Veuillez patienter pendant le traitement de votre requête...", |
|
|
47 |
"error_while_contacting": "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée", |
|
|
48 |
"empty_annotation": "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.", |
|
|
49 |
"annotation_saved": "Merci, votre annotation a été enregistrée.", |
|
|
50 |
"share_annotation": "Souhaitez-vous la partager sur les réseaux sociaux ?", |
|
|
51 |
"share_on": "Partager sur", |
|
|
52 |
"more_tags": "Plus de mots-clés", |
|
|
53 |
"cancel": "Cancel" |
|
|
54 |
} |
|
|
55 |
} |
|
|
56 |
|
|
|
57 |
IriSP.Widgets.CreateAnnotation.prototype.template = |
|
881
|
58 |
'<div class="Ldt-CreateAnnotation"><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 |
+ '' |
|
880
|
66 |
|
|
881
|
67 |
+ '</form>' |
|
|
68 |
+ '</div></div>' |
|
880
|
69 |
|
|
|
70 |
/* |
|
|
71 |
+ ' <div class="Ldt-CreateAnnotation-Screen Ldt-createAnnotation-startScreen">' |
|
|
72 |
+ ' <div style="margin-bottom: 7px; overflow: auto;">' |
|
|
73 |
+ ' <div class="Ldt-createAnnotation-Title"></div>' |
|
|
74 |
+ ' <div class="Ldt-createAnnotation-TimeFrame"></div>' |
|
|
75 |
+ ' {{^cinecast_version}} <div class="Ldt-createAnnotation-Minimize Ldt-TraceMe" title="Cancel"></div>' |
|
|
76 |
+ ' {{/cinecast_version}}' |
|
|
77 |
+ ' </div>' |
|
|
78 |
+ ' <div class="Ldt-createAnnotation-Container">' |
|
|
79 |
+ ' {{#show_from_field}}' |
|
|
80 |
+ ' <label>{{l10n.your_name}} : </label><input class="Ldt-createAnnotation-userName Ldt-TraceMe" value="{{user_name}}" />' |
|
|
81 |
+ ' {{/show_from_field}}' |
|
|
82 |
+ ' <textarea class="Ldt-createAnnotation-Description Ldt-TraceMe"></textarea>' |
|
|
83 |
+ ' <div class="Ldt-createAnnotation-userAvatar Ldt-TraceMe">' |
|
|
84 |
+ ' {{^user_avatar}} <img src="https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png"></img>' |
|
|
85 |
+ ' {{/user_avatar}}' |
|
|
86 |
+ ' {{#user_avatar}} <img src="{{ user_avatar }}"></img>' |
|
|
87 |
+ ' {{/user_avatar}}' |
|
|
88 |
+ ' </div>' |
|
|
89 |
+ ' <div class="Ldt-createAnnotation-profileArrow"></div>' |
|
|
90 |
+ ' </div>' |
|
|
91 |
+ ' <button class="Ldt-createAnnotation-submitButton Ldt-TraceMe">{{l10n.submit}}</button>' |
|
|
92 |
+ ' {{#tags.length}}' |
|
|
93 |
+ ' <div class="Ldt-createAnnotation-btnblock Ldt-createAnnotation-keywords">' |
|
|
94 |
+ ' <label>{{l10n.add_keywords}} :</label>' |
|
|
95 |
+ ' <ul class="Ldt-floatList">' |
|
|
96 |
+ ' {{#tags}}' |
|
|
97 |
+ ' <li><button class="Ldt-createAnnotation-keyword-button Ldt-TraceMe" tag-id="{{id}}">{{meta.description}}</button></li>' |
|
|
98 |
+ ' {{/tags}}' |
|
|
99 |
+ ' </ul>' |
|
|
100 |
+ ' </div>' |
|
|
101 |
+ ' {{#random_tags}}' |
|
|
102 |
+ ' <button class="Ldt-createAnnotation-moar-keywordz">{{l10n.more_tags}}</button>' |
|
|
103 |
+ ' {{/random_tags}}' |
|
|
104 |
+ ' {{/tags.length}}' |
|
|
105 |
+ ' {{#polemic_mode}}' |
|
|
106 |
+ ' {{#polemics.length}}' |
|
|
107 |
+ ' <div class="Ldt-createAnnotation-btnblock Ldt-createAnnotation-polemics">' |
|
|
108 |
+ ' <label>{{l10n.add_polemic_keywords}} :</label>' |
|
|
109 |
+ ' <ul class="Ldt-floatList">' |
|
|
110 |
+ ' {{#polemics}}' |
|
|
111 |
+ ' <li><button class="Ldt-createAnnotation-polemic-{{className}} Ldt-createAnnotation-polemic-button Ldt-TraceMe">{{keyword}}</button></li>' |
|
|
112 |
+ ' {{/polemics}}' |
|
|
113 |
+ ' </ul>' |
|
|
114 |
+ ' </div>' |
|
|
115 |
+ ' {{/polemics.length}}' |
|
|
116 |
+ ' {{/polemic_mode}}' |
|
|
117 |
+ ' </div>' |
|
|
118 |
+ ' <div class="Ldt-createAnnotation-screen Ldt-createAnnotation-waitScreen" style="display: none; text-align: center">' |
|
|
119 |
+ ' <div class="Ldt-createAnnotation-spinner"></div>' |
|
|
120 |
+ ' {{l10n.wait_while_processed}}' |
|
|
121 |
+ ' </div>' |
|
|
122 |
+ ' <div class="Ldt-createAnnotation-screen Ldt-createAnnotation-errorScreen" style="display: none; text-align: center">' |
|
|
123 |
+ ' <div class="Ldt-createAnnotation-Minimize" title="Hide"></div>' |
|
|
124 |
+ ' {{l10n.error_while_contacting}}' |
|
|
125 |
+ ' </div>' |
|
|
126 |
+ ' <div class="Ldt-createAnnotation-screen Ldt-createAnnotation-endScreen" style="display: none">' |
|
|
127 |
+ ' <div class="Ldt-createAnnotation-Minimize" title="Hide"></div>' |
|
|
128 |
+ ' {{l10n.annotation_saved}}' |
|
|
129 |
+ ' <br>' |
|
|
130 |
+ ' {{^disable_share}}' |
|
|
131 |
+ ' {{l10n.share_annotation}}' |
|
|
132 |
+ ' <div style="margin-top: 12px; text-align: center;">' |
|
|
133 |
+ ' <a target="_blank" class="Ldt-createAnnotation-endScreen-TweetLink Ldt-TraceMe"></a>' |
|
|
134 |
+ ' <a target="_blank" class="Ldt-createAnnotation-endScreen-FbLink Ldt-TraceMe"></a>' |
|
|
135 |
+ ' <a target="_blank" class="Ldt-createAnnotation-endScreen-GplusLink Ldt-TraceMe"></a>' |
|
|
136 |
+ ' </div>' |
|
|
137 |
+ ' {{/disable_share}}' |
|
|
138 |
+ ' </div>' |
|
|
139 |
+ ' <div class="Ldt-floatClear"></div>' |
|
|
140 |
*/ |
|
|
141 |
|