Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions js/browzine.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Define Angular module and whitelist URL of server with Node.js script
var app = angular.module('viewCustom', ['angularLoad'])
.constant('nodeserver', "https://yourserver.edu")
.constant('nodeserver', "https://apiconnector.thirdiron.com/v1/libraries/your_browzine_library_id")
.config(['$sceDelegateProvider', 'nodeserver', function ($sceDelegateProvider, nodeserver) {
var urlWhitelist = $sceDelegateProvider.resourceUrlWhitelist();
urlWhitelist.push(nodeserver + '**');
$sceDelegateProvider.resourceUrlWhitelist(urlWhitelist);
var urlWhitelist = $sceDelegateProvider.resourceUrlWhitelist();
urlWhitelist.push(nodeserver + '**');
$sceDelegateProvider.resourceUrlWhitelist(urlWhitelist);
}]);

// Add Article In Context & BrowZine Links
Expand All @@ -13,7 +13,7 @@ var app = angular.module('viewCustom', ['angularLoad'])
$scope.book_icon = "https://s3.amazonaws.com/thirdiron-assets/images/integrations/browzine_open_book_icon.png";
if (vm.parentCtrl.result.pnx.addata.doi && vm.parentCtrl.result.pnx.display.type[0] == 'article') {
vm.doi = vm.parentCtrl.result.pnx.addata.doi[0] || '';
var articleURL = nodeserver + "/primo/browzine/articles?DOI=" + vm.doi;
var articleURL = nodeserver + "/articles?DOI=" + vm.doi;
$http.jsonp(articleURL, {jsonpCallbackParam: 'callback'}).then(function(response) {
$scope.article = response.data;
}, function(error){
Expand All @@ -22,7 +22,7 @@ var app = angular.module('viewCustom', ['angularLoad'])
}
if (vm.parentCtrl.result.pnx.addata.issn && vm.parentCtrl.result.pnx.display.type[0] == 'journal') {
vm.issn = vm.parentCtrl.result.pnx.addata.issn[0].replace("-", "") || '';
var journalURL = nodeserver + "/primo/browzine/journals?ISSN=" + vm.issn;
var journalURL = nodeserver + "/journals?ISSN=" + vm.issn;
$http.jsonp(journalURL, {jsonpCallbackParam: 'callback'}).then(function(response) {
$scope.journal = response.data;
}, function(error){
Expand Down Expand Up @@ -50,7 +50,7 @@ app.controller('prmSearchResultThumbnailContainerAfterController', function ($sc
var newThumbnail = '';
if (vm.parentCtrl.item.pnx.addata.issn) {
vm.issn = vm.parentCtrl.item.pnx.addata.issn[0].replace("-", "") || '';
var journalURL = nodeserver + "/primo/browzine/journals?ISSN=" + vm.issn;
var journalURL = nodeserver + "/journals?ISSN=" + vm.issn;
$http.jsonp(journalURL, { jsonpCallbackParam: 'callback' }).then(function (response) {
newThumbnail = response.data.data["0"].coverImageUrl;
}, function (error) {
Expand Down