commit/galaxy-central: carlfeberhard: History panel: fix href/click fn collision in visualizations button
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/a06cdfe0a180/ Changeset: a06cdfe0a180 User: carlfeberhard Date: 2013-12-10 17:21:16 Summary: History panel: fix href/click fn collision in visualizations button Affected #: 1 file diff -r 9202b520908dd37a25fce0cf53b585df10b6b59e -r a06cdfe0a180c4c8aefaeb2bbc51d54ef7d64380 static/scripts/mvc/dataset/hda-edit.js --- a/static/scripts/mvc/dataset/hda-edit.js +++ b/static/scripts/mvc/dataset/hda-edit.js @@ -184,7 +184,6 @@ var $icon = faIconButton({ title : _l( 'Visualize' ), - href : this.urls.visualization, faIcon : 'fa-bar-chart-o' }); @@ -199,9 +198,8 @@ case 'scatterplot': return create_scatterplot_action_fn( visualization_url, params, hdaView.linkTarget ); default: - return function(){// add widget - Galaxy.frame.add( - { + return function(){ + Galaxy.frame.add({ title : "Visualization", type : "url", content : visualization_url + '/' + visualization + '?' + $.param( params ) @@ -210,16 +208,19 @@ } } + function titleCase( string ){ + return string.charAt( 0 ).toUpperCase() + string.slice( 1 ); + } + // No need for popup menu because there's a single visualization. if( visualizations.length === 1 ){ - $icon.attr( 'data-original-title', visualizations[0] ); + $icon.attr( 'data-original-title', _l( 'Visualize in ' ) + _l( titleCase( visualizations[0] ) ) ); $icon.click( create_viz_action( visualizations[0] ) ); // >1: Populate menu dict with visualization fns, make the popupmenu } else { _.each( visualizations, function( visualization ) { - var titleCaseVisualization = visualization.charAt( 0 ).toUpperCase() + visualization.slice( 1 ); - popup_menu_dict[ _l( titleCaseVisualization ) ] = create_viz_action( visualization ); + popup_menu_dict[ _l( titleCase( visualization ) ) ] = create_viz_action( visualization ); }); make_popupmenu( $icon, popup_menu_dict ); } Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org