# HG changeset patch # User durandn # Date 1443090347 -7200 # Node ID b9c816d95ab0acc994717f5451bd6acd71454671 # Parent e9765601184d6e9883441481eea3d7d42c00b412 Added headers to editable fields in CurrentSegmentInfobox diff -r e9765601184d -r b9c816d95ab0 src/widgets/CurrentSegmentInfobox.css --- a/src/widgets/CurrentSegmentInfobox.css Thu Sep 24 11:54:30 2015 +0200 +++ b/src/widgets/CurrentSegmentInfobox.css Thu Sep 24 12:25:47 2015 +0200 @@ -134,7 +134,7 @@ line-height: 18px; } -.Ldt-CurrentSegmentInfobox-EditButton:hover{ +.Ldt-CurrentSegmentInfobox-EditButton:hover, .Ldt-CurrentSegmentInfobox-CreateTagInput-Add:hover{ background-color: #e15581; border-color: #222222 #e87d9f #f0adc3 #68273c; } @@ -154,8 +154,37 @@ color: #e16e93 } +.Ldt-CurrentSegmentInfobox-FieldsHeader{ + margin: 5px; +} + +.Ldt-CurrentSegmentInfobox-TagsHeader{ + margin-top: 10px; + margin-left: 5px; +} + .Ldt-CurrentSegmentInfobox-CreateTagInput{ border: 2px solid #848484; margin: 5px 0; padding: 4px; +} + +.Ldt-CurrentSegmentInfobox-CreateTagInput-Add{ + margin: 5px; + padding: 4px; + display: inline-block; + background-color: #d93c71; + color: #ffffff; + cursor: pointer; + height: 14px; + width: 14px; + font-size: 14px; + font-style: bold; + border: 1px solid; + border-color: #eca3bc #631e34 #36101c #e16e93; + cursor: pointer; + padding: 4px; + text-align: center; + vertical-align: middle; + line-height: 14px; } \ No newline at end of file diff -r e9765601184d -r b9c816d95ab0 src/widgets/CurrentSegmentInfobox.js --- a/src/widgets/CurrentSegmentInfobox.js Thu Sep 24 11:54:30 2015 +0200 +++ b/src/widgets/CurrentSegmentInfobox.js Thu Sep 24 12:25:47 2015 +0200 @@ -15,6 +15,7 @@ api_method: "PUT", api_endpoint_template: "", new_tag_button: true, + show_headers: false, }; IriSP.Widgets.CurrentSegmentInfobox.prototype.template = @@ -39,16 +40,19 @@ IriSP.Widgets.CurrentSegmentInfobox.prototype.editTemplate = '
' + + '{{#headers}}
{{fields_header}}
{{/headers}}' + '' + '
{{cancel}}
' + '
{{submit}}
' + '' + '
' + + '{{#headers}}
{{tags_header}}
{{/headers}}' + '{{#new_tag_button}}' + '
{{new_tag}}
' + '{{/new_tag_button}}' + '{{^new_tag_button}}' + '' + + '
+
' + '{{/new_tag_button}}' + '{{#tags.length}}' + '