Skip to content
Snippets Groups Projects
Commit dd9e9591 authored by Ere Maijala's avatar Ere Maijala
Browse files

Publish embedOpenUrlLinks() method in VuFind.openurl so that it can be called from other scripts.

parent 57a795c8
No related merge requests found
...@@ -17,7 +17,7 @@ VuFind.register('openurl', function() { ...@@ -17,7 +17,7 @@ VuFind.register('openurl', function() {
}); });
}; };
var _embedOpenUrlLinks = function(element) { var embedOpenUrlLinks = function(element) {
// Extract the OpenURL associated with the clicked element: // Extract the OpenURL associated with the clicked element:
var openUrl = element.children('span.openUrl:first').attr('title'); var openUrl = element.children('span.openUrl:first').attr('title');
...@@ -53,11 +53,14 @@ VuFind.register('openurl', function() { ...@@ -53,11 +53,14 @@ VuFind.register('openurl', function() {
// assign action to the openUrlEmbed link class // assign action to the openUrlEmbed link class
container.find('.openUrlEmbed a').unbind('click').click(function() { container.find('.openUrlEmbed a').unbind('click').click(function() {
_embedOpenUrlLinks($(this)); embedOpenUrlLinks($(this));
return false; return false;
}); });
container.find('.openUrlEmbed.openUrlEmbedAutoLoad a').trigger('click'); 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