1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/8cd9f0ce9132/ changeset: 8cd9f0ce9132 user: jgoecks date: 2012-06-27 18:12:43 summary: Add tipsy config to icon buttons and add tipsy to paramamonster. affected #: 3 files diff -r 27f54f28e9f1542e9681b8a4c238d856be7b9a34 -r 8cd9f0ce913260795ee749536face3bd54f1bc62 static/scripts/mvc/ui.js --- a/static/scripts/mvc/ui.js +++ b/static/scripts/mvc/ui.js @@ -8,10 +8,14 @@ * defines an icon button. Each dictionary must have the following * elements: icon_class, title, and on_click. */ -var create_icon_buttons_menu = function(config) { +var create_icon_buttons_menu = function(config, global_config) { + if (!global_config) { global_config = {}; } + // Create and initialize menu. var buttons = new IconButtonCollection( - _.map(config, function(button_config) { return new IconButton(button_config); }) + _.map(config, function(button_config) { + return new IconButton(_.extend(button_config, global_config)); + }) ); return new IconButtonMenuView( {collection: buttons} ); @@ -38,7 +42,8 @@ defaults: { title: "", icon_class: "", - on_click: null + on_click: null, + tipsy_config: {} } }); @@ -60,12 +65,17 @@ var self = this; this.collection.each(function(button) { // Create and add icon button to menu. - $("<a/>").attr('href', 'javascript:void(0)') + var elt = + $('<a/>').attr('href', 'javascript:void(0)') .attr('title', button.attributes.title) .addClass('icon-button menu-button') .addClass(button.attributes.icon_class) .appendTo(self.$el) .click(button.attributes.on_click); + + if (button.attributes.tipsy_config) { + elt.tipsy(button.attributes.tipsy_config); + } }); return this; } diff -r 27f54f28e9f1542e9681b8a4c238d856be7b9a34 -r 8cd9f0ce913260795ee749536face3bd54f1bc62 static/scripts/viz/paramamonster.js --- a/static/scripts/viz/paramamonster.js +++ b/static/scripts/viz/paramamonster.js @@ -294,7 +294,8 @@ icon_class: 'gear track-settings', on_click: function () { settings_div.toggle(); - } + }, + tipsy_config: { gravity: 's' } } ]); settings_td.prepend(icon_menu.$el); @@ -390,7 +391,7 @@ var self = this, menu = create_icon_buttons_menu([ { - title: 'Add', + title: 'Add parameter to tree', icon_class: 'plus-button', on_click: function () { input.set('in_ptree', true); @@ -400,7 +401,7 @@ }, { - title: 'Remove', + title: 'Remove parameter from tree', icon_class: 'toggle', on_click: function() { // Remove parameter from tree params where name matches clicked paramter. @@ -409,7 +410,10 @@ single_input_row.show(); } } - ]); + ], + { + tipsy_config: {gravity: 's'} + }); this.$el.prepend(menu.$el); // Update input's min, max, number of samples as values change. diff -r 27f54f28e9f1542e9681b8a4c238d856be7b9a34 -r 8cd9f0ce913260795ee749536face3bd54f1bc62 templates/tracks/browser.mako --- a/templates/tracks/browser.mako +++ b/templates/tracks/browser.mako @@ -177,14 +177,14 @@ { icon_class: 'cross-circle', title: 'Close', on_click: function() { window.location = "${h.url_for( controller='visualization', action='list' )}"; } } - ]); + ], + { + tipsy_config: {gravity: 'n'} + }); menu.$el.attr("style", "float: right"); $("#center .unified-panel-header-inner").append(menu.$el); - // Manual tipsy config because default gravity is S and cannot be changed. - $(".menu-button").tipsy( {gravity: 'n'} ); - // Hide bookmarks by default right now. parent.force_right_panel("hide"); 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.