1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/7e21bdbbdb8f/ changeset: r5402:7e21bdbbdb8f user: jgoecks date: 2011-04-15 15:42:55 summary: Trackster visual analytics: set initial parameter values properly. affected #: 2 files (260 bytes) --- a/lib/galaxy/visualization/tracks/visual_analytics.py Fri Apr 15 09:35:41 2011 -0400 +++ b/lib/galaxy/visualization/tracks/visual_analytics.py Fri Apr 15 09:42:55 2011 -0400 @@ -42,6 +42,7 @@ tool_params.append( param_dict ) elif type( input ) == SelectToolParameter and type( input.options ) != DynamicOptions: tool_params.append( { 'name' : name, 'label' : input.label, 'type' : 'select', \ + 'value' : tool_param_values.get( name, None ), \ 'html' : urllib.quote( input.get_html() ) } ) # If tool has parameters that can be interactively modified, return tool. --- a/static/scripts/trackster.js Fri Apr 15 09:35:41 2011 -0400 +++ b/static/scripts/trackster.js Fri Apr 15 09:42:55 2011 -0400 @@ -846,13 +846,14 @@ name = param_dict.name, label = param_dict.label, html = unescape(param_dict.html), + value = param_dict.value, type = param_dict.type; if (type === "number") { this.params[this.params.length] = - new NumberParameter(name, label, html, param_dict.min, param_dict.max); + new NumberParameter(name, label, html, value, param_dict.min, param_dict.max); } else if (type == "select") { - this.params[this.params.length] = new ToolParameter(name, label, html); + this.params[this.params.length] = new ToolParameter(name, label, html, value); } else { console.log("WARNING: unrecognized tool parameter type:", name, type); @@ -881,6 +882,8 @@ // Param HTML. // TODO: either generalize .slider CSS attributes or create new rule for tool input div. var html_div = $("<div/>").addClass("slider").html(param.html).appendTo(param_div); + // Set initial value. + html_div.find(":input").val(param.value); // Add to clear floating layout. $("<div style='clear: both;'/>").appendTo(param_div); @@ -990,14 +993,15 @@ /** * Tool parameters. */ -var ToolParameter = function(name, label, html) { +var ToolParameter = function(name, label, html, value) { this.name = name; this.label = label; this.html = html; + this.value = value; }; -var NumberParameter = function(name, label, html, min, max) { - ToolParameter.call(this, name, label, html) +var NumberParameter = function(name, label, html, value, min, max) { + ToolParameter.call(this, name, label, html, value) this.min = min; this.max = max; }; 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.