Skip to content

Commit

Permalink
Fix margin handling
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Jul 21, 2016
1 parent 4781aaf commit 31a8dbf
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
10 changes: 6 additions & 4 deletions client/galaxy/scripts/mvc/ui/ui-buttons.js
Expand Up @@ -16,7 +16,6 @@ define( [ 'utils/utils' ], function( Utils ) {
}).set( options );
this.setElement( $( '<button/>' ).attr( 'type', 'button' )
.append( this.$icon = $( '<i/>' ) )
.append( '&nbsp;' )
.append( this.$title = $( '<span/>' ) ) );
this.listenTo( this.model, 'change', this.render, this );
this.render();
Expand All @@ -38,6 +37,7 @@ define( [ 'utils/utils' ], function( Utils ) {
.tooltip( { title: options.tooltip, placement: 'bottom' } );
this.$icon.removeClass().addClass( 'icon fa' ).addClass( options.icon );
this.$title.removeClass().addClass( 'title' ).html( options.title );
options.icon && options.title && this.$icon.addClass( 'ui-margin-right' );
if ( options.wait ) {
this.$el.removeClass( options.cls ).addClass( options.wait_cls ).prop( 'disabled', true );
this.$icon.removeClass( options.icon ).addClass( 'fa-spinner fa-spin' );
Expand Down Expand Up @@ -134,7 +134,7 @@ define( [ 'utils/utils' ], function( Utils ) {
});
this.$title.html( options.title );
this.$icon.removeClass()
.addClass( 'icon fa' )
.addClass( 'icon fa ui-margin-right' )
.addClass( options.icons[ options.value ] );
},

Expand Down Expand Up @@ -188,7 +188,8 @@ define( [ 'utils/utils' ], function( Utils ) {
});
this.$button.addClass( 'button' ).tooltip( { title: options.tooltip, placement: 'bottom' } );
this.$icon.removeClass().addClass( 'icon fa' ).addClass( options.icon );
options.title && this.$title.addClass( 'title' ).html( options.title );
this.$title.addClass( 'title' ).html( options.title );
options.icon && options.title && this.$icon.addClass( 'ui-margin-right' );
}
});

Expand Down Expand Up @@ -235,7 +236,8 @@ define( [ 'utils/utils' ], function( Utils ) {
options.onclick && options.onclick();
} );
this.$icon.removeClass().addClass( 'icon fa' ).addClass( options.icon );
options.title && this.$title.removeClass().addClass( 'title' ).html( options.title );
this.$title.removeClass().addClass( 'title' ).html( options.title );
options.icon && options.title && this.$icon.addClass( 'ui-margin-right' );
},

/** Add a new menu item */
Expand Down
8 changes: 5 additions & 3 deletions client/galaxy/style/less/ui.less
Expand Up @@ -45,6 +45,10 @@
margin-bottom: @ui-margin-vertical !important;
}

.ui-margin-right {
margin-right: @ui-margin-vertical !important;
}

.ui-margin-both {
&:extend(ui-margin-top);
&:extend(ui-margin-bottom);
Expand Down Expand Up @@ -110,7 +114,7 @@

// buttons
.ui-button {
i {
.icon {
font-size: 1.1em;
}
}
Expand All @@ -131,14 +135,12 @@
.button {
margin-right: @ui-margin-horizontal;
margin-left: @ui-margin-horizontal;

.title {
position: relative;
font-size: 0.8em;
font-weight: normal;
top: -1px;
word-break:break-word;
margin-left: 5px;
}
}
.button.disabled {
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/ui/ui-buttons.js.map

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

4 changes: 2 additions & 2 deletions static/scripts/bundled/analysis.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

0 comments on commit 31a8dbf

Please sign in to comment.