Skip to content

Commit

Permalink
Unify labels and tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Sep 9, 2016
1 parent cf9db96 commit a88942b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
Expand Up @@ -90,7 +90,7 @@ define( [ 'utils/utils', 'mvc/visualization/visualization-model' ], function( Ut
this.trigger( 'redraw' );
return true;
}
console.debug( 'model::load() - Chart attributes unavailable.' );
console.debug( 'model::load() - Visualization attributes unavailable.' );
return false;
}
});
Expand Down
Expand Up @@ -45,7 +45,7 @@ define( [ 'libs/underscore' ], function( _ ) {
} catch ( err ) {
console.debug( 'FAILED - screenshot::_canvas2png() - ' + err );
if (options.error) {
options.error( 'Please reduce your chart to a single panel and try again.' );
options.error( 'Please reduce your visualization to a single panel and try again.' );
}
}
};
Expand Down Expand Up @@ -78,7 +78,7 @@ define( [ 'libs/underscore' ], function( _ ) {
function createPDF( options ) {
var xml = toXML( options );
var data = {
filename : name || 'chart',
filename : 'visualization',
type : 'application/pdf',
height : xml.height,
width : xml.width,
Expand Down Expand Up @@ -117,7 +117,7 @@ define( [ 'libs/underscore' ], function( _ ) {
var $svg = options.$el.find( 'svg' );
if ( $svg.length == 0 ) {
if ( options.error ) {
options.error( 'No SVG found. This chart type does not support SVG/PDF export.' );
options.error( 'No SVG found. This visualization type does not support SVG/PDF export.' );
return;
}
}
Expand Down
18 changes: 9 additions & 9 deletions config/plugins/visualizations/charts/static/views/editor.js
Expand Up @@ -43,15 +43,15 @@ define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils'
self.tabs.hideTab( 'groups' );
self.portlet.hideOperation( 'draw' );
console.debug( 'editor::onchange() - Chart type not found.' );
self.message.update( { message: 'The requested chart type could not be found. Please select a new type from below or contact us.', status: 'danger', persistent: true } );
self.message.update( { message: 'The requested visualization type could not be found. Please select a new type from below or contact us.', status: 'danger', persistent: true } );
} else {
self.tabs.showTab( 'settings' );
self.tabs.showTab( 'groups' );
self.portlet.showOperation( 'draw' );
self.chart.definition = chart_definition;
self.chart.set( { type : chart_type, modified : true } );
self.message.model.set( 'message', '' );
console.debug( 'editor::onchange() - Switched chart type.' );
console.debug( 'editor::onchange() - Switched visualization type.' );
}
},
ondblclick : function( chart_id ) {
Expand All @@ -73,25 +73,25 @@ define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils'
id : 'main',
title : 'Start',
icon : 'fa fa-bars',
tooltip : 'Start by selecting a chart type.',
$el : $( '<div/>' ).append( ( new Ui.Label( { title : 'Provide a chart title:' } ).$el ) )
tooltip : 'Start by selecting a visualization.',
$el : $( '<div/>' ).append( ( new Ui.Label( { title : 'Provide a title:' } ).$el ) )
.append( this.title.$el )
.append( $( '<div/>' ).addClass( 'ui-form-info ui-margin-bottom' ).html( 'This title will appear in the list of \'Saved Visualizations\'.' ) )
.append( ( new Ui.Label( { title : 'Select a chart type:' } ).$el.addClass( 'ui-margin-top' ) ) )
.append( ( new Ui.Label( { title : 'Select a visualization:' } ).$el.addClass( 'ui-margin-top' ) ) )
.append( this.types.$el )
});
this.tabs.add({
id : 'settings',
title : 'Customize',
icon : 'fa-gear',
tooltip : 'Customize chart options.',
tooltip : 'Customize the visualization.',
$el : ( new SettingsView( this.app ) ).$el
});
this.tabs.add({
id : 'groups',
title : 'Select data',
icon : 'fa-database',
tooltip : 'Specify your data options.',
tooltip : 'Specify data options.',
$el : ( new GroupsView( this.app ) ).$el
});

Expand Down Expand Up @@ -135,7 +135,7 @@ define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils'
date : Utils.time()
});
if ( this.chart.groups.length == 0 ) {
this.message.update( { message: 'Please specify data options before drawing the chart.', persistent: false } );
this.message.update( { message: 'Please specify data options before rendering the visualization.', persistent: false } );
this.tabs.show( 'groups' );
return;
}
Expand All @@ -145,7 +145,7 @@ define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils'
if ( valid ) {
_.each( group.get( '__data_columns' ), function( data_columns, name ) {
if ( group.attributes[ name ] === null ) {
self.message.update( { status: 'danger', message: 'This chart type requires column types not found in your tabular file.', persistent: false } );
self.message.update( { status: 'danger', message: 'This visualization type requires column types not found in your tabular file.', persistent: false } );
self.tabs.show( 'groups' );
valid = false;
}
Expand Down
Expand Up @@ -74,7 +74,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-
onnew : function() { self.chart.groups.add( { id : Utils.uid() } ) }
});
this.description = new Description( this.app );
this.message = new Ui.Message( { message : 'There are no options for this chart type.', persistent : true, status : 'info' } );
this.message = new Ui.Message( { message : 'There are no options for this visualization type.', persistent : true, status : 'info' } );
this.setElement( $( '<div/>' ).append( this.description.$el )
.append( this.repeat.$el.addClass( 'ui-margin-bottom' ) )
.append( this.message.$el.addClass( 'ui-margin-bottom' ) ) );
Expand Down
Expand Up @@ -6,7 +6,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-
this.app = app;
this.chart = app.chart;
this.description = new Description( this.app );
this.message = new Ui.Message( { message: 'There are no options for this chart type.', persistent: true, status: 'info' } );
this.message = new Ui.Message( { message: 'There are no options for this visualization type.', persistent: true, status: 'info' } );
this.setElement( $( '<div/>' ).append( this.description.$el )
.append( this.message.$el.addClass( 'ui-margin-bottom' ) )
.append( this.$form = $( '<div/>' ).addClass( 'ui-margin-bottom' ) ) );
Expand Down
14 changes: 7 additions & 7 deletions config/plugins/visualizations/charts/static/views/viewer.js
Expand Up @@ -11,7 +11,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'plugin/views/vi
this.export_button = new Ui.ButtonMenu({
icon : 'fa-camera',
title : 'Export',
tooltip : 'Export/Download visualization'
tooltip : 'Export/Download Visualization'
});
this.export_button.addMenu({
key : 'png',
Expand Down Expand Up @@ -51,7 +51,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'plugin/views/vi
icon : 'fa-file-o',
onclick : function() {
self.app.modal.show({
title : 'Send chart data for PDF creation',
title : 'Send visualization data for PDF creation',
body : 'Galaxy does not provide integrated PDF export scripts. You may click \'Continue\' to create the PDF by using a 3rd party service (https://export.highcharts.com).',
buttons : {
'Cancel' : function() { self.app.modal.hide() },
Expand All @@ -78,7 +78,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'plugin/views/vi
operations: {
edit_button: new Ui.ButtonIcon({
icon : 'fa-edit',
tooltip : 'Customize this chart',
tooltip : 'Customize this Visualization',
title : 'Editor',
onclick : function() {
self._wait( self.chart, function() {
Expand All @@ -89,11 +89,11 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'plugin/views/vi
export_button: this.export_button,
save_button: new Ui.ButtonIcon({
icon : 'fa-save',
tooltip : 'Save this chart',
tooltip : 'Save this Visualization',
title : 'Save',
onclick : function() {
self.message.update( { message: 'Saving chart \'' + self.chart.get( 'title' ) + '\'. It will appear in the list of \'Saved Visualizations\'.', status: 'success' } );
self.chart.save( { error : function() { self.message.update( { message: 'Could not save chart.', status: 'danger' } ) } } );
self.message.update( { message: 'Saving \'' + self.chart.get( 'title' ) + '\'. It will appear in the list of \'Saved Visualizations\'.', status: 'success' } );
self.chart.save( { error : function() { self.message.update( { message: 'Could not save visualization.', status: 'danger' } ) } } );
}
})
}
Expand Down Expand Up @@ -130,7 +130,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'plugin/views/vi
if ( this.app.deferred.ready() ) {
callback();
} else {
this.message.update( { message: 'Your chart is currently being processed. Please wait and try again.' } );
this.message.update( { message: 'Your visualization is currently being processed. Please wait and try again.' } );
}
}
});
Expand Down

0 comments on commit a88942b

Please sign in to comment.