Skip to content

Commit

Permalink
Use the resolve service URL when the object service URL is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenwalker committed Nov 28, 2016
1 parent f009b6e commit f307d55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metacatui/src/main/webapp/js/views/MetadataIndexView.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ define(['jquery',

var icon = $(document.createElement("i")).addClass(icon),
title = $(document.createElement("span")).text(solrResult.get("id")).addClass("title"),
downloadBtn = view.downloadButtonTemplate({ href: appModel.get("objectServiceUrl") + encodeURIComponent(solrResult.get("id")), className: "btn btn-primary" }),
downloadBtn = view.downloadButtonTemplate({ href: solrResult.get("url"), className: "btn btn-primary" }),
anchor = $(document.createElement("a")).attr("name", encodeURIComponent(solrResult.get("id"))),
header = $(document.createElement("h4")).append(anchor).append(icon).append(title).append(downloadBtn);

Expand Down
2 changes: 1 addition & 1 deletion metacatui/src/main/webapp/js/views/MetadataView.js
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ define(['jquery',
//Create an element using the dataDisplay template
html = this.dataDisplayTemplate({
type : "pdf",
src : appModel.get('objectServiceUrl') + pdfs[i].id,
src : (appModel.get('objectServiceUrl') || appModel.get('resolveServiceUrl')) + pdfs[i].id,
title : title
});

Expand Down

0 comments on commit f307d55

Please sign in to comment.