Skip to content

Commit

Permalink
ditch the dojo dialog, make the track selector full screen. still hav…
Browse files Browse the repository at this point in the history
…ing lots of trouble getting the dojo grid control to behave well w.r.t scroll bars and window resizing
  • Loading branch information
rbuels committed May 4, 2012
1 parent c701171 commit 2dea6fb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 32 deletions.
7 changes: 4 additions & 3 deletions faceted_track_selector.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* #faceted_tracksel { */
/* font-size: 130%; */
/* } */
#faceted_tracksel {
font-size: 130%;
background: white;
}

/* #faceted_tracksel .facetName, */
/* #faceted_tracksel label { */
Expand Down
48 changes: 19 additions & 29 deletions js/View/TrackList/Faceted.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,23 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
},

render: function() {
this.dialog = new dijit.Dialog({
id: "faceted_tracksel",
refocus: false,
draggable: false,
resizable: true,
title: "Track Selection"
});

var div = dojo.create( 'div', {
this.containerElem = dojo.create( 'div', {
id: 'faceted_tracksel',
style: {
height: document.body.clientHeight + 'px',
width: document.body.clientWidth + 'px'
position: 'fixed',
top: '0',
left: '0',
height: '100%',
width: '100%',
zIndex: -1000,
opacity: 0
}
}, this.dialog.containerNode );
},
document.body );

this.mainContainer = new dijit.layout.BorderContainer(
{ design: 'sidebar' },
div
this.containerElem
);
this.renderTextFilter();
this.renderFacetSelectors();
Expand All @@ -47,13 +46,6 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
},

renderGrid: function() {
var gridPane = new dijit.layout.ContentPane(
{
region: 'center',
// style: { height: document.body.clientHeight * 0.6 + 'px' }
}
);
this.mainContainer.addChild( gridPane );
// make a data grid that will hold the search results
var facets = this.trackDataStore.getFacets();
this.dataGrid = new dojox.grid.DataGrid({
Expand All @@ -64,14 +56,10 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
dojo.map( facets, function(facetName) {
return {'name': Util.ucFirst(facetName), 'field': facetName, 'width': '100px'};
})
],
autoHeight: true,
style: {
width: (20+facets.length * 100) + 'px'
}
},
gridPane.containerNode
]
}
);
this.mainContainer.addChild( this.dataGrid );
},

renderTextFilter: function() {
Expand Down Expand Up @@ -193,15 +181,17 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
* Make the track selector visible.
*/
show: function() {
this.dialog.show();
this.containerElem.style.opacity = 1.0;
this.containerElem.style.zIndex = 10000;
this.shown = true;
},

/**
* Make the track selector invisible.
*/
hide: function() {
this.dialog.hide();
this.containerElem.style.opacity = 0;
this.containerElem.style.zIndex = -1000;
this.shown = false;
},

Expand Down

0 comments on commit 2dea6fb

Please sign in to comment.