Skip to content

Commit

Permalink
Remove unused history div, use reduce to calculate available screen s…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
guerler committed Jul 24, 2016
1 parent 95949c6 commit 788a985
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions client/galaxy/scripts/mvc/tool/tool-form-composite.js
Expand Up @@ -10,7 +10,6 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'
this.setElement( $( '<div/>' ).addClass( 'ui-form-composite' )
.append( this.$message = $( '<div/>' ) )
.append( this.$header = $( '<div/>' ) )
.append( this.$history = $( '<div/>' ) )
.append( this.$steps = $( '<div/>' ) ) );
$( 'body' ).append( this.$el );
this._configure();
Expand All @@ -22,12 +21,9 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'

/** Refresh height of scrollable div below header */
_refresh: function() {
var margin = 0;
var children = this.$el.children();
for ( var i = 0; i < children.length; i++ ) {
margin += $( children[ i ] ).outerHeight();
}
margin -= this.$steps.height() - 30;
var margin = _.reduce( this.$el.children(), function( memo, child ) {
return memo + $( child ).outerHeight();
}, 0 ) - this.$steps.height() - 30;
this.$steps.css( 'height', $( window ).height() - margin );
},

Expand Down

0 comments on commit 788a985

Please sign in to comment.