Skip to content

Commit

Permalink
#752 open links in new windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikdzo committed Nov 30, 2022
1 parent 5440dfc commit 627ccd9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/reference/ReferenceListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<a
:href="getDoiUrl(entity.doi)"
:title="getDoiUrl(entity.doi)"
target="DoiWindow"
target="_blank"
:class="`${bodyActiveColor}--text`"
>https://doi.org/{{ entity.doi }}
</a>
Expand All @@ -60,9 +60,8 @@
<span>
<a
v-if="entity.attachment__filename"
:href="getFileUrl(entity.attachment__filename)"
:title="getFileUrl(entity.attachment__filename)"
target="FileWindow"
@click="openWindow(getFileUrl(entity.attachment__filename))"
class="green-link"
>
<b>PDF</b>
Expand All @@ -73,9 +72,8 @@
entity.url &&
getUrl(entity.url)
"
:href="getUrl(entity.url)"
:title="getUrl(entity.url)"
target="UrlWindow"
@click="openWindow(getUrl(entity.url))"
rel="noopener noreferrer"
class="red-link"
>
Expand Down Expand Up @@ -119,7 +117,9 @@ export default {
return "http://" + url.substring(url.indexOf("www."));
else return false;
},
openWindow(url) {
window.open(url, "", "width=1000,height=900");
},
openDOI(params) {
// TODO: Check for correct doi address
window.open("https://doi.org/" + params.doi, "", "width=1000,height=900");
Expand Down

0 comments on commit 627ccd9

Please sign in to comment.