Skip to content

Commit

Permalink
replace vanilla data grid with Enhanced grid that has checkbox selection
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed May 4, 2012
1 parent 6b91fe8 commit 434927a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
13 changes: 13 additions & 0 deletions faceted_track_selector.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* Dojo and Dijit stuff */

@import url("jslib/dijit/themes/tundra/tundra.css");
@import url("jslib/dojox/grid/resources/Grid.css");
@import url("jslib/dojox/grid/resources/tundraGrid.css");
@import url("jslib/dojox/grid/enhanced/resources/tundra/EnhancedGrid.css");

.dojoxGrid table {
margin: 0;
}

/* JBrowse stuff */

#faceted_tracksel {
font-size: 130%;
background: #c7dbf1;
Expand Down
7 changes: 0 additions & 7 deletions genome.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,3 @@
/* CSS styles for the various types of feature glyphs */
@import url("feature_styles.css");
@import url("faceted_track_selector.css");

@import url("jslib/dojox/grid/resources/Grid.css");
@import url("jslib/dojox/grid/resources/tundraGrid.css");

.dojoxGrid table {
margin: 0;
}
14 changes: 9 additions & 5 deletions js/View/TrackList/Faceted.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
* @constructs
*/
constructor: function(args) {
dojo.require('dojox.grid.DataGrid');
dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dojo.store.Memory');
dojo.require('dojox.grid.EnhancedGrid');
dojo.require('dojox.grid.enhanced.plugins.IndirectSelection');
dojo.require('dijit.layout.AccordionContainer');
dojo.require('dijit.layout.AccordionPane');

Expand Down Expand Up @@ -54,15 +53,20 @@ dojo.declare( 'JBrowse.View.TrackList.Faceted', null,
renderGrid: function() {
// make a data grid that will hold the search results
var facets = this.trackDataStore.getFacets();
this.dataGrid = new dojox.grid.DataGrid({
this.dataGrid = new dojox.grid.EnhancedGrid({
id: 'trackSelectGrid',
region: 'center',
store: this.trackDataStore,
structure: [
dojo.map( facets, function(facetName) {
return {'name': Util.ucFirst(facetName), 'field': facetName, 'width': '100px'};
})
]
],
plugins: {
indirectSelection: {
headerSelector: true
}
}
}
);
this.mainContainer.addChild( this.dataGrid );
Expand Down

0 comments on commit 434927a

Please sign in to comment.