Skip to content

Commit

Permalink
Close right panels when clicking outside
Browse files Browse the repository at this point in the history
  • Loading branch information
laulaz committed Jun 15, 2017
1 parent e93577a commit da5902e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cpskin/core/browser/resources/js/right_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,26 @@ jQuery(document).ready(function($) {
$('#useful-links-button').click(function(event) {
show = $('#useful-links-container').hasClass('hidden-right-panel');
toggle_useful_links(show);
event.stopPropagation();
event.preventDefault();
});

$('#table-of-contents-button').click(function(event) {
show = $('#table-of-contents-container').hasClass('hidden-right-panel');
toggle_toc(show);
event.stopPropagation();
event.preventDefault();
});

$('#document-toc a').click(function(event) {
hide_all();
event.stopPropagation();
});


$(window).click(function() {
hide_all();
});
});

});

0 comments on commit da5902e

Please sign in to comment.