commit/galaxy-central: 10 new changesets
10 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/563defcf9c83/ Changeset: 563defcf9c83 Branch: release_15.03 User: dan Date: 2015-02-26 22:16:55+00:00 Summary: Allow TabularToolDataTable to be loaded from a url instead of a path. Affected #: 1 file diff -r b046e38c21d140d9fdbba80fc1861cd6cf4e8352 -r 563defcf9c838cf11ac179890b2ca28b27c7fd1f lib/galaxy/tools/data/__init__.py --- a/lib/galaxy/tools/data/__init__.py +++ b/lib/galaxy/tools/data/__init__.py @@ -14,6 +14,8 @@ import hashlib from glob import glob +from tempfile import NamedTemporaryFile +from urllib2 import urlopen from galaxy import util from galaxy.util.odict import odict @@ -279,7 +281,22 @@ repo_info = None # Read every file for file_element in config_element.findall( 'file' ): - filename = file_path = expand_here_template( file_element.get( 'path', None ), here=self.here ) + tmp_file = None + filename = file_element.get( 'path', None ) + if filename is None: + # Handle URLs as files + filename = file_element.get( 'url', None ) + if filename: + tmp_file = NamedTemporaryFile( prefix='TTDT_URL_%s-' % self.name ) + try: + tmp_file.write( urlopen( filename ).read() ) + except Exception, e: + log.error( 'Error loading Data Table URL "%s": %s', filename, e ) + continue + log.debug( 'Loading Data Table URL "%s" as filename "%s".', filename, tmp_file.name ) + filename = tmp_file.name + tmp_file.flush() + filename = file_path = expand_here_template( filename, here=self.here ) found = False if file_path is None: log.debug( "Encountered a file element (%s) that does not contain a path value when loading tool data table '%s'.", util.xml_to_string( file_element ), self.name ) @@ -325,6 +342,9 @@ config_element=config_element, tool_shed_repository=repo_info, errors=errors ) else: log.debug( "Filename '%s' already exists in filenames (%s), not adding", filename, self.filenames.keys() ) + # Remove URL tmp file + if tmp_file is not None: + tmp_file.close() def merge_tool_data_table( self, other_table, allow_duplicates=True, persist=False, persist_on_error=False, entry_source=None, **kwd ): assert self.columns == other_table.columns, "Merging tabular data tables with non matching columns is not allowed: %s:%s != %s:%s" % ( self.name, self.columns, other_table.name, other_table.columns ) https://bitbucket.org/galaxy/galaxy-central/commits/c35498a73b41/ Changeset: c35498a73b41 Branch: release_15.03 User: guerler Date: 2015-02-27 06:30:48+00:00 Summary: ToolForm: Show initial validation errors on re-run Affected #: 3 files diff -r 563defcf9c838cf11ac179890b2ca28b27c7fd1f -r c35498a73b41c76446223123721f8a9c08bec03c client/galaxy/scripts/mvc/tools/tools-form.js --- a/client/galaxy/scripts/mvc/tools/tools-form.js +++ b/client/galaxy/scripts/mvc/tools/tools-form.js @@ -22,6 +22,7 @@ } }) } + options.initial_errors = options.job_id; ToolFormBase.prototype.initialize.call(this, options); }, diff -r 563defcf9c838cf11ac179890b2ca28b27c7fd1f -r c35498a73b41c76446223123721f8a9c08bec03c static/scripts/mvc/tools/tools-form.js --- a/static/scripts/mvc/tools/tools-form.js +++ b/static/scripts/mvc/tools/tools-form.js @@ -22,6 +22,7 @@ } }) } + options.initial_errors = options.job_id; ToolFormBase.prototype.initialize.call(this, options); }, diff -r 563defcf9c838cf11ac179890b2ca28b27c7fd1f -r c35498a73b41c76446223123721f8a9c08bec03c static/scripts/packed/mvc/tools/tools-form.js --- a/static/scripts/packed/mvc/tools/tools-form.js +++ b/static/scripts/packed/mvc/tools/tools-form.js @@ -1,1 +1,1 @@ -define(["utils/utils","mvc/ui/ui-misc","mvc/tools/tools-form-base","mvc/tools/tools-jobs"],function(c,e,b,a){var d=b.extend({initialize:function(g){var f=this;this.job_handler=new a(this);this.buttons={execute:new e.Button({icon:"fa-check",tooltip:"Execute: "+g.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){f.job_handler.submit()}})};b.prototype.initialize.call(this,g)},_buildModel:function(){var f=this;var g=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){g+="job_id="+this.options.job_id}else{if(this.options.dataset_id){g+="dataset_id="+this.options.dataset_id}else{g+="tool_version="+this.options.version+"&";var i=top.location.href;var j=i.indexOf("?");if(i.indexOf("tool_id=")!=-1&&j!==-1){g+=i.slice(j+1)}}}var h=this.deferred.register();c.request({type:"GET",url:g,success:function(k){f.build(k);f.message.update({status:"success",message:"Now you are using '"+f.options.name+"' version "+f.options.version+".",persistent:false});f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(k)},error:function(k){f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(k);var l=k.error||"Uncaught error.";f.modal.show({title:"Tool cannot be executed",body:l,buttons:{Close:function(){f.modal.hide()}}})}})},_updateModel:function(g){var f=this;var g={tool_id:this.options.id,tool_version:this.options.version,inputs:g};for(var h in g.inputs){var n=g.inputs[h];try{if(n&&n.values[0].src==="hda"){g.inputs[h]=f.content.get({id:n.values[0].id,src:"hda"}).id_uncoded}}catch(k){}}function m(r){for(var p in f.input_list){var q=f.field_list[p];var o=f.input_list[p];if(o.is_dynamic&&q.wait&&q.unwait){if(r){q.wait()}else{q.unwait()}}}}m(true);var l=this.deferred.register();console.debug("tools-form::_refreshForm() - Sending current state (see below).");console.debug(g);var j=galaxy_config.root+"api/tools/"+this.options.id+"/build";c.request({type:"POST",url:j,data:g,success:function(i){f.tree.matchModel(i,function(p,t){var o=f.input_list[p];if(o&&o.options){if(!_.isEqual(o.options,t.options)){o.options=t.options;var u=f.field_list[p];if(u.update){var s=[];if((["data","data_collection","drill_down"]).indexOf(o.type)!=-1){s=o.options}else{for(var r in t.options){var q=t.options[r];if(q.length>2){s.push({label:q[0],value:q[1]})}}}u.update(s);u.trigger("change");console.debug("Updating options for "+p)}}}});m(false);console.debug("tools-form::_refreshForm() - Received new model (see below).");console.debug(i);f.deferred.done(l)},error:function(i){f.deferred.done(l);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(i)}})}});return{View:d}}); \ No newline at end of file +define(["utils/utils","mvc/ui/ui-misc","mvc/tools/tools-form-base","mvc/tools/tools-jobs"],function(c,e,b,a){var d=b.extend({initialize:function(g){var f=this;this.job_handler=new a(this);this.buttons={execute:new e.Button({icon:"fa-check",tooltip:"Execute: "+g.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){f.job_handler.submit()}})};g.initial_errors=g.job_id;b.prototype.initialize.call(this,g)},_buildModel:function(){var f=this;var g=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){g+="job_id="+this.options.job_id}else{if(this.options.dataset_id){g+="dataset_id="+this.options.dataset_id}else{g+="tool_version="+this.options.version+"&";var i=top.location.href;var j=i.indexOf("?");if(i.indexOf("tool_id=")!=-1&&j!==-1){g+=i.slice(j+1)}}}var h=this.deferred.register();c.request({type:"GET",url:g,success:function(k){f.build(k);f.message.update({status:"success",message:"Now you are using '"+f.options.name+"' version "+f.options.version+".",persistent:false});f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(k)},error:function(k){f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(k);var l=k.error||"Uncaught error.";f.modal.show({title:"Tool cannot be executed",body:l,buttons:{Close:function(){f.modal.hide()}}})}})},_updateModel:function(g){var f=this;var g={tool_id:this.options.id,tool_version:this.options.version,inputs:g};for(var h in g.inputs){var n=g.inputs[h];try{if(n&&n.values[0].src==="hda"){g.inputs[h]=f.content.get({id:n.values[0].id,src:"hda"}).id_uncoded}}catch(k){}}function m(r){for(var p in f.input_list){var q=f.field_list[p];var o=f.input_list[p];if(o.is_dynamic&&q.wait&&q.unwait){if(r){q.wait()}else{q.unwait()}}}}m(true);var l=this.deferred.register();console.debug("tools-form::_refreshForm() - Sending current state (see below).");console.debug(g);var j=galaxy_config.root+"api/tools/"+this.options.id+"/build";c.request({type:"POST",url:j,data:g,success:function(i){f.tree.matchModel(i,function(p,t){var o=f.input_list[p];if(o&&o.options){if(!_.isEqual(o.options,t.options)){o.options=t.options;var u=f.field_list[p];if(u.update){var s=[];if((["data","data_collection","drill_down"]).indexOf(o.type)!=-1){s=o.options}else{for(var r in t.options){var q=t.options[r];if(q.length>2){s.push({label:q[0],value:q[1]})}}}u.update(s);u.trigger("change");console.debug("Updating options for "+p)}}}});m(false);console.debug("tools-form::_refreshForm() - Received new model (see below).");console.debug(i);f.deferred.done(l)},error:function(i){f.deferred.done(l);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(i)}})}});return{View:d}}); \ No newline at end of file https://bitbucket.org/galaxy/galaxy-central/commits/441d5188382c/ Changeset: 441d5188382c Branch: release_15.03 User: guerler Date: 2015-02-27 06:35:38+00:00 Summary: ToolForm/Collections: Re-introduce parameter expansion Affected #: 4 files diff -r c35498a73b41c76446223123721f8a9c08bec03c -r 441d5188382c775009e6612c57e9317d8cb9a944 client/galaxy/scripts/mvc/tools/tools-form.js --- a/client/galaxy/scripts/mvc/tools/tools-form.js +++ b/client/galaxy/scripts/mvc/tools/tools-form.js @@ -110,17 +110,6 @@ inputs : current_state } - // patch data tool parameters - // TODO: This needs to be removed and handled in the api - for (var i in current_state.inputs) { - var dict = current_state.inputs[i]; - try { - if (dict && dict.values[0].src === 'hda') { - current_state.inputs[i] = self.content.get({id: dict.values[0].id, src: 'hda'}).id_uncoded; - } - } catch (err) {} - } - // activates/disables spinner for dynamic fields to indicate that they are currently being updated function wait(active) { for (var i in self.input_list) { diff -r c35498a73b41c76446223123721f8a9c08bec03c -r 441d5188382c775009e6612c57e9317d8cb9a944 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -2366,7 +2366,7 @@ else: value, error = check_param(trans, input, default_value, context) except Exception, err: - log.error('Checking parameter failed. %s', str(err)) + log.error('Checking parameter %s failed. %s', input.name, str(err)) pass return [value, error] @@ -2482,6 +2482,11 @@ else: state[k] = jsonify(state[k]) + # expand incoming parameters (parameters might trigger multiple tool executions, + # here we select the first execution only in order to resolve dynamic parameters) + expanded_incomings, _ = expand_meta_parameters( trans, self, params.__dict__ ) + params.__dict__ = expanded_incomings[ 0 ] + # do param translation here, used by datasource tools if self.input_translator: self.input_translator.translate( params ) diff -r c35498a73b41c76446223123721f8a9c08bec03c -r 441d5188382c775009e6612c57e9317d8cb9a944 static/scripts/mvc/tools/tools-form.js --- a/static/scripts/mvc/tools/tools-form.js +++ b/static/scripts/mvc/tools/tools-form.js @@ -110,17 +110,6 @@ inputs : current_state } - // patch data tool parameters - // TODO: This needs to be removed and handled in the api - for (var i in current_state.inputs) { - var dict = current_state.inputs[i]; - try { - if (dict && dict.values[0].src === 'hda') { - current_state.inputs[i] = self.content.get({id: dict.values[0].id, src: 'hda'}).id_uncoded; - } - } catch (err) {} - } - // activates/disables spinner for dynamic fields to indicate that they are currently being updated function wait(active) { for (var i in self.input_list) { diff -r c35498a73b41c76446223123721f8a9c08bec03c -r 441d5188382c775009e6612c57e9317d8cb9a944 static/scripts/packed/mvc/tools/tools-form.js --- a/static/scripts/packed/mvc/tools/tools-form.js +++ b/static/scripts/packed/mvc/tools/tools-form.js @@ -1,1 +1,1 @@ -define(["utils/utils","mvc/ui/ui-misc","mvc/tools/tools-form-base","mvc/tools/tools-jobs"],function(c,e,b,a){var d=b.extend({initialize:function(g){var f=this;this.job_handler=new a(this);this.buttons={execute:new e.Button({icon:"fa-check",tooltip:"Execute: "+g.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){f.job_handler.submit()}})};g.initial_errors=g.job_id;b.prototype.initialize.call(this,g)},_buildModel:function(){var f=this;var g=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){g+="job_id="+this.options.job_id}else{if(this.options.dataset_id){g+="dataset_id="+this.options.dataset_id}else{g+="tool_version="+this.options.version+"&";var i=top.location.href;var j=i.indexOf("?");if(i.indexOf("tool_id=")!=-1&&j!==-1){g+=i.slice(j+1)}}}var h=this.deferred.register();c.request({type:"GET",url:g,success:function(k){f.build(k);f.message.update({status:"success",message:"Now you are using '"+f.options.name+"' version "+f.options.version+".",persistent:false});f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(k)},error:function(k){f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(k);var l=k.error||"Uncaught error.";f.modal.show({title:"Tool cannot be executed",body:l,buttons:{Close:function(){f.modal.hide()}}})}})},_updateModel:function(g){var f=this;var g={tool_id:this.options.id,tool_version:this.options.version,inputs:g};for(var h in g.inputs){var n=g.inputs[h];try{if(n&&n.values[0].src==="hda"){g.inputs[h]=f.content.get({id:n.values[0].id,src:"hda"}).id_uncoded}}catch(k){}}function m(r){for(var p in f.input_list){var q=f.field_list[p];var o=f.input_list[p];if(o.is_dynamic&&q.wait&&q.unwait){if(r){q.wait()}else{q.unwait()}}}}m(true);var l=this.deferred.register();console.debug("tools-form::_refreshForm() - Sending current state (see below).");console.debug(g);var j=galaxy_config.root+"api/tools/"+this.options.id+"/build";c.request({type:"POST",url:j,data:g,success:function(i){f.tree.matchModel(i,function(p,t){var o=f.input_list[p];if(o&&o.options){if(!_.isEqual(o.options,t.options)){o.options=t.options;var u=f.field_list[p];if(u.update){var s=[];if((["data","data_collection","drill_down"]).indexOf(o.type)!=-1){s=o.options}else{for(var r in t.options){var q=t.options[r];if(q.length>2){s.push({label:q[0],value:q[1]})}}}u.update(s);u.trigger("change");console.debug("Updating options for "+p)}}}});m(false);console.debug("tools-form::_refreshForm() - Received new model (see below).");console.debug(i);f.deferred.done(l)},error:function(i){f.deferred.done(l);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(i)}})}});return{View:d}}); \ No newline at end of file +define(["utils/utils","mvc/ui/ui-misc","mvc/tools/tools-form-base","mvc/tools/tools-jobs"],function(c,e,b,a){var d=b.extend({initialize:function(g){var f=this;this.job_handler=new a(this);this.buttons={execute:new e.Button({icon:"fa-check",tooltip:"Execute: "+g.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){f.job_handler.submit()}})};g.initial_errors=g.job_id;b.prototype.initialize.call(this,g)},_buildModel:function(){var f=this;var g=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){g+="job_id="+this.options.job_id}else{if(this.options.dataset_id){g+="dataset_id="+this.options.dataset_id}else{g+="tool_version="+this.options.version+"&";var i=top.location.href;var j=i.indexOf("?");if(i.indexOf("tool_id=")!=-1&&j!==-1){g+=i.slice(j+1)}}}var h=this.deferred.register();c.request({type:"GET",url:g,success:function(k){f.build(k);f.message.update({status:"success",message:"Now you are using '"+f.options.name+"' version "+f.options.version+".",persistent:false});f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(k)},error:function(k){f.deferred.done(h);console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(k);var l=k.error||"Uncaught error.";f.modal.show({title:"Tool cannot be executed",body:l,buttons:{Close:function(){f.modal.hide()}}})}})},_updateModel:function(g){var f=this;var g={tool_id:this.options.id,tool_version:this.options.version,inputs:g};function j(n){for(var l in f.input_list){var m=f.field_list[l];var k=f.input_list[l];if(k.is_dynamic&&m.wait&&m.unwait){if(n){m.wait()}else{m.unwait()}}}}j(true);var i=this.deferred.register();console.debug("tools-form::_refreshForm() - Sending current state (see below).");console.debug(g);var h=galaxy_config.root+"api/tools/"+this.options.id+"/build";c.request({type:"POST",url:h,data:g,success:function(k){f.tree.matchModel(k,function(m,q){var l=f.input_list[m];if(l&&l.options){if(!_.isEqual(l.options,q.options)){l.options=q.options;var r=f.field_list[m];if(r.update){var p=[];if((["data","data_collection","drill_down"]).indexOf(l.type)!=-1){p=l.options}else{for(var o in q.options){var n=q.options[o];if(n.length>2){p.push({label:n[0],value:n[1]})}}}r.update(p);r.trigger("change");console.debug("Updating options for "+m)}}}});j(false);console.debug("tools-form::_refreshForm() - Received new model (see below).");console.debug(k);f.deferred.done(i)},error:function(k){f.deferred.done(i);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(k)}})}});return{View:d}}); \ No newline at end of file https://bitbucket.org/galaxy/galaxy-central/commits/9e16f3d9fafe/ Changeset: 9e16f3d9fafe Branch: release_15.03 User: guerler Date: 2015-02-27 06:49:53+00:00 Summary: Parameters: Prevent uncaught exception on unavailable datasets in column validation Affected #: 1 file diff -r 441d5188382c775009e6612c57e9317d8cb9a944 -r 9e16f3d9fafebfe078fd1d36f59ec1380d6eeab5 lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1335,6 +1335,10 @@ datasets = util.listify( context[ self.data_ref ] ) for dataset in datasets: if dataset: + # Check if metadata is available + if not hasattr(dataset, 'metadata'): + return True + # Check if the dataset does not have the expected metadata for columns if not dataset.metadata.columns: # Only allow late validation if the dataset is not yet ready https://bitbucket.org/galaxy/galaxy-central/commits/84e665326798/ Changeset: 84e665326798 Branch: release_15.03 User: guerler Date: 2015-02-27 06:57:39+00:00 Summary: ToolForm/Ui: Limit selection to available options Affected #: 3 files diff -r 9e16f3d9fafebfe078fd1d36f59ec1380d6eeab5 -r 84e665326798aba03ff4e9acca501a7a96d16741 client/galaxy/scripts/mvc/ui/ui-select-default.js --- a/client/galaxy/scripts/mvc/ui/ui-select-default.js +++ b/client/galaxy/scripts/mvc/ui/ui-select-default.js @@ -78,9 +78,11 @@ if (new_value === null) { new_value = '__null__'; } - this.$select.val(new_value); - if (this.$select.select2) { - this.$select.select2('val', new_value); + if (this.exists(new_value)) { + this.$select.val(new_value); + if (this.$select.select2) { + this.$select.select2('val', new_value); + } } } diff -r 9e16f3d9fafebfe078fd1d36f59ec1380d6eeab5 -r 84e665326798aba03ff4e9acca501a7a96d16741 static/scripts/mvc/ui/ui-select-default.js --- a/static/scripts/mvc/ui/ui-select-default.js +++ b/static/scripts/mvc/ui/ui-select-default.js @@ -78,9 +78,11 @@ if (new_value === null) { new_value = '__null__'; } - this.$select.val(new_value); - if (this.$select.select2) { - this.$select.select2('val', new_value); + if (this.exists(new_value)) { + this.$select.val(new_value); + if (this.$select.select2) { + this.$select.select2('val', new_value); + } } } diff -r 9e16f3d9fafebfe078fd1d36f59ec1380d6eeab5 -r 84e665326798aba03ff4e9acca501a7a96d16741 static/scripts/packed/mvc/ui/ui-select-default.js --- a/static/scripts/packed/mvc/ui/ui-select-default.js +++ b/static/scripts/packed/mvc/ui/ui-select-default.js @@ -1,1 +1,1 @@ -define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{id:"",cls:"ui-select",error_text:"No data available",empty_text:"No selection",visible:true,wait:false,multiple:false,searchable:true,optional:false},initialize:function(d){this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.$select=this.$el.find(".select");this.$icon=this.$el.find(".icon");this.$button=this.$el.find(".button");if(this.options.multiple){this.$el.addClass("ui-select-multiple");this.$select.prop("multiple",true);this.$button.remove()}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}if(!this.options.visible){this.hide()}if(this.options.wait){this.wait()}else{this.show()}var c=this;this.$select.on("change",function(){c._change()});this.on("change",function(){c._change()})},value:function(c){if(c!==undefined){if(c===null){c="__null__"}this.$select.val(c);if(this.$select.select2){this.$select.select2("val",c)}}return this._getValue()},first:function(){var c=this.$select.find("option").first();if(c.length>0){return c.val()}else{return null}},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait();this.$select.show();this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",false)},disable:function(){this.$select.prop("disabled",true)},add:function(c){this.$select.append(this._templateOption(c));this._refresh()},del:function(c){this.$select.find("option[value="+c+"]").remove();this.$select.trigger("change");this._refresh()},update:function(c){var e=this._getValue();this.$select.find("option").remove();if(!this.options.multiple&&this.options.optional){this.$select.append(this._templateOption({value:"__null__",label:this.options.empty_text}))}for(var d in c){this.$select.append(this._templateOption(c[d]))}this._refresh();if(this.options.searchable){this.$select.select2("destroy");this.$select.select2()}this.value(e);if(this._getValue()===null){this.value(this.first())}},setOnChange:function(c){this.options.onchange=c},exists:function(c){return this.$select.find('option[value="'+c+'"]').length>0},_change:function(){if(this.options.onchange){this.options.onchange(this._getValue())}},_getValue:function(){var c=this.$select.val();if(!a.validate(c)){return null}return c},_refresh:function(){var c=this.$select.find("option").length;if(c==0){this.disable();this.$select.empty();this.$select.append(this._templateOption({value:"__null__",label:this.options.error_text}))}else{this.enable()}},_templateOption:function(c){return'<option value="'+c.value+'">'+c.label+"</option>"},_template:function(c){return'<div id="'+c.id+'" class="'+c.cls+'"><select id="'+c.id+'_select" class="select"/><div class="button"><i class="icon"/></div></div>'}});return{View:b}}); \ No newline at end of file +define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{id:"",cls:"ui-select",error_text:"No data available",empty_text:"No selection",visible:true,wait:false,multiple:false,searchable:true,optional:false},initialize:function(d){this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.$select=this.$el.find(".select");this.$icon=this.$el.find(".icon");this.$button=this.$el.find(".button");if(this.options.multiple){this.$el.addClass("ui-select-multiple");this.$select.prop("multiple",true);this.$button.remove()}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}if(!this.options.visible){this.hide()}if(this.options.wait){this.wait()}else{this.show()}var c=this;this.$select.on("change",function(){c._change()});this.on("change",function(){c._change()})},value:function(c){if(c!==undefined){if(c===null){c="__null__"}if(this.exists(c)){this.$select.val(c);if(this.$select.select2){this.$select.select2("val",c)}}}return this._getValue()},first:function(){var c=this.$select.find("option").first();if(c.length>0){return c.val()}else{return null}},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait();this.$select.show();this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",false)},disable:function(){this.$select.prop("disabled",true)},add:function(c){this.$select.append(this._templateOption(c));this._refresh()},del:function(c){this.$select.find("option[value="+c+"]").remove();this.$select.trigger("change");this._refresh()},update:function(c){var e=this._getValue();this.$select.find("option").remove();if(!this.options.multiple&&this.options.optional){this.$select.append(this._templateOption({value:"__null__",label:this.options.empty_text}))}for(var d in c){this.$select.append(this._templateOption(c[d]))}this._refresh();if(this.options.searchable){this.$select.select2("destroy");this.$select.select2()}this.value(e);if(this._getValue()===null){this.value(this.first())}},setOnChange:function(c){this.options.onchange=c},exists:function(c){return this.$select.find('option[value="'+c+'"]').length>0},_change:function(){if(this.options.onchange){this.options.onchange(this._getValue())}},_getValue:function(){var c=this.$select.val();if(!a.validate(c)){return null}return c},_refresh:function(){var c=this.$select.find("option").length;if(c==0){this.disable();this.$select.empty();this.$select.append(this._templateOption({value:"__null__",label:this.options.error_text}))}else{this.enable()}},_templateOption:function(c){return'<option value="'+c.value+'">'+c.label+"</option>"},_template:function(c){return'<div id="'+c.id+'" class="'+c.cls+'"><select id="'+c.id+'_select" class="select"/><div class="button"><i class="icon"/></div></div>'}});return{View:b}}); \ No newline at end of file https://bitbucket.org/galaxy/galaxy-central/commits/ba82b4086c84/ Changeset: ba82b4086c84 Branch: release_15.03 User: guerler Date: 2015-02-27 06:59:43+00:00 Summary: Parameters: Fix deleted datasets validation message Affected #: 1 file diff -r 84e665326798aba03ff4e9acca501a7a96d16741 -r ba82b4086c84446e0f2e5f75873fc94f52306be7 lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -2016,7 +2016,7 @@ for v in values: if v: if v.deleted: - raise ValueError( "The previously selected dataset has been previously deleted" ) + raise ValueError( "The previously selected dataset has been deleted." ) if hasattr( v, "dataset" ) and v.dataset.state in [ galaxy.model.Dataset.states.ERROR, galaxy.model.Dataset.states.DISCARDED ]: raise ValueError( "The previously selected dataset has entered an unusable state" ) if not self.multiple: https://bitbucket.org/galaxy/galaxy-central/commits/a3bc4324eb02/ Changeset: a3bc4324eb02 Branch: release_15.03 User: guerler Date: 2015-02-27 09:26:15+00:00 Summary: Parameters: Set hidden attribute for hidden dataset parameter Affected #: 1 file diff -r ba82b4086c84446e0f2e5f75873fc94f52306be7 -r a3bc4324eb0280cd73c49ed0ca6327b5be96b6ff lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -2420,6 +2420,7 @@ DataToolParameter.__init__( self, tool, elem ) self.value = "None" self.type = "hidden_data" + self.hidden = True def get_initial_value( self, trans, context, history=None ): return None https://bitbucket.org/galaxy/galaxy-central/commits/1a1cc1be950f/ Changeset: 1a1cc1be950f Branch: release_15.03 User: guerler Date: 2015-02-27 09:36:20+00:00 Summary: ToolForm/Ui: Restrict available option requirement to single select fields Affected #: 3 files diff -r a3bc4324eb0280cd73c49ed0ca6327b5be96b6ff -r 1a1cc1be950f0d7170e6a758b395681aefff3d45 client/galaxy/scripts/mvc/ui/ui-select-default.js --- a/client/galaxy/scripts/mvc/ui/ui-select-default.js +++ b/client/galaxy/scripts/mvc/ui/ui-select-default.js @@ -78,7 +78,7 @@ if (new_value === null) { new_value = '__null__'; } - if (this.exists(new_value)) { + if (this.exists(new_value) || this.options.multiple) { this.$select.val(new_value); if (this.$select.select2) { this.$select.select2('val', new_value); diff -r a3bc4324eb0280cd73c49ed0ca6327b5be96b6ff -r 1a1cc1be950f0d7170e6a758b395681aefff3d45 static/scripts/mvc/ui/ui-select-default.js --- a/static/scripts/mvc/ui/ui-select-default.js +++ b/static/scripts/mvc/ui/ui-select-default.js @@ -78,7 +78,7 @@ if (new_value === null) { new_value = '__null__'; } - if (this.exists(new_value)) { + if (this.exists(new_value) || this.options.multiple) { this.$select.val(new_value); if (this.$select.select2) { this.$select.select2('val', new_value); diff -r a3bc4324eb0280cd73c49ed0ca6327b5be96b6ff -r 1a1cc1be950f0d7170e6a758b395681aefff3d45 static/scripts/packed/mvc/ui/ui-select-default.js --- a/static/scripts/packed/mvc/ui/ui-select-default.js +++ b/static/scripts/packed/mvc/ui/ui-select-default.js @@ -1,1 +1,1 @@ -define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{id:"",cls:"ui-select",error_text:"No data available",empty_text:"No selection",visible:true,wait:false,multiple:false,searchable:true,optional:false},initialize:function(d){this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.$select=this.$el.find(".select");this.$icon=this.$el.find(".icon");this.$button=this.$el.find(".button");if(this.options.multiple){this.$el.addClass("ui-select-multiple");this.$select.prop("multiple",true);this.$button.remove()}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}if(!this.options.visible){this.hide()}if(this.options.wait){this.wait()}else{this.show()}var c=this;this.$select.on("change",function(){c._change()});this.on("change",function(){c._change()})},value:function(c){if(c!==undefined){if(c===null){c="__null__"}if(this.exists(c)){this.$select.val(c);if(this.$select.select2){this.$select.select2("val",c)}}}return this._getValue()},first:function(){var c=this.$select.find("option").first();if(c.length>0){return c.val()}else{return null}},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait();this.$select.show();this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",false)},disable:function(){this.$select.prop("disabled",true)},add:function(c){this.$select.append(this._templateOption(c));this._refresh()},del:function(c){this.$select.find("option[value="+c+"]").remove();this.$select.trigger("change");this._refresh()},update:function(c){var e=this._getValue();this.$select.find("option").remove();if(!this.options.multiple&&this.options.optional){this.$select.append(this._templateOption({value:"__null__",label:this.options.empty_text}))}for(var d in c){this.$select.append(this._templateOption(c[d]))}this._refresh();if(this.options.searchable){this.$select.select2("destroy");this.$select.select2()}this.value(e);if(this._getValue()===null){this.value(this.first())}},setOnChange:function(c){this.options.onchange=c},exists:function(c){return this.$select.find('option[value="'+c+'"]').length>0},_change:function(){if(this.options.onchange){this.options.onchange(this._getValue())}},_getValue:function(){var c=this.$select.val();if(!a.validate(c)){return null}return c},_refresh:function(){var c=this.$select.find("option").length;if(c==0){this.disable();this.$select.empty();this.$select.append(this._templateOption({value:"__null__",label:this.options.error_text}))}else{this.enable()}},_templateOption:function(c){return'<option value="'+c.value+'">'+c.label+"</option>"},_template:function(c){return'<div id="'+c.id+'" class="'+c.cls+'"><select id="'+c.id+'_select" class="select"/><div class="button"><i class="icon"/></div></div>'}});return{View:b}}); \ No newline at end of file +define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{id:"",cls:"ui-select",error_text:"No data available",empty_text:"No selection",visible:true,wait:false,multiple:false,searchable:true,optional:false},initialize:function(d){this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.$select=this.$el.find(".select");this.$icon=this.$el.find(".icon");this.$button=this.$el.find(".button");if(this.options.multiple){this.$el.addClass("ui-select-multiple");this.$select.prop("multiple",true);this.$button.remove()}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}if(!this.options.visible){this.hide()}if(this.options.wait){this.wait()}else{this.show()}var c=this;this.$select.on("change",function(){c._change()});this.on("change",function(){c._change()})},value:function(c){if(c!==undefined){if(c===null){c="__null__"}if(this.exists(c)||this.options.multiple){this.$select.val(c);if(this.$select.select2){this.$select.select2("val",c)}}}return this._getValue()},first:function(){var c=this.$select.find("option").first();if(c.length>0){return c.val()}else{return null}},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait();this.$select.show();this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",false)},disable:function(){this.$select.prop("disabled",true)},add:function(c){this.$select.append(this._templateOption(c));this._refresh()},del:function(c){this.$select.find("option[value="+c+"]").remove();this.$select.trigger("change");this._refresh()},update:function(c){var e=this._getValue();this.$select.find("option").remove();if(!this.options.multiple&&this.options.optional){this.$select.append(this._templateOption({value:"__null__",label:this.options.empty_text}))}for(var d in c){this.$select.append(this._templateOption(c[d]))}this._refresh();if(this.options.searchable){this.$select.select2("destroy");this.$select.select2()}this.value(e);if(this._getValue()===null){this.value(this.first())}},setOnChange:function(c){this.options.onchange=c},exists:function(c){return this.$select.find('option[value="'+c+'"]').length>0},_change:function(){if(this.options.onchange){this.options.onchange(this._getValue())}},_getValue:function(){var c=this.$select.val();if(!a.validate(c)){return null}return c},_refresh:function(){var c=this.$select.find("option").length;if(c==0){this.disable();this.$select.empty();this.$select.append(this._templateOption({value:"__null__",label:this.options.error_text}))}else{this.enable()}},_templateOption:function(c){return'<option value="'+c.value+'">'+c.label+"</option>"},_template:function(c){return'<div id="'+c.id+'" class="'+c.cls+'"><select id="'+c.id+'_select" class="select"/><div class="button"><i class="icon"/></div></div>'}});return{View:b}}); \ No newline at end of file https://bitbucket.org/galaxy/galaxy-central/commits/04d4f727c2ff/ Changeset: 04d4f727c2ff Branch: release_15.03 User: carlfeberhard Date: 2015-02-27 15:03:47+00:00 Summary: Fix display_structure by using serializer; fix structure by removing extra decode_id Affected #: 2 files diff -r 1a1cc1be950f0d7170e6a758b395681aefff3d45 -r 04d4f727c2ffc85475cc2423faf051d45f8f2aaa lib/galaxy/webapps/galaxy/controllers/history.py --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -543,8 +543,10 @@ def structure( self, trans, id=None, **kwargs ): """ """ - id = self.decode_id( id ) if id else trans.history.id - history_to_view = self.history_manager.get_accessible( trans, id, trans.user ) + unencoded_history_id = trans.history.id + if id: + unencoded_history_id = self.decode_id( id ) + history_to_view = self.history_manager.get_accessible( trans, unencoded_history_id, trans.user ) history_data = self.history_manager._get_history_data( trans, history_to_view ) history_dictionary = history_data[ 'history' ] @@ -552,7 +554,7 @@ jobs = ( trans.sa_session.query( trans.app.model.Job ) .filter( trans.app.model.Job.user == trans.user ) - .filter( trans.app.model.Job.history_id == self.decode_id( id ) ) ).all() + .filter( trans.app.model.Job.history_id == unencoded_history_id ) ).all() jobs = map( lambda j: self.encode_all_ids( trans, j.to_dict( 'element' ), True ), jobs ) tools = {} diff -r 1a1cc1be950f0d7170e6a758b395681aefff3d45 -r 04d4f727c2ffc85475cc2423faf051d45f8f2aaa templates/webapps/galaxy/history/display_structured.mako --- a/templates/webapps/galaxy/history/display_structured.mako +++ b/templates/webapps/galaxy/history/display_structured.mako @@ -128,13 +128,15 @@ ## ---------------------------------------------------------------------------- <%def name="javascripts()"><% + from galaxy.managers import hdas + hda_serializer = hdas.HDASerializer( trans.app ) self.js_app = 'display-structured' controller = trans.webapp.controllers[ 'history' ] hda_dicts = [] id_hda_dict_map = {} for hda in history.active_datasets: - hda_dict = controller.get_hda_dict( trans, hda ) + hda_dict = hda_serializer.serialize_to_view( trans, hda, 'detailed' ) id_hda_dict_map[ hda_dict[ 'id' ] ] = hda_dict hda_dicts.append( hda_dict ) %> https://bitbucket.org/galaxy/galaxy-central/commits/2a238115b21c/ Changeset: 2a238115b21c Branch: release_15.03 User: guerler Date: 2015-02-27 15:12:13+00:00 Summary: ToolForm: Fix dataset order for multi select run Affected #: 3 files diff -r 04d4f727c2ffc85475cc2423faf051d45f8f2aaa -r 2a238115b21ccce4391355329e322132716daecc client/galaxy/scripts/mvc/tools/tools-select-content.js --- a/client/galaxy/scripts/mvc/tools/tools-select-content.js +++ b/client/galaxy/scripts/mvc/tools/tools-select-content.js @@ -277,6 +277,11 @@ } } + // sort by history ids + result.values.sort(function(a, b){ + return a.hid - b.hid; + }); + // return return result; }, diff -r 04d4f727c2ffc85475cc2423faf051d45f8f2aaa -r 2a238115b21ccce4391355329e322132716daecc static/scripts/mvc/tools/tools-select-content.js --- a/static/scripts/mvc/tools/tools-select-content.js +++ b/static/scripts/mvc/tools/tools-select-content.js @@ -277,6 +277,11 @@ } } + // sort by history ids + result.values.sort(function(a, b){ + return a.hid - b.hid; + }); + // return return result; }, diff -r 04d4f727c2ffc85475cc2423faf051d45f8f2aaa -r 2a238115b21ccce4391355329e322132716daecc static/scripts/packed/mvc/tools/tools-select-content.js --- a/static/scripts/packed/mvc/tools/tools-select-content.js +++ b/static/scripts/packed/mvc/tools/tools-select-content.js @@ -1,1 +1,1 @@ -define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(g,p){this.app=g;this.options=p;var o=this;this.setElement('<div class="ui-select-content"/>');this.list={};var m=[];if(p.type=="data_collection"){this.mode="collection"}else{if(p.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var k=c.textify(p.extensions);var j="No dataset available.";if(k){j="No "+k+" dataset available."}var l="No dataset list available.";if(k){l="No "+k+" dataset collection available."}if(this.mode=="single"){m.push({icon:"fa-file-o",value:"single",tooltip:"Single dataset"});this.select_single=new e.Select.View({optional:p.optional,error_text:j,onchange:function(){o.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){m.push({icon:"fa-files-o",value:"multiple",tooltip:"Multiple datasets"});this.select_multiple=new e.Select.View({multiple:true,searchable:false,error_text:j,onchange:function(){o.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"||this.mode=="collection"){m.push({icon:"fa-folder-o",value:"collection",tooltip:"Dataset collection"});this.select_collection=new e.Select.View({error_text:l,optional:p.optional,onchange:function(){o.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:m,onchange:function(i){o.current=i;o.refresh();o.trigger("change")}});this.$batch=$(a.batchMode());var f=_.size(this.list);var n=0;if(f>1){this.$el.append(this.button_type.$el);n=Math.max(0,_.size(this.list)*35)+"px"}for(var h in this.list){this.$el.append(this.list[h].field.$el.css({"margin-left":n}))}this.$el.append(this.$batch.css({"margin-left":n}));this.update(p.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(p.onchange){p.onchange(o.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){function f(l,h){if(l){var m=[];for(var j in h){var k=h[j];m.push({label:k.hid+": "+k.name,value:k.id})}l.update(m)}}f(this.select_single,g.hda);f(this.select_multiple,g.hda);f(this.select_collection,g.hdca);this.app.content.add(g)},value:function(j){if(j!==undefined){if(j&&j.values){try{var m=[];for(var h in j.values){m.push(j.values[h].id)}if(j&&j.values.length>0&&j.values[0].src=="hcda"){this.current="collection";this.select_collection.value(m[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(m)}else{this.current="single";this.select_single.value(m[0])}}}catch(l){console.debug("tools-select-content::value() - Skipped.")}}else{for(var h in this.list){this.list[h].field.value(null)}}}this.refresh();var k=this._select().value();if(k===null){return null}if(!(k instanceof Array)){k=[k]}if(k.length===0){return null}var f={batch:this._batch(),values:[]};for(var h in k){var g=this.app.content.get({id:k[h],src:this.list[this.current].type});if(g){f.values.push(g)}else{return null}}return f},refresh:function(){this.button_type.value(this.current);for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this._batch()){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field},_batch:function(){if(this.current=="collection"){var f=this.app.content.get({id:this._select().value(),src:"hdca"});if(f&&f.map_over_type){return true}}if(this.current!="single"){if(this.mode=="single"){return true}}return false}});return{View:d}}); \ No newline at end of file +define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(g,p){this.app=g;this.options=p;var o=this;this.setElement('<div class="ui-select-content"/>');this.list={};var m=[];if(p.type=="data_collection"){this.mode="collection"}else{if(p.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var k=c.textify(p.extensions);var j="No dataset available.";if(k){j="No "+k+" dataset available."}var l="No dataset list available.";if(k){l="No "+k+" dataset collection available."}if(this.mode=="single"){m.push({icon:"fa-file-o",value:"single",tooltip:"Single dataset"});this.select_single=new e.Select.View({optional:p.optional,error_text:j,onchange:function(){o.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){m.push({icon:"fa-files-o",value:"multiple",tooltip:"Multiple datasets"});this.select_multiple=new e.Select.View({multiple:true,searchable:false,error_text:j,onchange:function(){o.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"||this.mode=="collection"){m.push({icon:"fa-folder-o",value:"collection",tooltip:"Dataset collection"});this.select_collection=new e.Select.View({error_text:l,optional:p.optional,onchange:function(){o.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:m,onchange:function(i){o.current=i;o.refresh();o.trigger("change")}});this.$batch=$(a.batchMode());var f=_.size(this.list);var n=0;if(f>1){this.$el.append(this.button_type.$el);n=Math.max(0,_.size(this.list)*35)+"px"}for(var h in this.list){this.$el.append(this.list[h].field.$el.css({"margin-left":n}))}this.$el.append(this.$batch.css({"margin-left":n}));this.update(p.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(p.onchange){p.onchange(o.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){function f(l,h){if(l){var m=[];for(var j in h){var k=h[j];m.push({label:k.hid+": "+k.name,value:k.id})}l.update(m)}}f(this.select_single,g.hda);f(this.select_multiple,g.hda);f(this.select_collection,g.hdca);this.app.content.add(g)},value:function(j){if(j!==undefined){if(j&&j.values){try{var m=[];for(var h in j.values){m.push(j.values[h].id)}if(j&&j.values.length>0&&j.values[0].src=="hcda"){this.current="collection";this.select_collection.value(m[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(m)}else{this.current="single";this.select_single.value(m[0])}}}catch(l){console.debug("tools-select-content::value() - Skipped.")}}else{for(var h in this.list){this.list[h].field.value(null)}}}this.refresh();var k=this._select().value();if(k===null){return null}if(!(k instanceof Array)){k=[k]}if(k.length===0){return null}var f={batch:this._batch(),values:[]};for(var h in k){var g=this.app.content.get({id:k[h],src:this.list[this.current].type});if(g){f.values.push(g)}else{return null}}f.values.sort(function(n,i){return n.hid-i.hid});return f},refresh:function(){this.button_type.value(this.current);for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this._batch()){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field},_batch:function(){if(this.current=="collection"){var f=this.app.content.get({id:this._select().value(),src:"hdca"});if(f&&f.map_over_type){return true}}if(this.current!="single"){if(this.mode=="single"){return true}}return false}});return{View:d}}); \ 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.
participants (1)
-
commits-noreply@bitbucket.org