1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/bb0b6a7e73d7/ Changeset: bb0b6a7e73d7 User: carlfeberhard Date: 2014-01-14 21:26:44 Summary: Visualizations Registry: remove linkText config val (use visualization name attribute), change render_location to render_target, disable circster; fix rendering of visualization button in HDA when only one visualization Affected #: 9 files diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 config/plugins/visualizations/circster/config/circster.xml --- a/config/plugins/visualizations/circster/config/circster.xml +++ b/config/plugins/visualizations/circster/config/circster.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE visualization SYSTEM "../../visualization.dtd"> -<visualization name="circster"> +<visualization name="Circster" disabled="true"><data_sources><data_source><model_class>HistoryDatasetAssociation</model_class> @@ -24,5 +24,5 @@ <!-- template_root and template are currently ignored for the 'built-in' visualizations --><template_root>webapps/galaxy/visualization</template_root><template>circster.mako</template> - <render_location>_top</render_location> + <render_target>_top</render_target></visualization> diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 config/plugins/visualizations/phyloviz/config/phyloviz.xml --- a/config/plugins/visualizations/phyloviz/config/phyloviz.xml +++ b/config/plugins/visualizations/phyloviz/config/phyloviz.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE visualization SYSTEM "../../visualization.dtd"> -<visualization name="phyloviz"> +<visualization name="Phyloviz"><data_sources><data_source><model_class>HistoryDatasetAssociation</model_class><test type="isinstance" test_attr="datatype" result_type="datatype">data.Newick</test><test type="isinstance" test_attr="datatype" result_type="datatype">data.Nexus</test> + <test type="isinstance" test_attr="datatype" result_type="datatype">xml.Phyloxml</test><to_param param_attr="id">dataset_id</to_param></data_source></data_sources> @@ -16,5 +17,5 @@ <!-- template_root and template are currently ignored for the 'built-in' visualizations --><template_root>webapps/galaxy/visualization</template_root><template>phyloviz.mako</template> - <render_location>_top</render_location> + <render_target>_top</render_target></visualization> diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 config/plugins/visualizations/scatterplot/config/scatterplot.xml --- a/config/plugins/visualizations/scatterplot/config/scatterplot.xml +++ b/config/plugins/visualizations/scatterplot/config/scatterplot.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE visualization SYSTEM "../../visualization.dtd"> -<visualization name="scatterplot"> +<visualization name="Scatterplot"><data_sources><data_source><model_class>HistoryDatasetAssociation</model_class> diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 config/plugins/visualizations/sweepster/config/sweepster.xml --- a/config/plugins/visualizations/sweepster/config/sweepster.xml +++ b/config/plugins/visualizations/sweepster/config/sweepster.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE visualization SYSTEM "../../visualization.dtd"> -<visualization name="sweepster" disabled="true"> +<visualization name="Sweepster" disabled="true"><data_sources><data_source><model_class>HistoryDatasetAssociation</model_class> @@ -23,5 +23,5 @@ <!-- template_root and template are currently ignored for the 'built-in' visualizations --><template_root>webapps/galaxy/visualization</template_root><template>sweepster.mako</template> - <render_location>_top</render_location> + <render_target>_top</render_target></visualization> diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 config/plugins/visualizations/trackster/config/trackster.xml --- a/config/plugins/visualizations/trackster/config/trackster.xml +++ b/config/plugins/visualizations/trackster/config/trackster.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE visualization SYSTEM "../../visualization.dtd"> -<visualization name="trackster"> +<visualization name="Trackster"><!--not tested yet --><data_sources><data_source> @@ -26,5 +26,5 @@ <!-- template_root and template are currently ignored for the 'built-in' visualizations --><template_root>webapps/galaxy/visualization/tracks</template_root><template>browser.mako</template> - <render_location>_top</render_location> + <render_target>_top</render_target></visualization> diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 config/plugins/visualizations/visualization.dtd --- a/config/plugins/visualizations/visualization.dtd +++ b/config/plugins/visualizations/visualization.dtd @@ -1,7 +1,7 @@ <!-- each visualization must have a template (all other elements are optional) --> -<!ELEMENT visualization (description*,data_sources*,params*,template_root*,template,link_text*,render_location*)> +<!ELEMENT visualization (description*,data_sources*,params*,template_root*,template,render_target*)><!-- visualization - name: some name for the visualization (e.g. 'trackster', 'scatterplot', etc.) REQUIRED + name: the title/display name of the visualization (e.g. 'Trackster', 'Fastq Stats', etc.) REQUIRED disabled: if included (value does not matter), this attribute will prevent the visualization being loaded --><!ATTLIST visualization @@ -128,10 +128,8 @@ <!ELEMENT template_root (#PCDATA)><!-- template: the template used to render the visualization. REQUIRED --><!ELEMENT template (#PCDATA)> -<!-- link_text: the text component of an html anchor displayed when the registry builds the link information --> -<!ELEMENT link_text (#PCDATA)> -<!-- render_location: used as the target attribute of the link to the visualization. +<!-- render_target: used as the target attribute of the link to the visualization. Can be 'galaxy_main', '_top', '_blank'. DEFAULT: 'galaxy_main' --><!-- TODO: rename -> render_target --> -<!ELEMENT render_location (#PCDATA)> +<!ELEMENT render_target (#PCDATA)> diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 lib/galaxy/visualization/registry.py --- a/lib/galaxy/visualization/registry.py +++ b/lib/galaxy/visualization/registry.py @@ -219,16 +219,13 @@ param_data = data_source[ 'to_params' ] url = self.get_visualization_url( trans, target_object, visualization_name, param_data ) - link_text = visualization.config.get( 'link_text', None ) - if not link_text: - # default to visualization name, titlecase, and replace underscores - link_text = visualization_name.title().replace( '_', ' ' ) - render_location = visualization.config.get( 'render_location', 'galaxy_main' ) + display_name = visualization.config.get( 'name', None ) + render_target = visualization.config.get( 'render_target', 'galaxy_main' ) # remap some of these vars for direct use in ui.js, PopupMenu (e.g. text->html) return { 'href' : url, - 'html' : link_text, - 'target': render_location + 'html' : display_name, + 'target': render_target } return None @@ -362,7 +359,7 @@ -- what provides the data -- what information needs to be added to the query string """ - VALID_RENDER_LOCATIONS = [ 'galaxy_main', '_top', '_blank' ] + VALID_RENDER_TARGETS = [ 'galaxy_main', '_top', '_blank' ] def __init__( self, debug=False ): self.debug = debug @@ -397,6 +394,12 @@ if 'disabled' in xml_tree.attrib: return None + # a text display name for end user links + returned[ 'name' ] = xml_tree.attrib.get( 'name', None ) + if not returned[ 'name' ]: + raise ParsingException( 'visualization needs a name attribute' ) + print returned[ 'name' ] + # a (for now) text description of what the visualization does description = xml_tree.find( 'description' ) returned[ 'description' ] = description.text.strip() if description is not None else None @@ -458,14 +461,14 @@ if link_text != None and link_text.text: returned[ 'link_text' ] = link_text - # render_location: where in the browser to open the rendered visualization + # render_target: where in the browser to open the rendered visualization # defaults to: galaxy_main - render_location = xml_tree.find( 'render_location' ) - if( ( render_location != None and render_location.text ) - and ( render_location.text in self.VALID_RENDER_LOCATIONS ) ): - returned[ 'render_location' ] = render_location.text + render_target = xml_tree.find( 'render_target' ) + if( ( render_target != None and render_target.text ) + and ( render_target.text in self.VALID_RENDER_TARGETS ) ): + returned[ 'render_target' ] = render_target.text else: - returned[ 'render_location' ] = 'galaxy_main' + returned[ 'render_target' ] = 'galaxy_main' # consider unifying the above into it's own element and parsing method return returned diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 static/scripts/mvc/dataset/hda-edit.js --- a/static/scripts/mvc/dataset/hda-edit.js +++ b/static/scripts/mvc/dataset/hda-edit.js @@ -251,8 +251,9 @@ // No need for popup menu because there's a single visualization. if( _.keys( visualizations ).length === 1 ) { - $icon.attr( 'title', _.keys( visualizations )[0] ); - $icon.attr( 'href', _.values( visualizations )[0] ); + var onlyVisualization = visualizations[0]; + $icon.attr( 'data-original-title', _l( 'Visualize in ' ) + onlyVisualization.html ); + $icon.attr( 'href', onlyVisualization.href ); // >1: Populate menu dict with visualization fns, make the popupmenu } else { diff -r fb1c758d0eb990f2ce59de422d1184647f051cc8 -r bb0b6a7e73d7154377b414939b9fa44da1fb6306 static/scripts/packed/mvc/dataset/hda-edit.js --- a/static/scripts/packed/mvc/dataset/hda-edit.js +++ b/static/scripts/packed/mvc/dataset/hda-edit.js @@ -1,1 +1,1 @@ -define(["mvc/dataset/hda-model","mvc/dataset/hda-base"],function(d,a){var f=a.HDABaseView.extend(LoggableMixin).extend({initialize:function(g){a.HDABaseView.prototype.initialize.call(this,g);this.hasUser=g.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton];this.tagsEditorShown=g.tagsEditorShown||false;this.annotationEditorShown=g.annotationEditorShown||false},_render_titleButtons:function(){return a.HDABaseView.prototype._render_titleButtons.call(this).concat([this._render_editButton(),this._render_deleteButton()])},_render_editButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var i=this.model.get("purged"),g=this.model.get("deleted"),h={title:_l("Edit attributes"),href:this.urls.edit,target:this.linkTarget,classes:"dataset-edit"};if(g||i){h.disabled=true;if(i){h.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(g){h.title=_l("Undelete dataset to edit attributes")}}}else{if(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD){h.disabled=true;h.title=_l("This dataset must finish uploading before it can be edited")}}h.faIcon="fa-pencil";return faIconButton(h)},_render_deleteButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var g=this,h={title:_l("Delete"),classes:"dataset-delete",onclick:function(){g.$el.find(".icon-btn.dataset-delete").trigger("mouseout");g.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){h={title:_l("Dataset is already deleted"),disabled:true}}h.faIcon="fa-times";return faIconButton(h)},_render_errButton:function(){if(this.model.get("state")!==d.HistoryDatasetAssociation.STATES.ERROR){return null}return faIconButton({title:_l("View or report this error"),href:this.urls.report_error,classes:"dataset-report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_render_rerunButton:function(){return faIconButton({title:_l("Run this job again"),href:this.urls.rerun,classes:"dataset-rerun-btn",target:this.linkTarget,faIcon:"fa-refresh"})},_render_visualizationsButton:function(){var n=this.model.get("visualizations");if((!this.hasUser)||(!this.model.hasData())||(_.isEmpty(n))){return null}if(_.isObject(n[0])){return this._render_visualizationsFrameworkButton(n)}if(!this.urls.visualization){return null}var k=this.model.get("dbkey"),g=this.urls.visualization,j={},h={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(k){h.dbkey=k}var l=faIconButton({title:_l("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});var m=this;function i(p){switch(p){case"trackster":return b(g,h,k);case"scatterplot":return e(g,h,m.linkTarget);default:return function(){Galaxy.frame.add({title:"Visualization",type:"url",content:g+"/"+p+"?"+$.param(h)})}}}function o(p){return p.charAt(0).toUpperCase()+p.slice(1)}if(n.length===1){l.attr("data-original-title",_l("Visualize in ")+_l(o(n[0])));l.click(i(n[0]))}else{_.each(n,function(p){j[_l(o(p))]=i(p)});make_popupmenu(l,j)}return l},_render_visualizationsFrameworkButton:function(g){if(!(this.model.hasData())||!(g&&!_.isEmpty(g))){return null}var h=faIconButton({title:_l("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});if(_.keys(g).length===1){h.attr("title",_.keys(g)[0]);h.attr("href",_.values(g)[0])}else{var i=[];_.each(g,function(j){j.func=function(){if(Galaxy.frame.active){Galaxy.frame.add({title:"Visualization",type:"url",content:j.href});return false}return true};i.push(j);return false});PopupMenu.create(h,i)}return h},_buildNewRender:function(){var g=a.HDABaseView.prototype._buildNewRender.call(this);g.find(".dataset-deleted-msg").append(_l('Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk'));g.find(".dataset-hidden-msg").append(_l('Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it'));return g},_render_body_failed_metadata:function(){var h=$("<a/>").attr({href:this.urls.edit,target:this.linkTarget}).text(_l("set it manually or retry auto-detection")),g=$("<span/>").text(". "+_l("You may be able to")+" ").append(h),i=a.HDABaseView.prototype._render_body_failed_metadata.call(this);i.find(".warningmessagesmall strong").append(g);return i},_render_body_error:function(){var g=a.HDABaseView.prototype._render_body_error.call(this);g.find(".dataset-actions .left").prepend(this._render_errButton());return g},_render_body_ok:function(){var g=a.HDABaseView.prototype._render_body_ok.call(this);if(this.model.isDeletedOrPurged()){return g}this.makeDbkeyEditLink(g);if(this.hasUser){g.find(".dataset-actions .left").append(this._render_visualizationsButton());this._renderTags(g);this._renderAnnotation(g)}return g},_renderTags:function(g){var h=this;this.tagsEditor=new TagsEditor({model:this.model,el:g.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){h.tagsEditorShown=true},onhide:function(){h.tagsEditorShown=false},$activator:faIconButton({title:_l("Edit dataset tags"),classes:"dataset-tag-btn",faIcon:"fa-tags"}).appendTo(g.find(".dataset-actions .right"))});if(this.tagsEditorShown){this.tagsEditor.toggle(true)}},_renderAnnotation:function(g){var h=this;this.annotationEditor=new AnnotationEditor({model:this.model,el:g.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){h.annotationEditorShown=true},onhide:function(){h.annotationEditorShown=false},$activator:faIconButton({title:_l("Edit dataset annotation"),classes:"dataset-annotate-btn",faIcon:"fa-comment"}).appendTo(g.find(".dataset-actions .right"))});if(this.annotationEditorShown){this.annotationEditor.toggle(true)}},makeDbkeyEditLink:function(h){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){var g=$('<a class="value">?</a>').attr("href",this.urls.edit).attr("target",this.linkTarget);h.find(".dataset-dbkey .value").replaceWith(g)}},events:_.extend(_.clone(a.HDABaseView.prototype.events),{"click .dataset-undelete":function(g){this.model.undelete();return false},"click .dataset-unhide":function(g){this.model.unhide();return false},"click .dataset-purge":"confirmPurge"}),confirmPurge:function c(g){this.model.purge();return false},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"HDAView("+g+")"}});function e(g,i,h){action=function(){Galaxy.frame.add({title:"Scatterplot",type:"url",content:g+"/scatterplot?"+$.param(i),target:h,scratchbook:true});$("div.popmenu-wrapper").remove();return false};return action}function b(g,i,h){return function(){var j={};if(h){j["f-dbkey"]=h}$.ajax({url:g+"/list_tracks?"+$.param(j),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(k){var l=window.parent;l.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){l.Galaxy.modal.hide()},"View in saved visualization":function(){l.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:k,buttons:{Cancel:function(){l.Galaxy.modal.hide()},"Add to visualization":function(){$(l.document).find("input[name=id]:checked").each(function(){l.Galaxy.modal.hide();var m=$(this).val();i.id=m;l.Galaxy.frame.add({title:"Trackster",type:"url",content:g+"/trackster?"+$.param(i),scratchbook:true})})}}})},"View in new visualization":function(){l.Galaxy.modal.hide();var m=g+"/trackster?"+$.param(i);l.Galaxy.frame.add({title:"Trackster",type:"url",content:m,scratchbook:true})}}})}});return false}}return{HDAEditView:f}}); \ No newline at end of file +define(["mvc/dataset/hda-model","mvc/dataset/hda-base"],function(d,a){var f=a.HDABaseView.extend(LoggableMixin).extend({initialize:function(g){a.HDABaseView.prototype.initialize.call(this,g);this.hasUser=g.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton];this.tagsEditorShown=g.tagsEditorShown||false;this.annotationEditorShown=g.annotationEditorShown||false},_render_titleButtons:function(){return a.HDABaseView.prototype._render_titleButtons.call(this).concat([this._render_editButton(),this._render_deleteButton()])},_render_editButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var i=this.model.get("purged"),g=this.model.get("deleted"),h={title:_l("Edit attributes"),href:this.urls.edit,target:this.linkTarget,classes:"dataset-edit"};if(g||i){h.disabled=true;if(i){h.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(g){h.title=_l("Undelete dataset to edit attributes")}}}else{if(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD){h.disabled=true;h.title=_l("This dataset must finish uploading before it can be edited")}}h.faIcon="fa-pencil";return faIconButton(h)},_render_deleteButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var g=this,h={title:_l("Delete"),classes:"dataset-delete",onclick:function(){g.$el.find(".icon-btn.dataset-delete").trigger("mouseout");g.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){h={title:_l("Dataset is already deleted"),disabled:true}}h.faIcon="fa-times";return faIconButton(h)},_render_errButton:function(){if(this.model.get("state")!==d.HistoryDatasetAssociation.STATES.ERROR){return null}return faIconButton({title:_l("View or report this error"),href:this.urls.report_error,classes:"dataset-report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_render_rerunButton:function(){return faIconButton({title:_l("Run this job again"),href:this.urls.rerun,classes:"dataset-rerun-btn",target:this.linkTarget,faIcon:"fa-refresh"})},_render_visualizationsButton:function(){var n=this.model.get("visualizations");if((!this.hasUser)||(!this.model.hasData())||(_.isEmpty(n))){return null}if(_.isObject(n[0])){return this._render_visualizationsFrameworkButton(n)}if(!this.urls.visualization){return null}var k=this.model.get("dbkey"),g=this.urls.visualization,j={},h={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(k){h.dbkey=k}var l=faIconButton({title:_l("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});var m=this;function i(p){switch(p){case"trackster":return b(g,h,k);case"scatterplot":return e(g,h,m.linkTarget);default:return function(){Galaxy.frame.add({title:"Visualization",type:"url",content:g+"/"+p+"?"+$.param(h)})}}}function o(p){return p.charAt(0).toUpperCase()+p.slice(1)}if(n.length===1){l.attr("data-original-title",_l("Visualize in ")+_l(o(n[0])));l.click(i(n[0]))}else{_.each(n,function(p){j[_l(o(p))]=i(p)});make_popupmenu(l,j)}return l},_render_visualizationsFrameworkButton:function(g){if(!(this.model.hasData())||!(g&&!_.isEmpty(g))){return null}var i=faIconButton({title:_l("Visualize"),classes:"dataset-visualize-btn",faIcon:"fa-bar-chart-o"});if(_.keys(g).length===1){var h=g[0];i.attr("data-original-title",_l("Visualize in ")+h.html);i.attr("href",h.href)}else{var j=[];_.each(g,function(k){k.func=function(){if(Galaxy.frame.active){Galaxy.frame.add({title:"Visualization",type:"url",content:k.href});return false}return true};j.push(k);return false});PopupMenu.create(i,j)}return i},_buildNewRender:function(){var g=a.HDABaseView.prototype._buildNewRender.call(this);g.find(".dataset-deleted-msg").append(_l('Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk'));g.find(".dataset-hidden-msg").append(_l('Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it'));return g},_render_body_failed_metadata:function(){var h=$("<a/>").attr({href:this.urls.edit,target:this.linkTarget}).text(_l("set it manually or retry auto-detection")),g=$("<span/>").text(". "+_l("You may be able to")+" ").append(h),i=a.HDABaseView.prototype._render_body_failed_metadata.call(this);i.find(".warningmessagesmall strong").append(g);return i},_render_body_error:function(){var g=a.HDABaseView.prototype._render_body_error.call(this);g.find(".dataset-actions .left").prepend(this._render_errButton());return g},_render_body_ok:function(){var g=a.HDABaseView.prototype._render_body_ok.call(this);if(this.model.isDeletedOrPurged()){return g}this.makeDbkeyEditLink(g);if(this.hasUser){g.find(".dataset-actions .left").append(this._render_visualizationsButton());this._renderTags(g);this._renderAnnotation(g)}return g},_renderTags:function(g){var h=this;this.tagsEditor=new TagsEditor({model:this.model,el:g.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){h.tagsEditorShown=true},onhide:function(){h.tagsEditorShown=false},$activator:faIconButton({title:_l("Edit dataset tags"),classes:"dataset-tag-btn",faIcon:"fa-tags"}).appendTo(g.find(".dataset-actions .right"))});if(this.tagsEditorShown){this.tagsEditor.toggle(true)}},_renderAnnotation:function(g){var h=this;this.annotationEditor=new AnnotationEditor({model:this.model,el:g.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){h.annotationEditorShown=true},onhide:function(){h.annotationEditorShown=false},$activator:faIconButton({title:_l("Edit dataset annotation"),classes:"dataset-annotate-btn",faIcon:"fa-comment"}).appendTo(g.find(".dataset-actions .right"))});if(this.annotationEditorShown){this.annotationEditor.toggle(true)}},makeDbkeyEditLink:function(h){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){var g=$('<a class="value">?</a>').attr("href",this.urls.edit).attr("target",this.linkTarget);h.find(".dataset-dbkey .value").replaceWith(g)}},events:_.extend(_.clone(a.HDABaseView.prototype.events),{"click .dataset-undelete":function(g){this.model.undelete();return false},"click .dataset-unhide":function(g){this.model.unhide();return false},"click .dataset-purge":"confirmPurge"}),confirmPurge:function c(g){this.model.purge();return false},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"HDAView("+g+")"}});function e(g,i,h){action=function(){Galaxy.frame.add({title:"Scatterplot",type:"url",content:g+"/scatterplot?"+$.param(i),target:h,scratchbook:true});$("div.popmenu-wrapper").remove();return false};return action}function b(g,i,h){return function(){var j={};if(h){j["f-dbkey"]=h}$.ajax({url:g+"/list_tracks?"+$.param(j),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(k){var l=window.parent;l.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){l.Galaxy.modal.hide()},"View in saved visualization":function(){l.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:k,buttons:{Cancel:function(){l.Galaxy.modal.hide()},"Add to visualization":function(){$(l.document).find("input[name=id]:checked").each(function(){l.Galaxy.modal.hide();var m=$(this).val();i.id=m;l.Galaxy.frame.add({title:"Trackster",type:"url",content:g+"/trackster?"+$.param(i),scratchbook:true})})}}})},"View in new visualization":function(){l.Galaxy.modal.hide();var m=g+"/trackster?"+$.param(i);l.Galaxy.frame.add({title:"Trackster",type:"url",content:m,scratchbook:true})}}})}});return false}}return{HDAEditView:f}}); \ 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.