commit/galaxy-central: guerler: ToolForm: Fix link shown for tool sharing
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5321b19715b1/ Changeset: 5321b19715b1 User: guerler Date: 2014-10-10 04:11:21+00:00 Summary: ToolForm: Fix link shown for tool sharing Affected #: 3 files diff -r 10b4f2107e90f3821f94be4286f320628c518034 -r 5321b19715b144c7e93ae7567aa4a6681d3e59b7 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 @@ -158,7 +158,7 @@ title : 'Share', tooltip : 'Share this tool', onclick : function() { - prompt('Copy to clipboard: Ctrl+C, Enter', galaxy_config.root + 'root?tool_id=' + self.options.id); + prompt('Copy to clipboard: Ctrl+C, Enter', window.location.origin + galaxy_config.root + 'root?tool_id=' + self.options.id); } }); diff -r 10b4f2107e90f3821f94be4286f320628c518034 -r 5321b19715b144c7e93ae7567aa4a6681d3e59b7 static/scripts/mvc/tools/tools-form.js --- a/static/scripts/mvc/tools/tools-form.js +++ b/static/scripts/mvc/tools/tools-form.js @@ -158,7 +158,7 @@ title : 'Share', tooltip : 'Share this tool', onclick : function() { - prompt('Copy to clipboard: Ctrl+C, Enter', galaxy_config.root + 'root?tool_id=' + self.options.id); + prompt('Copy to clipboard: Ctrl+C, Enter', window.location.origin + galaxy_config.root + 'root?tool_id=' + self.options.id); } }); diff -r 10b4f2107e90f3821f94be4286f320628c518034 -r 5321b19715b144c7e93ae7567aa4a6681d3e59b7 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-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree","mvc/tools/tools-jobs"],function(j,i,m,k,a,f,d,g,l,c,h){var e=Backbone.Model.extend({initialize:function(n){this.url=galaxy_config.root+"api/tools/"+n.id+"?io_details=true"}});var b=Backbone.View.extend({container:"body",initialize:function(o){var n=this;if(parent.Galaxy&&parent.Galaxy.modal){this.modal=parent.Galaxy.modal}else{this.modal=new m.Modal.View()}this.options=o;this.setElement("<div/>");$(this.container).append(this.$el);this.model=new e({id:o.id});this.tree=new c(this);this.job_handler=new h(this);this.field_list={};this.input_list={};this.element_list={};this.content=new g({history_id:this.options.history_id,success:function(){n._initializeToolForm()}})},message:function(n){$(this.container).empty();$(this.container).append(n)},reset:function(){for(var n in this.element_list){this.element_list[n].reset()}},refresh:function(){this.tree.refresh();for(var n in this.field_list){this.field_list[n].trigger("change")}console.debug("tools-form::refresh() - Recreated data structure. Refresh.")},_initializeToolForm:function(){var n=this;this.model.fetch({error:function(o){console.debug("tools-form::_initializeToolForm() : Attempt to fetch tool model failed.")},success:function(){n.inputs=n.model.get("inputs");if(n.options.job_id){j.get({url:galaxy_config.root+"api/jobs/"+n.options.job_id,success:function(o){n._buildForm()}})}else{n._buildForm()}}})},_buildForm:function(){var p=this;var r=new m.ButtonIcon({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(p.options.biostar_url+"/p/new/post/")}});var s=new m.ButtonIcon({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(p.options.biostar_url+"/t/"+p.options.id+"/")}});var n=new m.ButtonIcon({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",galaxy_config.root+"root?tool_id="+p.options.id)}});var q={button_question:r,button_search:s,button_share:n};if(Galaxy.currUser.get("is_admin")){q.button_download=new m.ButtonIcon({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+p.options.id+"/download"}})}this.section=new l.View(p,{inputs:this.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new i.View({icon:"fa-wrench",title:"<b>"+this.model.get("name")+"</b> "+this.model.get("description"),operations:q,buttons:{execute:new m.Button({icon:"fa-check",tooltip:"Execute the tool",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){p.job_handler.submit()}})}});if(!this.options.biostar_url){r.$el.hide();s.$el.hide()}this.$el.append(this.portlet.$el);if(this.options.help!=""){this.$el.append(d.help(this.options.help))}if(this.options.citations){this.$el.append(d.citations());var o=new k.ToolCitationCollection();o.tool_id=this.options.id;var t=new a.CitationListView({collection:o});t.render();o.fetch()}this.portlet.append(this.section.$el);this.refresh()}});return{View:b}}); \ No newline at end of file +define(["utils/utils","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree","mvc/tools/tools-jobs"],function(j,i,m,k,a,f,d,g,l,c,h){var e=Backbone.Model.extend({initialize:function(n){this.url=galaxy_config.root+"api/tools/"+n.id+"?io_details=true"}});var b=Backbone.View.extend({container:"body",initialize:function(o){var n=this;if(parent.Galaxy&&parent.Galaxy.modal){this.modal=parent.Galaxy.modal}else{this.modal=new m.Modal.View()}this.options=o;this.setElement("<div/>");$(this.container).append(this.$el);this.model=new e({id:o.id});this.tree=new c(this);this.job_handler=new h(this);this.field_list={};this.input_list={};this.element_list={};this.content=new g({history_id:this.options.history_id,success:function(){n._initializeToolForm()}})},message:function(n){$(this.container).empty();$(this.container).append(n)},reset:function(){for(var n in this.element_list){this.element_list[n].reset()}},refresh:function(){this.tree.refresh();for(var n in this.field_list){this.field_list[n].trigger("change")}console.debug("tools-form::refresh() - Recreated data structure. Refresh.")},_initializeToolForm:function(){var n=this;this.model.fetch({error:function(o){console.debug("tools-form::_initializeToolForm() : Attempt to fetch tool model failed.")},success:function(){n.inputs=n.model.get("inputs");if(n.options.job_id){j.get({url:galaxy_config.root+"api/jobs/"+n.options.job_id,success:function(o){n._buildForm()}})}else{n._buildForm()}}})},_buildForm:function(){var p=this;var r=new m.ButtonIcon({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(p.options.biostar_url+"/p/new/post/")}});var s=new m.ButtonIcon({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(p.options.biostar_url+"/t/"+p.options.id+"/")}});var n=new m.ButtonIcon({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+p.options.id)}});var q={button_question:r,button_search:s,button_share:n};if(Galaxy.currUser.get("is_admin")){q.button_download=new m.ButtonIcon({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+p.options.id+"/download"}})}this.section=new l.View(p,{inputs:this.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new i.View({icon:"fa-wrench",title:"<b>"+this.model.get("name")+"</b> "+this.model.get("description"),operations:q,buttons:{execute:new m.Button({icon:"fa-check",tooltip:"Execute the tool",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){p.job_handler.submit()}})}});if(!this.options.biostar_url){r.$el.hide();s.$el.hide()}this.$el.append(this.portlet.$el);if(this.options.help!=""){this.$el.append(d.help(this.options.help))}if(this.options.citations){this.$el.append(d.citations());var o=new k.ToolCitationCollection();o.tool_id=this.options.id;var t=new a.CitationListView({collection:o});t.render();o.fetch()}this.portlet.append(this.section.$el);this.refresh()}});return{View: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.
participants (1)
-
commits-noreply@bitbucket.org