Skip to content
Snippets Groups Projects
Commit 96d0af9b authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Merge pull request #702 from EreMaijala/embed-openurl

Publish embedOpenUrlLinks() method in VuFind.openurl so that it can be called from other scripts.
parents 497b14d1 dd9e9591
No related merge requests found
......@@ -17,7 +17,7 @@ VuFind.register('openurl', function() {
});
};
var _embedOpenUrlLinks = function(element) {
var embedOpenUrlLinks = function(element) {
// Extract the OpenURL associated with the clicked element:
var openUrl = element.children('span.openUrl:first').attr('title');
......@@ -53,11 +53,14 @@ VuFind.register('openurl', function() {
// assign action to the openUrlEmbed link class
container.find('.openUrlEmbed a').unbind('click').click(function() {
_embedOpenUrlLinks($(this));
embedOpenUrlLinks($(this));
return false;
});
container.find('.openUrlEmbed.openUrlEmbedAutoLoad a').trigger('click');
};
return {init: init};
return {
init: init,
embedOpenUrlLinks: embedOpenUrlLinks
};
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment