mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Remove galaxy customizations in bibtex.js, monkeypatch it on load instead. Lock w/ yarn, etc.
This commit is contained in:
@@ -93,8 +93,6 @@ function BibtexParser(arg0) {
|
||||
'booklet' : 14,
|
||||
'masterthesis' : 15,
|
||||
'conference' : 16
|
||||
,'online' : 998 // Galaxy MOD: Handle @online entries for preprints.
|
||||
,'data' : 999 // Galaxy MOD: Handle @data citations coming from figshare.
|
||||
}
|
||||
/** @private */ this.MACROS_ = {
|
||||
'jan' : 'January',
|
||||
|
||||
@@ -8,6 +8,12 @@ define([
|
||||
// webpack will load via commonjs and plain requirejs will load as global. Check both
|
||||
parseBibtex = parseBibtex || window.BibtexParser;
|
||||
|
||||
_.extend(parseBibtex.ENTRY_TYPES_, {
|
||||
'online' : 998, // Galaxy MOD: Handle @online entries for preprints.
|
||||
'data' : 999 // Galaxy MOD: Handle @data citations coming from figshare.
|
||||
});
|
||||
|
||||
|
||||
var logNamespace = 'citation';
|
||||
//==============================================================================
|
||||
/** @class model for tool citations.
|
||||
@@ -94,4 +100,4 @@ return {
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@ var paths = {
|
||||
// not be necessary.
|
||||
'backbone': [ 'backbone.js', 'backbone.js' ],
|
||||
'd3': [ 'd3.js', 'd3.js' ],
|
||||
'bib2json': [ 'Parser.js', 'bibtex.js' ],
|
||||
'jquery': ['dist/jquery.js', 'jquery/jquery.js'],
|
||||
'jquery-migrate': [ 'dist/jquery-migrate.js', 'jquery/jquery.migrate.js' ],
|
||||
'raven-js': ['dist/raven.js', 'raven.js'],
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
"backbone": "1.3",
|
||||
"bib2json": "^0.0.1",
|
||||
"concurrently": "^3.4.0",
|
||||
"d3": "3",
|
||||
"del": "^3.0.0",
|
||||
|
||||
@@ -734,6 +734,10 @@ beeper@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
|
||||
|
||||
bib2json@^0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/bib2json/-/bib2json-0.0.1.tgz#c33bcf6f35edb4647fd75ff76f25bd7999fc3f31"
|
||||
|
||||
big.js@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
"use strict";define(["libs/bibtex","mvc/base-mvc","utils/localization"],function(t,i,e){t=t||window.BibtexParser;var n=Backbone.Model.extend(i.LoggableMixin).extend({_logNamespace:"citation",defaults:{content:""},initialize:function(){var i;try{i=t(this.attributes.content)}catch(t){return}if(i.errors.length){var e=i.errors.reduce(function(t,i){return t+"; "+i});this.log("Error parsing bibtex: "+e)}if(this._fields={},this.entry=_.first(i.entries),this.entry){var n=this.entry.Fields;for(var o in n){var r=n[o],s=o.toLowerCase();this._fields[s]=r}}},entryType:function(){return this.entry?this.entry.EntryType:void 0},fields:function(){return this._fields}}),o=Backbone.Collection.extend(i.LoggableMixin).extend({_logNamespace:"citation",urlRoot:Galaxy.root+"api",partial:!0,model:n});return{Citation:n,HistoryCitationCollection:o.extend({url:function(){return this.urlRoot+"/histories/"+this.history_id+"/citations"}}),ToolCitationCollection:o.extend({url:function(){return this.urlRoot+"/tools/"+this.tool_id+"/citations"},partial:!1})}});
|
||||
"use strict";define(["libs/bibtex","mvc/base-mvc","utils/localization"],function(t,i,e){t=t||window.BibtexParser,_.extend(t.ENTRY_TYPES_,{online:998,data:999});var n=Backbone.Model.extend(i.LoggableMixin).extend({_logNamespace:"citation",defaults:{content:""},initialize:function(){var i;try{i=t(this.attributes.content)}catch(t){return}if(i.errors.length){var e=i.errors.reduce(function(t,i){return t+"; "+i});this.log("Error parsing bibtex: "+e)}if(this._fields={},this.entry=_.first(i.entries),this.entry){var n=this.entry.Fields;for(var o in n){var r=n[o],s=o.toLowerCase();this._fields[s]=r}}},entryType:function(){return this.entry?this.entry.EntryType:void 0},fields:function(){return this._fields}}),o=Backbone.Collection.extend(i.LoggableMixin).extend({_logNamespace:"citation",urlRoot:Galaxy.root+"api",partial:!0,model:n});return{Citation:n,HistoryCitationCollection:o.extend({url:function(){return this.urlRoot+"/histories/"+this.history_id+"/citations"}}),ToolCitationCollection:o.extend({url:function(){return this.urlRoot+"/tools/"+this.tool_id+"/citations"},partial:!1})}});
|
||||
//# sourceMappingURL=../../../maps/mvc/citation/citation-model.js.map
|
||||
|
||||
Reference in New Issue
Block a user