From 0c604c8fe7f813ebf70b8ac4790807884c298155 Mon Sep 17 00:00:00 2001 From: drew n Date: Thu, 14 May 2015 14:44:18 -0700 Subject: [PATCH] add support for custom references from services portal --- oma-profile/oma.js | 1 + oma-profile/oma/biblio.js | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 oma-profile/oma/biblio.js diff --git a/oma-profile/oma.js b/oma-profile/oma.js index 786722f..e465141 100644 --- a/oma-profile/oma.js +++ b/oma-profile/oma.js @@ -47,6 +47,7 @@ define([ , "core/highlight" , "core/best-practices" , "core/figures" +, "oma/biblio" // must be included before core/biblio , "core/biblio" , "core/webidl-contiguous" , "core/webidl-oldschool" diff --git a/oma-profile/oma/biblio.js b/oma-profile/oma/biblio.js new file mode 100644 index 0000000..a59d40d --- /dev/null +++ b/oma-profile/oma/biblio.js @@ -0,0 +1,27 @@ +// oma/biblio +// This should be removed and references should be integrated with the +// specref database. + +define( + [], + function () { + return { + run: function (conf, doc, cb, msg) { + msg.pub("start", "oma/biblio"); + + $.ajax({ + url: "http://oma-services.herokuapp.com/refdb.json", + dataType: "json", + success: function(data) { + conf.localBiblio = data; + }, + error: function(xhr, status, error) { + } + }); + + msg.pub("end", "oma/biblio"); + cb(); + } + }; + } +);