Skip to content

Commit

Permalink
Use proper baseurl and clippy paths with root and subdir deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilskalns committed Oct 22, 2018
1 parent b667496 commit 3c38890
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/js/docdock.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ function fallbackMessage(action) {
}

jQuery(document).ready(function() {

baseurl = baseurl.endsWith('/')?baseurl:baseurl+'/';

jQuery('#sidebar .category-icon').on('click', function() {
$( this ).toggleClass("fa-angle-down fa-angle-right") ;
$( this ).parent().parent().children('ul').toggle() ;
Expand Down Expand Up @@ -185,7 +188,7 @@ jQuery(document).ready(function() {
clipInit = true;
}

code.after('<span class="copy-to-clipboard" title="Copy to clipboard"><object class="clippy-icon" type="image/svg+xml" data="' + baseurl + '/images/clippy.svg"/></span>');
code.after('<span class="copy-to-clipboard" title="Copy to clipboard"><object class="clippy-icon" type="image/svg+xml" data="' + baseurl + 'images/clippy.svg"/></span>');
code.next('.copy-to-clipboard').on('mouseleave', function() {
$(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w');
});
Expand Down

0 comments on commit 3c38890

Please sign in to comment.