62 close_after_send: false, |
62 close_after_send: false, |
63 tag_prefix: "#", |
63 tag_prefix: "#", |
64 pause_when_displaying: false, |
64 pause_when_displaying: false, |
65 custom_send_button: false, |
65 custom_send_button: false, |
66 custom_cancel_button: false, |
66 custom_cancel_button: false, |
|
67 custom_description_placeholder: false, |
67 preview_mode: false, |
68 preview_mode: false, |
68 }; |
69 }; |
69 |
70 |
70 IriSP.Widgets.CreateAnnotation.prototype.messages = { |
71 IriSP.Widgets.CreateAnnotation.prototype.messages = { |
71 en: { |
72 en: { |
135 + '{{#show_controls}}<div class="Ldt-CreateAnnotation-Controls">' |
136 + '{{#show_controls}}<div class="Ldt-CreateAnnotation-Controls">' |
136 + '<span title="{{l10n.in_tooltip}}" class="Ldt-CreateAnnotation-Control-In">In</span>' |
137 + '<span title="{{l10n.in_tooltip}}" class="Ldt-CreateAnnotation-Control-In">In</span>' |
137 + '<span title="{{l10n.out_tooltip}}" class="Ldt-CreateAnnotation-Control-Out">Out</span>' |
138 + '<span title="{{l10n.out_tooltip}}" class="Ldt-CreateAnnotation-Control-Out">Out</span>' |
138 + '<span title="{{l10n.play_tooltip}}" class="Ldt-CreateAnnotation-Control-Play">Play</span>' |
139 + '<span title="{{l10n.play_tooltip}}" class="Ldt-CreateAnnotation-Control-Play">Play</span>' |
139 + '</div>{{/show_controls}}' |
140 + '</div>{{/show_controls}}' |
140 + '<textarea class="Ldt-CreateAnnotation-Description Ldt-TraceMe empty" placeholder="{{l10n.type_description}}"></textarea>' |
141 + '<textarea class="Ldt-CreateAnnotation-Description Ldt-TraceMe empty" placeholder="{{#custom_description_placeholder}}{{custom_description_placeholder}}{{/custom_description_placeholder}}{{^custom_description_placeholder}}{{l10n.type_description}}{{/custom_description_placeholder}}"></textarea>' |
141 + '{{#show_creator_field}}<div class="Ldt-CreateAnnotation-Avatar"><img src="{{creator_avatar}}" title="{{creator_name}}"></img></div>{{/show_creator_field}}' |
142 + '{{#show_creator_field}}<div class="Ldt-CreateAnnotation-Avatar"><img src="{{creator_avatar}}" title="{{creator_name}}"></img></div>{{/show_creator_field}}' |
142 + '<div class="Ldt-CreateAnnotation-SubmitArea Ldt-TraceMe">' |
143 + '<div class="Ldt-CreateAnnotation-SubmitArea Ldt-TraceMe">' |
143 + '{{#preview_mode}}<input type="button" class="Ldt-CreateAnnotation-PreviewSubmit" title="{{l10n.preview_submit}}" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}' |
144 + '{{#preview_mode}}<input type="button" class="Ldt-CreateAnnotation-PreviewSubmit" title="{{l10n.preview_submit}}" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}' |
144 + '{{^preview_mode}}<input type="submit" class="Ldt-CreateAnnotation-Submit" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}' |
145 + '{{^preview_mode}}<input type="submit" class="Ldt-CreateAnnotation-Submit" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}' |
145 + '<input type="button" class="Ldt-CreateAnnotation-Cancel" value="{{#custom_cancel_button}}{{custom_cancel_button}}{{/custom_cancel_button}}{{^custom_cancel_button}}{{l10n.cancel}}{{/custom_cancel_button}}" />' |
146 + '<input type="button" class="Ldt-CreateAnnotation-Cancel" value="{{#custom_cancel_button}}{{custom_cancel_button}}{{/custom_cancel_button}}{{^custom_cancel_button}}{{l10n.cancel}}{{/custom_cancel_button}}" />' |
146 + '<div class="Ldt-CreateAnnotation-Begin Ldt-CreateAnnotation-Times">00:00</div>' |
147 + '<div class="Ldt-CreateAnnotation-Begin Ldt-CreateAnnotation-Times">00:00</div>' |
147 + '</div>' |
148 + '</div>' |
148 + '{{#show_mic_record}}<div class="Ldt-CreateAnnotation-RecBlock"><div class="Ldt-CreateAnnotation-RecLabel">Add voice annotation</div>' |
149 + '{{#show_mic_record}}<div class="Ldt-CreateAnnotation-RecBlock"><div class="Ldt-CreateAnnotation-RecLabel">Add voice annotation</div>' |
149 + ' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="220" height="160">' |
150 + ' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="220" height="160">' |
150 + ' <param name="movie" value="{{record_swf}}" />' |
151 + ' <param name="movie" value="{{record_swf}}" />' |
233 { |
234 { |
234 type: "Slice", |
235 type: "Slice", |
235 show_arrow: this.show_arrow, |
236 show_arrow: this.show_arrow, |
236 annotation_type: this.slice_annotation_type, |
237 annotation_type: this.slice_annotation_type, |
237 onBoundsChanged: function(_from, _to) { |
238 onBoundsChanged: function(_from, _to) { |
238 this.setBeginEnd(_from, _to); |
239 _this.setBeginEnd(_from, _to); |
239 } |
240 } |
240 }, |
241 }, |
241 "slice" |
242 "slice" |
242 ); |
243 ); |
243 } else { |
244 } else { |
377 IriSP.Widgets.CreateAnnotation.prototype.toggle = function() { |
378 IriSP.Widgets.CreateAnnotation.prototype.toggle = function() { |
378 if (!this.always_visible) { |
379 if (!this.always_visible) { |
379 if (this.visible) { |
380 if (this.visible) { |
380 this.hide(); |
381 this.hide(); |
381 } else { |
382 } else { |
382 var t = _this.media.getCurrentTime() || 0; |
383 var t = this.media.getCurrentTime() || 0; |
383 _this.setBeginEnd(t, t); |
384 this.setBeginEnd(t, t); |
384 if (_this.slice_widget) { |
385 if (this.slice_widget) { |
385 _this.slice_widget.setBounds(_this.begin, _this.end); |
386 this.slice_widget.setBounds(this.begin, this.end); |
386 } |
387 } |
387 this.show(); |
388 this.show(); |
388 // Set focus on textarea |
389 // Set focus on textarea |
389 _this.$.find(".Ldt-CreateAnnotation-Description").focus(); |
390 this.$.find(".Ldt-CreateAnnotation-Description").focus(); |
390 } |
391 } |
391 } |
392 } |
392 }; |
393 }; |
393 |
394 |
394 IriSP.Widgets.CreateAnnotation.prototype.addKeyword = function(_keyword) { |
395 IriSP.Widgets.CreateAnnotation.prototype.addKeyword = function(_keyword) { |