1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d27e8692adad/ Changeset: d27e8692adad User: guerler Date: 2014-09-26 13:52:32+00:00 Summary: ToolForm: Fix boolean handling Affected #: 3 files diff -r 38f6cf2629efd071b4e7cc3e420a4e5081ad51e0 -r d27e8692adadf069e30d454cdb7a634526a6ba45 client/galaxy/scripts/mvc/tools/tools-tree.js --- a/client/galaxy/scripts/mvc/tools/tools-tree.js +++ b/client/galaxy/scripts/mvc/tools/tools-tree.js @@ -109,16 +109,6 @@ } } break; - // handle boolean input - case 'boolean': - var value = self.app.field_list[input.id].value(); - if (value === 'true') { - value = input.truevalue; - } else { - value = input.falsevalue; - } - add (job_input_id, input.id, value); - break; default: // handle default value add (job_input_id, input.id, self.app.field_list[input.id].value()); diff -r 38f6cf2629efd071b4e7cc3e420a4e5081ad51e0 -r d27e8692adadf069e30d454cdb7a634526a6ba45 static/scripts/mvc/tools/tools-tree.js --- a/static/scripts/mvc/tools/tools-tree.js +++ b/static/scripts/mvc/tools/tools-tree.js @@ -109,16 +109,6 @@ } } break; - // handle boolean input - case 'boolean': - var value = self.app.field_list[input.id].value(); - if (value === 'true') { - value = input.truevalue; - } else { - value = input.falsevalue; - } - add (job_input_id, input.id, value); - break; default: // handle default value add (job_input_id, input.id, self.app.field_list[input.id].value()); diff -r 38f6cf2629efd071b4e7cc3e420a4e5081ad51e0 -r d27e8692adadf069e30d454cdb7a634526a6ba45 static/scripts/packed/mvc/tools/tools-tree.js --- a/static/scripts/packed/mvc/tools/tools-tree.js +++ b/static/scripts/packed/mvc/tools/tools-tree.js @@ -1,1 +1,1 @@ -define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(){var a=this;this.job_def={};this.job_ids={};function c(f,e,d){a.job_def[f]=d;a.job_ids[f]=e}function b(j,m){for(var g in m){var e=m[g];if(e.input){var n=e.input;var h=j;if(j!=""){h+="|"}h+=n.name;switch(n.type){case"repeat":var d="section-";var q=[];var l=null;for(var p in e){var k=p.indexOf(d);if(k!=-1){k+=d.length;q.push(parseInt(p.substr(k)));if(!l){l=p.substr(0,k)}}}q.sort(function(r,i){return r-i});var g=0;for(var f in q){b(h+"_"+g++,e[l+q[f]])}break;case"conditional":var o=a.app.field_list[n.id].value();c(h+"|"+n.test_param.name,n.id,o);for(var f in n.cases){if(n.cases[f].value==o){b(h,m[n.id+"-section-"+f]);break}}break;case"boolean":var o=a.app.field_list[n.id].value();if(o==="true"){o=n.truevalue}else{o=n.falsevalue}c(h,n.id,o);break;default:c(h,n.id,a.app.field_list[n.id].value())}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchResponse:function(c){var a={};var b=this;function d(j,h){if(typeof h==="string"){var f=b.app.tree.job_ids[j];if(f){a[f]=h}}else{for(var g in h){var e=g;if(j!==""){e=j+"|"+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})}); \ No newline at end of file +define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(){var a=this;this.job_def={};this.job_ids={};function c(f,e,d){a.job_def[f]=d;a.job_ids[f]=e}function b(j,m){for(var g in m){var e=m[g];if(e.input){var n=e.input;var h=j;if(j!=""){h+="|"}h+=n.name;switch(n.type){case"repeat":var d="section-";var q=[];var l=null;for(var p in e){var k=p.indexOf(d);if(k!=-1){k+=d.length;q.push(parseInt(p.substr(k)));if(!l){l=p.substr(0,k)}}}q.sort(function(r,i){return r-i});var g=0;for(var f in q){b(h+"_"+g++,e[l+q[f]])}break;case"conditional":var o=a.app.field_list[n.id].value();c(h+"|"+n.test_param.name,n.id,o);for(var f in n.cases){if(n.cases[f].value==o){b(h,m[n.id+"-section-"+f]);break}}break;default:c(h,n.id,a.app.field_list[n.id].value())}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchResponse:function(c){var a={};var b=this;function d(j,h){if(typeof h==="string"){var f=b.app.tree.job_ids[j];if(f){a[f]=h}}else{for(var g in h){var e=g;if(j!==""){e=j+"|"+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})}); \ No newline at end of file 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.