# HG changeset patch # User durandn # Date 1435935569 -7200 # Node ID 4fddc765a716ef1acba0892657777a77d46fba15 # Parent e78b889a75e1f774e76df2d232d2576f71e0b2b9 New widget AnnotationsController that displays buttons to hide/show AnnotationsList and CreateAnnotations diff -r e78b889a75e1 -r 4fddc765a716 src/widgets/AnnotationsController.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/widgets/AnnotationsController.css Fri Jul 03 16:59:29 2015 +0200 @@ -0,0 +1,43 @@ + +.Ldt-AnnotationsController{ + background: url(img/pinstripe.png); + width: 535px; + max-height: 280px; + margin: 0px; + margin-top: 4px; + border-style: solid; + border-width: 1px; + border-color: #b7b7b7; +} + +.Ldt-AnnotationsController-ButtonsContainer{ + width: 100%; + min-height: 30px; + text-align: center; +} + +.Ldt-AnnotationsController-Button{ + display: inline-block; + background-color: #d93c71; + color: #ffffff; + cursor: pointer; + height: 25px; + width: 150px; + font-size: 14px; + border: 1px solid; + border-color: #eca3bc #631e34 #36101c #e16e93; + cursor: pointer; + margin-right: 10px; + margin-left: 10px; + margin-bottom: 5px; + margin-top: 5px; + padding: 4px; + text-align: center; + vertical-align: middle; + line-height: 30px; +} + +.Ldt-AnnotationsController-Button:hover{ + background-color: #e15581; + border-color: #222222 #e87d9f #f0adc3 #68273c; +} \ No newline at end of file diff -r e78b889a75e1 -r 4fddc765a716 src/widgets/AnnotationsController.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/widgets/AnnotationsController.js Fri Jul 03 16:59:29 2015 +0200 @@ -0,0 +1,109 @@ +/* + * Widget that ties AnnotationList and CreateAnnotation together + * using buttons to hide/show AnnotationList and CreateAnnotation widgets. + * + */ + +IriSP.Widgets.AnnotationsController = function(player, config){ + IriSP.Widgets.Widget.call(this, player, config); +}; + +IriSP.Widgets.AnnotationsController.prototype = new IriSP.Widgets.Widget(); + +IriSP.Widgets.AnnotationsController.prototype.defaults = { + // If true, displaying AnnotationList will hide CreateAnnotation and vice versa. + display_or_write: false, + starts_hidden: false, + hide_without_segment: false, + segments_annotation_type: "chap" +}; + +IriSP.Widgets.AnnotationsController.prototype.template = + "