Skip to content

Commit

Permalink
Fix Share Div (#7)
Browse files Browse the repository at this point in the history
* Fixes broken finish button and removes embed fieldset/not supported by us
  • Loading branch information
DiegoPino authored Jul 19, 2019
1 parent a0cb0a5 commit 706f3b4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions js/islandora_book_reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -956,4 +956,15 @@ IslandoraBookReader.prototype.blankFulltextDiv = function() {
// Call the original Method.
return BookReader.prototype.paramsFromFragment(urlFragment);
}
// Overrides buildShareDiv().
IslandoraBookReader.prototype.buildShareDiv = function(jShareDiv) {
BookReader.prototype.buildShareDiv.call(this, jShareDiv);
var finishedDiv = jShareDiv.find("button.share-finished");
if (finishedDiv.length > 0) {
finishedDiv[0].setAttribute('onclick', "parent.jQuery.colorbox.close();");
}
// No embed for us.
jShareDiv.find('fieldset.fieldset-embed').remove();
}

})(jQuery);

0 comments on commit 706f3b4

Please sign in to comment.