making external links open new page

legacy_v1
Michael Winter 5 years ago
parent 3473e6a9ea
commit 64ca586e75

@ -732,10 +732,12 @@ console.log(href);
documentButton = $('<button id=piece_document_button_'+index+" onclick=' window.open('" + href.replace(/\//g, '\/') + "','_blank')>") documentButton = $('<button id=piece_document_button_'+index+" onclick=' window.open('" + href.replace(/\//g, '\/') + "','_blank')>")
.attr({title: "view"}).addClass('score_icon'); .attr({title: "view"}).addClass('score_icon');
} else { } else {
console.log(href);
documentButton = $('<button id=piece_document_button_'+index+" data-iframe='true' data-src='"+href+download+"'>") documentButton = $('<button id=piece_document_button_'+index+" data-iframe='true' data-src='"+href+download+"'>")
.attr({title: "view"}).addClass('score_icon'); .attr({title: "view"}).addClass('score_icon');
if(typeof doc != 'undefined'){
documentButton.lightGallery({ documentButton.lightGallery({
selector: 'this', selector: 'this',
width: '90%', width: '90%',
@ -766,6 +768,12 @@ console.log(href);
}) })
} }
} else {
documentButton = $('<button id=piece_document_button_'+index+">").attr({title: "view"}).addClass('score_icon');
documentButton.click(function() {
window.open=href;
});
}
} }

Loading…
Cancel
Save