--- a/mercurial/templates/static/mercurial.js Wed Jul 03 21:50:20 2013 +0900
+++ b/mercurial/templates/static/mercurial.js Fri Jul 12 16:01:11 2013 +0400
@@ -265,12 +265,9 @@
}
})(document, RegExp, Math, isNaN, Date, false, true)
-function showDiffstat() {
- document.getElementById('diffstatdetails').style.display = 'inline';
- document.getElementById('diffstatexpand').style.display = 'none';
+function toggleDiffstat() {
+ var curdetails = document.getElementById('diffstatdetails').style.display;
+ var curexpand = curdetails == 'none' ? 'inline' : 'none';
+ document.getElementById('diffstatdetails').style.display = curexpand;
+ document.getElementById('diffstatexpand').style.display = curdetails;
}
-
-function hideDiffstat() {
- document.getElementById('diffstatdetails').style.display = 'none';
- document.getElementById('diffstatexpand').style.display = 'inline';
-}