equal
deleted
inserted
replaced
21 show_only_annotation_from_user: false, |
21 show_only_annotation_from_user: false, |
22 /* |
22 /* |
23 * Displays a button that copy currently displayed annotation into CreateAnnotation input field |
23 * Displays a button that copy currently displayed annotation into CreateAnnotation input field |
24 */ |
24 */ |
25 copy_and_edit_button: false, |
25 copy_and_edit_button: false, |
|
26 hide_annotations_list: false, |
26 /* |
27 /* |
27 * Allows clicks on an annotation from Annotations to display the annotation content into this widget |
28 * Allows clicks on an annotation from Annotations to display the annotation content into this widget |
28 */ |
29 */ |
29 selectable_annotations: false, |
30 selectable_annotations: false, |
30 empty_message: false, |
31 empty_message: false, |
59 + "<div class='Ldt-LatestAnnotation'>" |
60 + "<div class='Ldt-LatestAnnotation'>" |
60 + "</div>"; |
61 + "</div>"; |
61 |
62 |
62 IriSP.Widgets.LatestAnnotation.prototype.annotationTemplate = |
63 IriSP.Widgets.LatestAnnotation.prototype.annotationTemplate = |
63 "<div class='Ldt-LatestAnnotation-Box'>" |
64 "<div class='Ldt-LatestAnnotation-Box'>" |
|
65 + "{{#copy_and_edit_button}}<div class='Ldt-LatestAnnotation-CopyEditButton'>{{button_text}}</div>{{/copy_and_edit_button}}" |
64 + "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-CreationDate'>{{{annotation_created}}}</div>" |
66 + "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-CreationDate'>{{{annotation_created}}}</div>" |
65 + "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Title'>{{{annotation_creator}}}{{#annotation_title}}: {{{annotation_title}}}{{/annotation_title}}</div>" |
67 + "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Title'>{{{annotation_creator}}}{{#annotation_title}}: {{{annotation_title}}}{{/annotation_title}}</div>" |
66 + "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Content'>" |
68 + "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Content'>" |
67 + "{{{annotation_content}}}" |
69 + "{{{annotation_content}}}" |
68 + "</div>" |
70 + "</div>" |
69 + "{{#copy_and_edit_button}}<div class='Ldt-LatestAnnotation-CopyEditButton'>{{button_text}}</div>{{/copy_and_edit_button}}" |
|
70 + "</div>" |
71 + "</div>" |
71 |
72 |
72 |
73 |
73 IriSP.Widgets.LatestAnnotation.prototype.importUsers = function(){ |
74 IriSP.Widgets.LatestAnnotation.prototype.importUsers = function(){ |
74 if (!this.source.users_data){ |
75 if (!this.source.users_data){ |
274 } |
275 } |
275 } |
276 } |
276 |
277 |
277 IriSP.Widgets.LatestAnnotation.prototype.copy_and_edit = function(){ |
278 IriSP.Widgets.LatestAnnotation.prototype.copy_and_edit = function(){ |
278 this.player.trigger("CreateAnnotation.show"); |
279 this.player.trigger("CreateAnnotation.show"); |
279 this.player.trigger("AnnotationsList.hide"); |
280 if (this.hide_annotations_list){ |
|
281 this.player.trigger("AnnotationsList.hide"); |
|
282 } |
280 annotationText = $('.Ldt-LatestAnnotation-Content').get(0).innerHTML; |
283 annotationText = $('.Ldt-LatestAnnotation-Content').get(0).innerHTML; |
281 |
284 |
282 $('.Ldt-CreateAnnotation-Description').removeClass('empty'); |
285 $('.Ldt-CreateAnnotation-Description').removeClass('empty'); |
283 $('.Ldt-CreateAnnotation-Description').val(annotationText); |
286 $('.Ldt-CreateAnnotation-Description').val(annotationText); |
284 } |
287 } |