Skip to content

Commit

Permalink
add an additional "back to browser" button next to the "clear all fil…
Browse files Browse the repository at this point in the history
…ters" button as a way to close the tray selector that is easier to reach
  • Loading branch information
rbuels committed May 14, 2012
1 parent c6f487b commit b66e57a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 8 additions & 0 deletions faceted_track_selector.css
Expand Up @@ -45,6 +45,14 @@
#faceted_tracksel .gridPane .gridControls button {
height: 2.2em;
margin: 4px;
white-space: nowrap;
}
#faceted_tracksel .gridPane .gridControls button * {
display: inline-block;
vertical-align: middle;
}
#faceted_tracksel .gridPane .gridControls button img {
padding: 3px 0.4em 0 0;
}

#faceted_tracksel label.textFilterControl {
Expand Down
12 changes: 9 additions & 3 deletions js/View/TrackList/Faceted.js
Expand Up @@ -199,10 +199,16 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
{ region: 'top',
"class": 'gridControls',
content: [
dojo.create( 'button', {
className: 'faceted_tracksel_on_off',
innerHTML: '<img src="img/left_arrow.png"> <div>Back to browser</div>',
onclick: dojo.hitch( this, 'hide' )
}
),
dojo.create( 'button', {
className: 'clear_filters',
innerHTML:'<img style="position: relative; bottom: -3px;" src="img/red_x.png">'
+ ' Clear All Filters',
innerHTML:'<img src="img/red_x.png">'
+ '<div>Clear All Filters</div>',
onclick: dojo.hitch( this, function(evt) {
this.textFilterInput.value = '';
this._clearAllFacetControls();
Expand Down Expand Up @@ -316,7 +322,7 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
this.textFilterInput = dojo.create(
'input',
{ type: 'text',
size: 50,
size: 40,
disabled: true, // disabled until shown
onkeypress: dojo.hitch( this, function(evt) {
if( evt.keyCode == dojo.keys.SHIFT || evt.keyCode == dojo.keys.CTRL || evt.keyCode == dojo.keys.ALT )
Expand Down

0 comments on commit b66e57a

Please sign in to comment.