Skip to content

Commit

Permalink
Merge pull request #1321 from carlfeberhard/fix.citations
Browse files Browse the repository at this point in the history
UI, Citations: fix citation-model's import of bibtex to use *either* …
  • Loading branch information
jmchilton committed Dec 15, 2015
2 parents 5bf926b + 2acdbe5 commit 4c3dfc7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
7 changes: 5 additions & 2 deletions client/galaxy/scripts/mvc/citation/citation-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ define([
"libs/bibtex",
"mvc/base-mvc",
"utils/localization"
], function( BibtexParser, baseMVC, _l ){
], function( parseBibtex, baseMVC, _l ){
/* global Backbone */
// we use amd here to require, but bibtex uses a global or commonjs pattern.
// webpack will load via commonjs and plain requirejs will load as global. Check both
parseBibtex = parseBibtex || window.BibtexParser;

var logNamespace = 'citation';
//==============================================================================
Expand All @@ -16,7 +19,7 @@ var Citation = Backbone.Model.extend( baseMVC.LoggableMixin ).extend( {

initialize: function() {
var bibtex = this.get( 'content' );
var entry = BibtexParser(bibtex).entries[0];
var entry = parseBibtex(bibtex).entries[0];
this.entry = entry;
this._fields = {};
var rawFields = entry.Fields;
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/citation/citation-model.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions static/scripts/bundled/analysis.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/mvc/citation/citation-model.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions templates/webapps/galaxy/workflow/editor.mako
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<script type='text/javascript'>
workflow_view = null;
console.debug( 'bibtex?', window.BibtexParser );
// URLs used by galaxy.workflows.js
var config = {
Expand Down

0 comments on commit 4c3dfc7

Please sign in to comment.