[Python-checkins] r88843 - in tracker/instances/python-dev/html: issue.item.html issue.item.js

ezio.melotti python-checkins at python.org
Sat May 28 01:35:46 CEST 2011


Author: ezio.melotti
Date: Sat May 28 01:35:46 2011
New Revision: 88843
Log:
#401: add a "Show/Hide History" button that (un)folds the history.
Modified:
 tracker/instances/python-dev/html/issue.item.html
 tracker/instances/python-dev/html/issue.item.js
Modified: tracker/instances/python-dev/html/issue.item.html
==============================================================================
--- tracker/instances/python-dev/html/issue.item.html	(original)
+++ tracker/instances/python-dev/html/issue.item.html	Sat May 28 01:35:46 2011
@@ -11,6 +11,7 @@
 </title>
 
 <metal:slot fill-slot="more-javascript">
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
 <script type="text/javascript" src="@@file/issue.item.js"></script>
 </metal:slot>
 
Modified: tracker/instances/python-dev/html/issue.item.js
==============================================================================
--- tracker/instances/python-dev/html/issue.item.js	(original)
+++ tracker/instances/python-dev/html/issue.item.js	Sat May 28 01:35:46 2011
@@ -41,3 +41,17 @@
 nosy.style.display = 'inline';
 nosy.style.width = new_width + "px";
 }
+
+$(document).ready(function() {
+ /* Add a "Show/Hide history" button that (un)folds the history. See #401 */
+ var th = $('<td colspan="4">Show History</td>');
+ th.css({'cursor': 'pointer', 'text-align': 'center',
+ 'border': '1px solid #ccc'});
+ /* select and hide all the tr except the first one ("History") */
+ $('table.history tr:not(:first-child)').toggle();
+ th.click(function() {
+ $('table.history tr:not(:first-child)').toggle();
+ th.text(th.text() == 'Show History' ? 'Hide History' : 'Show History');
+ });
+ $('table.history').append(th.wrap('<tr id="togglehistory" />'));
+})


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /