-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(interval omr search): add frontend components for interval search
- Adds interval search to the OMRSearchProvider - Creates front-end helpers for entering interval search
- Loading branch information
Showing
4 changed files
with
99 additions
and
8 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
nginx/public/node/frontend/public/js/app/search/omr-search/IntervalChoiceView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Marionette from 'marionette'; | ||
|
||
import template from './interval-choice-list.template.html'; | ||
|
||
export default Marionette.CompositeView.extend({ | ||
template, | ||
|
||
events: { | ||
'click [data-search-value]': 'onChoiceClicked' | ||
}, | ||
|
||
onChoiceClicked: function (event) | ||
{ | ||
this.trigger('use:interval', $(event.target).attr('data-search-value')); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
nginx/public/node/frontend/public/js/app/search/omr-search/contour-choice-list.template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<div class="text-center"> | ||
<div class="btn-group" role="group"> | ||
<button class="btn btn-default" data-search-value="u">Up</button> | ||
<button class="btn btn-default" data-search-value="d">Down</button> | ||
<button class="btn btn-default" data-search-value="r">Repeat</button> | ||
<button class="btn btn-default" data-search-value="u">Up</button> | ||
<button class="btn btn-default" data-search-value="d">Down</button> | ||
<button class="btn btn-default" data-search-value="r">Repeat</button> | ||
</div> | ||
</div> |
67 changes: 67 additions & 0 deletions
67
...x/public/node/frontend/public/js/app/search/omr-search/interval-choice-list.template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<div class="btn-group" role="group"> | ||
<div class="btn-group" role="group"> | ||
<button type="button" | ||
class="btn btn-default btn-sm dropdown-toggle" | ||
data-toggle="dropdown" | ||
aria-haspopup="true" | ||
aria-expanded="false"> | ||
5<sup>th</sup><span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li> | ||
<a href="#" data-search-value="d5">5<sup>th</sup></a> | ||
</li> | ||
<li> | ||
<a href="#" data-search-value="d6">6<sup>th</sup></a> | ||
</li> | ||
<li> | ||
<a href="#" data-search-value="d7">7<sup>th</sup></a> | ||
</li> | ||
<li> | ||
<a href="#" data-search-value="d8">8<sup>ve</sup></a> | ||
</li> | ||
</ul> | ||
</div> | ||
<button class="btn btn-default btn-sm" data-search-value="d4"> | ||
4<sup>th</sup> | ||
</button> | ||
<button class="btn btn-default btn-sm" data-search-value="d3"> | ||
3<sup>rd</sup> | ||
</button> | ||
<button class="btn btn-default btn-sm" data-search-value="d2"> | ||
2<sup>nd</sup> | ||
</button> | ||
<button class="btn btn-default btn-sm" data-search-value="r">U</button> | ||
<button class="btn btn-default btn-sm" data-search-value="u2"> | ||
2<sup>nd</sup> | ||
</button> | ||
<button class="btn btn-default btn-sm" data-search-value="d3"> | ||
3<sup>rd</sup> | ||
</button> | ||
<button class="btn btn-default btn-sm" data-search-value="u4"> | ||
4<sup>th</sup> | ||
</button> | ||
<div class="btn-group" role="group"> | ||
<button type="button" | ||
class="btn btn-default btn-sm dropdown-toggle" | ||
data-toggle="dropdown" | ||
aria-haspopup="true" | ||
aria-expanded="false"> | ||
5<sup>th</sup><span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li> | ||
<a href="#" data-search-value="u5">5<sup>th</sup></a> | ||
</li> | ||
<li> | ||
<a href="#" data-search-value="u6">6<sup>th</sup></a> | ||
</li> | ||
<li> | ||
<a href="#" data-search-value="u7">7<sup>th</sup></a> | ||
</li> | ||
<li> | ||
<a href="#" data-search-value="u8">8<sup>ve</sup></a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> |