[Python-checkins] cpython (merge 3.5 -> default): #26246: merge with 3.5.
ezio.melotti
python-checkins at python.org
Sat Feb 27 01:46:42 EST 2016
https://hg.python.org/cpython/rev/8c0761260d22
changeset: 100357:8c0761260d22
parent: 100354:b9e5be743d15
parent: 100356:ac175a7af60b
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Sat Feb 27 08:42:14 2016 +0200
summary:
#26246: merge with 3.5.
files:
Doc/tools/static/copybutton.js | 18 +++++++++++-------
Misc/ACKS | 1 +
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/Doc/tools/static/copybutton.js b/Doc/tools/static/copybutton.js
--- a/Doc/tools/static/copybutton.js
+++ b/Doc/tools/static/copybutton.js
@@ -38,20 +38,24 @@
});
// 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');
+ }
+ });
});
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1540,6 +1540,7 @@
Rodrigo Steinmuller Wanderley
Dingyuan Wang
Ke Wang
+Liang-Bo Wang
Greg Ward
Tom Wardill
Zachary Ware
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list