Skip to content

Commit

Permalink
Merge branch 'jbrowse_1.7' of github.com:berkeleybop/jbrowse into jbr…
Browse files Browse the repository at this point in the history
…owse_1.7
  • Loading branch information
GREGG HELT authored and GREGG HELT committed Nov 16, 2012
2 parents c486515 + 7bc7fcc commit e1ff062
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 110 deletions.
1 change: 1 addition & 0 deletions genome.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import url("src/dojo/resources/dojo.css");

@import url("main.css");
@import url("menubar.css");
@import url("icons.css");

/* CSS styles for the various types of feature glyphs */
Expand Down
99 changes: 0 additions & 99 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,105 +28,6 @@ fieldset > legend {
color: #aaa;
}

/* styles for the top menu bar */
div.menuBar {
padding: 1px 0;
height: 25px;
}
.tundra .menuBar {
background: #396494;
text-align: right;
}
.tundra .menuBar a {
color: white;
}
div.topLink {
position: absolute;
right: 0;
top: 0;
z-index: 50;
background: white;
border: 1px solid #888;
border-width: 0 0 1px 1px;
}
div.menuBar a, .topLink a {
padding: 0 0.8ex;
text-decoration: none;
}
.menuBar .powered_by {
float: left;
font-size: 125%;
font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
font-weight: bold;
line-height: 25px; /* note this line-height should be the same as the fixed height of the menuBar */
}

.share .icon {
height: 8px;
width: 19px;
display: inline;
display: inline-block;
background: url("img/glyphs_white.png") no-repeat -149px -91px;
margin-right: 2px;
margin-top: -2px;
}
a.topLink, a.topLink * {
cursor: pointer;
}
.topLink .powered_by {
padding: 0 0.5em;
color: black;
text-decoration: none;
}
.help .icon {
height: 14px;
width: 8px;
display: inline-block;
margin-top: -4px;
margin-right: 1px;
background: url("img/glyphs_white.png") no-repeat -174px -3px;
}
.tundra .menuBar * {
outline: none;
}

.tundra .menuBar .dijitButtonNode {
background: transparent;
}

.menuBar .topLink,
.tundra .menuBar .dijitButtonNode {
border: 2px outset rgba( 120, 120, 120, 0.2 );
}
.menuBar .topLink:hover,
.tundra .menuBar .dijitButtonHover .dijitButtonNode,
.tundra .menuBar .dijitDropDownButtonHover .dijitButtonNode {
background: rgba( 255, 255, 255, 0.07 );
}
.menuBar .topLink:active,
.tundra .menuBar .dijitButtonActive .dijitButtonNode,
.tundra .menuBar .dijitDropDownButtonActive .dijitButtonNode {
border: 2px inset rgba( 120, 120, 120, 0.2 );
}

.menuBar .dijitButtonNode {
padding: 0 1em;
}

.menuBar .dijitButtonNode * {
color: white;
}
.menuBar .config .icon {
height: 16px;
width: 16px;
margin-right: 2px;
margin-top: -2px;
display: inline;
display: inline-block;
background: url("img/glyphs_white.png") no-repeat -168px -27px;
}


.tundra .dijitDialogCloseIcon {
height: 25px;
width: 25px;
Expand Down
124 changes: 124 additions & 0 deletions menubar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/* styles for the top menu bar */
div.menuBar {
padding: 1px 0;
height: 25px;
}
.tundra .menuBar {
background: #396494;
text-align: right;
}
.tundra .menuBar a {
color: white;
}
div.topLink {
position: absolute;
right: 0;
top: 0;
z-index: 50;
background: white;
border: 1px solid #888;
border-width: 0 0 1px 1px;
}
div.menuBar a, .topLink a {
padding: 0 0.8ex;
text-decoration: none;
}
.menuBar .powered_by {
float: left;
font-size: 125%;
font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
font-weight: bold;
line-height: 25px; /* note this line-height should be the same as the fixed height of the menuBar */
}

.share .icon {
height: 8px;
width: 19px;
display: inline;
display: inline-block;
background: url("img/glyphs_white.png") no-repeat -149px -91px;
margin-right: 2px;
margin-top: -2px;
}
a.topLink, a.topLink * {
cursor: pointer;
}
.topLink .powered_by {
padding: 0 0.5em;
color: black;
text-decoration: none;
}
.help .icon {
height: 14px;
width: 8px;
display: inline-block;
margin-top: -4px;
margin-right: 1px;
background: url("img/glyphs_white.png") no-repeat -174px -3px;
}
.menuBar * {
outline: none;
}
.tundra .menuBar .dijitButtonNode {
background: transparent;
}

.tundra .menuBar .dijitButtonNode {
border: 2px outset rgba( 120, 120, 120, 0.2 );
}
.tundra .menuBar .dijitButtonHover .dijitButtonNode,
.tundra .menuBar .dijitDropDownButtonHover .dijitButtonNode {
background: rgba( 255, 255, 255, 0.07 );
}
.tundra .menuBar .dijitButtonActive .dijitButtonNode,
.tundra .menuBar .dijitDropDownButtonActive .dijitButtonNode {
border: 2px inset rgba( 120, 120, 120, 0.2 );
}

.menuBar .dijitButtonNode {
padding: 0 1em;
}

.menuBar .dijitButtonNode * {
color: white;
}
.menuBar .config .icon {
height: 16px;
width: 16px;
margin-right: 2px;
margin-top: -2px;
display: inline;
display: inline-block;
background: url("img/glyphs_white.png") no-repeat -168px -27px;

}


.menuBar > .menu {
float: left;
font-size: 120%;
}
.tundra .globalMenu .dijitMenuItem td {
padding: 0.5em 2px 0.5em 5px;
}

.tundra .menuBar > .menu .dijitButtonNode {
border: none;
}
.tundra .menuBar > .menu.dijitDropDownButton,
.tundra .menuBar > .menu.dijitDropDownButton * {
margin: 0;
padding: 0;
line-height: 25px;
}
.tundra .menuBar > .menu.dijitDropDownButton .dijitButtonNode {
padding: 0 1em 0 0.7em;
text-align: left;
}

.tundra .menuBar > .menu .dijitDropDownButtonHover .dijitButtonNode {
background: rgba( 255, 255, 255, 0.07 );
}
.tundra .menuBar > .menu .dijitDropDownButtonActive .dijitButtonNode {
border: none;
}
2 changes: 1 addition & 1 deletion plugins/WebApollo/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ return declare( JBPlugin,
}
});

browser.addGlobalConfigMenuItem( cds_frame_toggle );
browser.addGlobalMenuItem( 'options', cds_frame_toggle );
}
});

Expand Down
44 changes: 34 additions & 10 deletions src/JBrowse/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ define( [
'dijit/form/Select',
'dijit/form/DropDownButton',
'dijit/DropDownMenu',
'dijit/MenuItem',
'JBrowse/Util',
'JBrowse/Store/LazyTrie',
'JBrowse/Store/Autocomplete',
Expand All @@ -38,6 +39,7 @@ define( [
dijitSelectBox,
dijitDropDownButton,
dijitDropDownMenu,
dijitMenuItem,
Util,
LazyTrie,
AutocompleteStore,
Expand Down Expand Up @@ -324,18 +326,36 @@ Browser.prototype.initView = function() {
}, menuBar );

if( this.config.show_nav ) {
var configMenu = this.makeGlobalConfigMenu();

// this.addGlobalMenuItem( 'file',
// new dijitMenuItem(
// {
// label: 'Open',
// onClick: function() { alert('open sesame!'); }
// })
// );
// var fileMenu = this.makeGlobalMenu('file');
// if( fileMenu ) {
// var fileButton = new dijitDropDownButton(
// { className: 'file',
// innerHTML: 'File',
// //title: '',
// dropDown: fileMenu
// });
// dojo.addClass( fileButton.domNode, 'menu' );
// menuBar.appendChild( fileButton.domNode );
// }

var configMenu = this.makeGlobalMenu('options');
if( configMenu ) {
var configLink = new dijitDropDownButton(
{ className: 'config',
innerHTML: '<span class="icon"></span> Config',
innerHTML: '<span class="icon"></span> Options',
title: 'configure JBrowse',
dropDown: configMenu
});
menuBar.appendChild( configLink.domNode );


}
}
}

if( this.config.show_nav && this.config.show_tracklist && this.config.show_overview )
Expand Down Expand Up @@ -422,22 +442,26 @@ Browser.prototype.initView = function() {
};


Browser.prototype.makeGlobalConfigMenu = function( item ) {
var items = this._globalConfigMenuItems || [];
Browser.prototype.makeGlobalMenu = function( menuName ) {
var items = ( this._globalMenuItems || {} )[menuName] || [];
if( ! items.length )
return null;

var menu = new dijitDropDownMenu({ leftClickToOpen: true });
dojo.forEach( items, function( item ) {
menu.addChild( item );
});
dojo.addClass( menu.domNode, 'globalMenu' );
menu.startup();
return menu;
};

Browser.prototype.addGlobalConfigMenuItem = function( item ) {
this._globalConfigMenuItems = this._globalConfigMenuItems || [];
this._globalConfigMenuItems.push( item );
Browser.prototype.addGlobalMenuItem = function( menuName, item ) {
if( ! this._globalMenuItems )
this._globalMenuItems = {};
if( ! this._globalMenuItems[ menuName ] )
this._globalMenuItems[ menuName ] = [];
this._globalMenuItems[ menuName ].push( item );
};

/**
Expand Down
2 changes: 2 additions & 0 deletions src/JBrowse/View/Export/GFF3.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ return declare( ExportBase,
var valtype = typeof val;
if( valtype == 'boolean' )
val = val ? 1 : 0;
else if( valtype == 'undefined' )
return;
tag = this._gff3_reserved_attribute(tag) || this._ensure_non_reserved( tag );
attrs[tag] = val;
},this);
Expand Down

0 comments on commit e1ff062

Please sign in to comment.