1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/e6de07f8c01f/ Changeset: e6de07f8c01f Branch: stable User: martenson Date: 2014-11-13 19:41:49+00:00 Summary: open citation url in _blank (prevents browser's insecure content error messages while trying to open in the middle pane - https vs http) Affected #: 3 files diff -r f01e2504095a477b16970f9570eb68361f031287 -r e6de07f8c01fe8802282eea1bee326c5efba1b78 client/galaxy/scripts/mvc/citation/citation-view.js --- a/client/galaxy/scripts/mvc/citation/citation-view.js +++ b/client/galaxy/scripts/mvc/citation/citation-view.js @@ -58,11 +58,11 @@ var doiUrl = ""; if( fields.doi ) { doiUrl = 'http://dx.doi.org/' + fields.doi; - ref += '[<a href="' + doiUrl + '">doi:' + fields.doi + "</a>]"; + ref += '[<a href="' + doiUrl + '" target="_blank">doi:' + fields.doi + "</a>]"; } var url = fields.url || doiUrl; if( url ) { - ref += '[<a href="' + url + '">Link</a>]'; + ref += '[<a href="' + url + '" target="_blank">Link</a>]'; } return ref; }, @@ -185,4 +185,4 @@ CitationListView : CitationListView }; -}); \ No newline at end of file +}); diff -r f01e2504095a477b16970f9570eb68361f031287 -r e6de07f8c01fe8802282eea1bee326c5efba1b78 static/scripts/mvc/citation/citation-view.js --- a/static/scripts/mvc/citation/citation-view.js +++ b/static/scripts/mvc/citation/citation-view.js @@ -58,11 +58,11 @@ var doiUrl = ""; if( fields.doi ) { doiUrl = 'http://dx.doi.org/' + fields.doi; - ref += '[<a href="' + doiUrl + '">doi:' + fields.doi + "</a>]"; + ref += '[<a href="' + doiUrl + '" target="_blank">doi:' + fields.doi + "</a>]"; } var url = fields.url || doiUrl; if( url ) { - ref += '[<a href="' + url + '">Link</a>]'; + ref += '[<a href="' + url + '" target="_blank">Link</a>]'; } return ref; }, @@ -185,4 +185,4 @@ CitationListView : CitationListView }; -}); \ No newline at end of file +}); diff -r f01e2504095a477b16970f9570eb68361f031287 -r e6de07f8c01fe8802282eea1bee326c5efba1b78 static/scripts/packed/mvc/citation/citation-view.js --- a/static/scripts/packed/mvc/citation/citation-view.js +++ b/static/scripts/packed/mvc/citation/citation-view.js @@ -1,1 +1,1 @@ -define(["mvc/base-mvc","mvc/citation/citation-model","utils/localization"],function(a,d,c){var b=Backbone.View.extend({tagName:"div",className:"citations",render:function(){this.$el.append("<p>"+this.formattedReference()+"</p>");return this},formattedReference:function(){var k=this.model;var i=k.entryType();var l=k.fields();var g="";var o=this._asSentence((l.author?l.author:"")+(l.year?(" ("+l.year+")"):""))+" ";var n=l.title||"";var h=l.pages?("pp. "+l.pages):"";var p=l.address;if(i=="article"){var j=(l.volume?l.volume:"")+(l.number?(" ("+l.number+")"):"")+(h?", "+h:"");g=o+this._asSentence(n)+(l.journal?("In <em>"+l.journal+", "):"")+this._asSentence(j)+this._asSentence(l.address)+"</em>"}else{if(i=="inproceedings"||i=="proceedings"){g=o+this._asSentence(n)+(l.booktitle?("In <em>"+l.booktitle+", "):"")+(h?h:"")+(p?", "+p:"")+".</em>"}else{if(i=="mastersthesis"||i=="phdthesis"){g=o+this._asSentence(n)+(l.howpublished?l.howpublished+". ":"")+(l.note?l.note+".":"")}else{if(i=="techreport"){g=o+this._asSentence(n)+this._asSentence(l.institution)+this._asSentence(l.number)+this._asSentence(l.type)}else{if(i=="book"||i=="inbook"||i=="incollection"){g=o+" "+this._formatBookInfo(l)}else{g=o+" "+this._asSentence(n)+this._asSentence(l.howpublished)+this._asSentence(l.note)}}}}}var m="";if(l.doi){m="http://dx.doi.org/"+l.doi;g+='[<a href="'+m+'">doi:'+l.doi+"</a>]"}var f=l.url||m;if(f){g+='[<a href="'+f+'">Link</a>]'}return g},_formatBookInfo:function(f){var g="";if(f.chapter){g+=f.chapter+" in "}if(f.title){g+="<em>"+f.title+"</em>"}if(f.editor){g+=", Edited by "+f.editor+", "}if(f.publisher){g+=", "+f.publisher}if(f.pages){g+=", pp. "+f.pages+""}if(f.series){g+=", <em>"+f.series+"</em>"}if(f.volume){g+=", Vol."+f.volume}if(f.issn){g+=", ISBN: "+f.issn}return g+"."},_asSentence:function(f){return(f&&f.trim())?f+". ":""}});var e=Backbone.View.extend({el:"#citations",initialize:function(){this.listenTo(this.collection,"add",this.renderCitation)},events:{"click .citations-to-bibtex":"showBibtex","click .citations-to-formatted":"showFormatted"},renderCitation:function(g){var f=new b({model:g});this.$(".citations-formatted").append(f.render().el);var h=this.$(".citations-bibtex-text");h.val(h.val()+"\n\r"+g.attributes.content)},render:function(){this.$el.html(this.citationsElement());this.collection.each(function(f){this.renderCitation(f)},this);this.showFormatted()},showBibtex:function(){this.$(".citations-to-formatted").show();this.$(".citations-to-bibtex").hide();this.$(".citations-bibtex").show();this.$(".citations-formatted").hide();this.$(".citations-bibtex-text").select()},showFormatted:function(){this.$(".citations-to-formatted").hide();this.$(".citations-to-bibtex").show();this.$(".citations-bibtex").hide();this.$(".citations-formatted").show()},partialWarningElement:function(){if(this.collection.partial){return['<div style="padding:5px 10px">',"<b>Warning: This is a experimental feature.</b> Most Galaxy tools will not annotate"," citations explicitly at this time. When writing up your analysis, please manually"," review your histories and find all references"," that should be cited in order to completely describe your work. Also, please remember to",' <a href="https://wiki.galaxyproject.org/CitingGalaxy">cite Galaxy</a>.',"</div>",].join("")}else{return""}},citationsElement:function(){return['<div class="toolForm">','<div class="toolFormTitle">',c("Citations"),' <i class="fa fa-pencil-square-o citations-to-bibtex" title="Select all as BibTeX."></i>',' <i class="fa fa-times citations-to-formatted" title="Return to formatted citation list."></i>',"</div>",'<div class="toolFormBody" style="padding:5px 10px">',this.partialWarningElement(),'<span class="citations-formatted"></span>',"</div>",'<div class="citations-bibtex toolFormBody" style="padding:5px 10px">','<textarea style="width: 100%; height: 500px;" class="citations-bibtex-text"></textarea>',"</div>","</div>"].join("")}});return{CitationView:b,CitationListView:e}}); \ No newline at end of file +define(["mvc/base-mvc","mvc/citation/citation-model","utils/localization"],function(a,d,c){var b=Backbone.View.extend({tagName:"div",className:"citations",render:function(){this.$el.append("<p>"+this.formattedReference()+"</p>");return this},formattedReference:function(){var k=this.model;var i=k.entryType();var l=k.fields();var g="";var o=this._asSentence((l.author?l.author:"")+(l.year?(" ("+l.year+")"):""))+" ";var n=l.title||"";var h=l.pages?("pp. "+l.pages):"";var p=l.address;if(i=="article"){var j=(l.volume?l.volume:"")+(l.number?(" ("+l.number+")"):"")+(h?", "+h:"");g=o+this._asSentence(n)+(l.journal?("In <em>"+l.journal+", "):"")+this._asSentence(j)+this._asSentence(l.address)+"</em>"}else{if(i=="inproceedings"||i=="proceedings"){g=o+this._asSentence(n)+(l.booktitle?("In <em>"+l.booktitle+", "):"")+(h?h:"")+(p?", "+p:"")+".</em>"}else{if(i=="mastersthesis"||i=="phdthesis"){g=o+this._asSentence(n)+(l.howpublished?l.howpublished+". ":"")+(l.note?l.note+".":"")}else{if(i=="techreport"){g=o+this._asSentence(n)+this._asSentence(l.institution)+this._asSentence(l.number)+this._asSentence(l.type)}else{if(i=="book"||i=="inbook"||i=="incollection"){g=o+" "+this._formatBookInfo(l)}else{g=o+" "+this._asSentence(n)+this._asSentence(l.howpublished)+this._asSentence(l.note)}}}}}var m="";if(l.doi){m="http://dx.doi.org/"+l.doi;g+='[<a href="'+m+'" target="_blank">doi:'+l.doi+"</a>]"}var f=l.url||m;if(f){g+='[<a href="'+f+'" target="_blank">Link</a>]'}return g},_formatBookInfo:function(f){var g="";if(f.chapter){g+=f.chapter+" in "}if(f.title){g+="<em>"+f.title+"</em>"}if(f.editor){g+=", Edited by "+f.editor+", "}if(f.publisher){g+=", "+f.publisher}if(f.pages){g+=", pp. "+f.pages+""}if(f.series){g+=", <em>"+f.series+"</em>"}if(f.volume){g+=", Vol."+f.volume}if(f.issn){g+=", ISBN: "+f.issn}return g+"."},_asSentence:function(f){return(f&&f.trim())?f+". ":""}});var e=Backbone.View.extend({el:"#citations",initialize:function(){this.listenTo(this.collection,"add",this.renderCitation)},events:{"click .citations-to-bibtex":"showBibtex","click .citations-to-formatted":"showFormatted"},renderCitation:function(g){var f=new b({model:g});this.$(".citations-formatted").append(f.render().el);var h=this.$(".citations-bibtex-text");h.val(h.val()+"\n\r"+g.attributes.content)},render:function(){this.$el.html(this.citationsElement());this.collection.each(function(f){this.renderCitation(f)},this);this.showFormatted()},showBibtex:function(){this.$(".citations-to-formatted").show();this.$(".citations-to-bibtex").hide();this.$(".citations-bibtex").show();this.$(".citations-formatted").hide();this.$(".citations-bibtex-text").select()},showFormatted:function(){this.$(".citations-to-formatted").hide();this.$(".citations-to-bibtex").show();this.$(".citations-bibtex").hide();this.$(".citations-formatted").show()},partialWarningElement:function(){if(this.collection.partial){return['<div style="padding:5px 10px">',"<b>Warning: This is a experimental feature.</b> Most Galaxy tools will not annotate"," citations explicitly at this time. When writing up your analysis, please manually"," review your histories and find all references"," that should be cited in order to completely describe your work. Also, please remember to",' <a href="https://wiki.galaxyproject.org/CitingGalaxy">cite Galaxy</a>.',"</div>",].join("")}else{return""}},citationsElement:function(){return['<div class="toolForm">','<div class="toolFormTitle">',c("Citations"),' <i class="fa fa-pencil-square-o citations-to-bibtex" title="Select all as BibTeX."></i>',' <i class="fa fa-times citations-to-formatted" title="Return to formatted citation list."></i>',"</div>",'<div class="toolFormBody" style="padding:5px 10px">',this.partialWarningElement(),'<span class="citations-formatted"></span>',"</div>",'<div class="citations-bibtex toolFormBody" style="padding:5px 10px">','<textarea style="width: 100%; height: 500px;" class="citations-bibtex-text"></textarea>',"</div>","</div>"].join("")}});return{CitationView:b,CitationListView:e}}); \ 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.