Skip to content

Commit

Permalink
python#26246: merge with 3.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezio-melotti committed Feb 27, 2016
2 parents 5d94134 + 90ba2ca commit 738f88f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Doc/tools/static/copybutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,24 @@ $(document).ready(function() {
});

// define the behavior of the button when it's clicked
$('.copybutton').toggle(
function() {
var button = $(this);
$('.copybutton').click(function(e){
e.preventDefault();
var button = $(this);
if (button.data('hidden') === 'false') {
// hide the code output
button.parent().find('.go, .gp, .gt').hide();
button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
button.css('text-decoration', 'line-through');
button.attr('title', show_text);
},
function() {
var button = $(this);
button.data('hidden', 'true');
} else {
// show the code output
button.parent().find('.go, .gp, .gt').show();
button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
button.css('text-decoration', 'none');
button.attr('title', hide_text);
});
button.data('hidden', 'false');
}
});
});

1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@ Kevin Walzer
Rodrigo Steinmuller Wanderley
Dingyuan Wang
Ke Wang
Liang-Bo Wang
Greg Ward
Tom Wardill
Zachary Ware
Expand Down

0 comments on commit 738f88f

Please sign in to comment.