Skip to content

Commit

Permalink
Addressing issue 2747
Browse files Browse the repository at this point in the history
  • Loading branch information
sszakony committed Aug 17, 2016
1 parent 5cc3613 commit 050a3f2
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 26 deletions.
9 changes: 6 additions & 3 deletions client/galaxy/scripts/layout/menu.js
Expand Up @@ -191,13 +191,15 @@ var Collection = Backbone.Collection.extend({
menu : [{
title : 'Login',
url : 'user/login',
target : 'galaxy_main'
target : 'galaxy_main',
noscratchbook : true
}]
};
options.allow_user_creation && userTab.menu.push({
title : 'Register',
url : 'user/create',
target : 'galaxy_main'
target : 'galaxy_main',
noscratchbook : true
});
this.add( userTab );
} else {
Expand Down Expand Up @@ -319,7 +321,8 @@ var Tab = Backbone.View.extend({
options = _.defaults( options || {}, {
title : '',
url : '',
target : '_parent'
target : '_parent',
noscratchbook : false
});
options.url = self._formatUrl( options.url );
return $( '<li/>' ).append(
Expand Down
4 changes: 2 additions & 2 deletions client/galaxy/scripts/layout/scratchbook.js
Expand Up @@ -171,7 +171,7 @@ return Backbone.View.extend({
window.open( options.url );
} else if ( options.target == '_top' || options.target == '_parent' || options.target == '_self' ) {
window.location = options.url;
} else if ( !this.active ) {
} else if ( !this.active || options.noscratchbook ) {
var $galaxy_main = $( window.parent.document ).find( '#galaxy_main' );
if ( options.target == 'galaxy_main' || options.target == 'center' ) {
if ( $galaxy_main.length === 0 ) {
Expand All @@ -187,4 +187,4 @@ return Backbone.View.extend({
}
});

});
});
2 changes: 1 addition & 1 deletion static/maps/layout/menu.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 050a3f2

Please sign in to comment.