mercurial/templates/static/mercurial.js
changeset 19428 c3cdba6e5d7f
parent 17694 fa714f3ed298
child 19430 5ec5097b4c0f
--- 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';
-}