Skip to content

Commit 9886bf9

Browse files
committed
Use classes instead of ids in annotation view (#448 #447)
1 parent 729d3b3 commit 9886bf9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: frontend/src/panel-annotation/annotation-template.hbs

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
{{#if itemSerial }}
5555
<section class="item-sections">
5656
<article class="item-section has-mt-10">
57-
<div class="item-section-header" id="btnRelItems">
57+
<div class="item-section-header btn-related">
5858
<p>{{#i18n 'button.related-items'}}Related items{{/i18n}}</p>
5959
<span
6060
class="icon is-large has-text-primary tooltip is-tooltip-left"
@@ -65,7 +65,7 @@
6565
</div>
6666
</article>
6767
<article class="item-section has-mt-10">
68-
<div class="item-section-header" id="btnAnnotations">
68+
<div class="item-section-header btn-annotations">
6969
<p>{{#if annotationSerial }}
7070
{{#i18n 'button.other-annotations'}}Other annotations{{/i18n}}
7171
{{else}}
@@ -80,7 +80,7 @@
8080
</div>
8181
</article>
8282
<article class="item-section has-mt-10">
83-
<div class="item-section-header" id="btnExtResources">
83+
<div class="item-section-header btn-external">
8484
<p>{{#i18n 'button.external-resources'}}External resources{{/i18n}}</p>
8585
<span
8686
class="icon is-large has-text-primary tooltip is-tooltip-left"
@@ -104,7 +104,7 @@
104104
{{#if annotationSerial }}
105105
<div class="level-right">
106106
<div class="level-item">
107-
<button id="btnNewAnnotation" type=button class="button btn-new">{{#i18n 'button.new'}}New{{/i18n}}</button>
107+
<button type=button class="button btn-new">{{#i18n 'button.new'}}New{{/i18n}}</button>
108108
</div>
109109
</div>
110110
{{/if}}

Diff for: frontend/src/panel-annotation/annotation-view.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ extend(AnnotationView.prototype, {
145145
selector: '.metadataContainer',
146146
}],
147147
events: {
148-
'click #btnRelItems': 'onRelItemsClicked',
149-
'click #btnAnnotations': 'onAnnotationsClicked',
150-
'click #btnExtResources': 'onExtResourcesClicked',
148+
'click .btn-related': 'onRelItemsClicked',
149+
'click .btn-annotations': 'onAnnotationsClicked',
150+
'click .btn-external': 'onExtResourcesClicked',
151151
'click .btn-edit': 'onEditClicked',
152-
'click #btnNewAnnotation': 'onNewClicked'
152+
'click .btn-new': 'onNewClicked'
153153
},
154154
});

0 commit comments

Comments
 (0)