# HG changeset patch # User durandn # Date 1435935529 -7200 # Node ID e78b889a75e1f774e76df2d232d2576f71e0b2b9 # Parent 5c0416e8bba175964fc62fe56125d4b910530108 CreateAnnotations new feature: hide/show functionality on signal trigger (tweaks), added config options to customize what is displayed more accurately diff -r 5c0416e8bba1 -r e78b889a75e1 src/widgets/CreateAnnotation.css --- a/src/widgets/CreateAnnotation.css Fri Jul 03 16:57:10 2015 +0200 +++ b/src/widgets/CreateAnnotation.css Fri Jul 03 16:58:49 2015 +0200 @@ -23,7 +23,7 @@ } .Ldt-CreateAnnotation-Main { - min-height: 100px; + min-height: 150px; } .Ldt-CreateAnnotation-Title, .Ldt-CreateAnnotation-Creator { @@ -47,7 +47,6 @@ position: absolute; bottom: 7px; right: 7px; - display: inline; color: #ffffff; cursor: pointer; background: url('img/submit_annotation.png'); @@ -164,18 +163,4 @@ a.Ldt-CreateAnnotation-Close:hover { background-position: -17px 0; -} - -.Ldt-CreateAnnotation-Controls { - position: absolute; - top: 7px; - right: 7px; -} - -span[class^='Ldt-CreateAnnotation-Control-'] { - background-color: #ddd; - padding: 2px; - margin: 4px; - border-radius: 3px; - border: 1px solid #888; -} +} \ No newline at end of file diff -r 5c0416e8bba1 -r e78b889a75e1 src/widgets/CreateAnnotation.js --- a/src/widgets/CreateAnnotation.js Fri Jul 03 16:57:10 2015 +0200 +++ b/src/widgets/CreateAnnotation.js Fri Jul 03 16:58:49 2015 +0200 @@ -1,16 +1,7 @@ /* TODO: Add Social Network Sharing */ IriSP.Widgets.CreateAnnotation = function(player, config) { - var _this = this; IriSP.Widgets.Widget.call(this, player, config); - if (_this.api_method == 'local' && window.localStorage[_this.api_endpoint_template]) { - this.source.onLoad(function () { - var _export = _this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[_this.api_serializer]}); - _export.deSerialize(window.localStorage[_this.api_endpoint_template]); - console.log("Loaded personal annotations", _export); - _this.source.merge(_export); - }); - }; }; IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget(); @@ -18,13 +9,14 @@ IriSP.Widgets.CreateAnnotation.prototype.defaults = { show_title_field : true, show_creator_field : true, + creator_field_readonly : false, start_visible : true, always_visible : false, show_slice : true, - show_controls: false, show_arrow : true, show_mic_record: false, show_mic_play: false, + show_time: true, minimize_annotation_widget : true, creator_name : "", creator_avatar : "", @@ -51,13 +43,15 @@ }], slice_annotation_type: "chap", annotation_type: "Contributions", + post_at_segment_time: false, + segment_annotation_type: "chap", api_serializer: "ldt_annotate", api_endpoint_template: "", api_method: "POST", + project_id: "", after_send_timeout: 0, close_after_send: false, - tag_prefix: "#", - slice_widget: null + tag_prefix: "#" }; IriSP.Widgets.CreateAnnotation.prototype.messages = { @@ -112,16 +106,11 @@ + '