Patchwork [6,of,6] hgweb: add line wrapping switch to file diff and changeset views

login
register
mail settings
Submitter Alexander Plavin
Date July 12, 2013, 9:07 p.m.
Message ID <691e530f63e206eef4ec.1373663263@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/1851/
State Superseded, archived
Headers show

Comments

Alexander Plavin - July 12, 2013, 9:07 p.m.
# HG changeset patch
# User Alexander Plavin <me@aplavin.ru>
# Date 1373662676 -14400
#      Sat Jul 13 00:57:56 2013 +0400
# Node ID 691e530f63e206eef4ec653e7a73dace76f934ec
# Parent  0f5a867a0f2ce6396b709ed9831f7f64f9e578cd
hgweb: add line wrapping switch to file diff and changeset views

Patch

diff -r 0f5a867a0f2c -r 691e530f63e2 mercurial/templates/paper/changeset.tmpl
--- a/mercurial/templates/paper/changeset.tmpl	Sat Jul 13 00:57:10 2013 +0400
+++ b/mercurial/templates/paper/changeset.tmpl	Sat Jul 13 00:57:56 2013 +0400
@@ -77,6 +77,7 @@ 
 </table>
 
 <div class="overflow">
+<div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
 <div class="sourcefirst"> line diff</div>
 <div class="stripes2 reset-lineno">
 {diff}
diff -r 0f5a867a0f2c -r 691e530f63e2 mercurial/templates/paper/filediff.tmpl
--- a/mercurial/templates/paper/filediff.tmpl	Sat Jul 13 00:57:10 2013 +0400
+++ b/mercurial/templates/paper/filediff.tmpl	Sat Jul 13 00:57:56 2013 +0400
@@ -68,6 +68,7 @@ 
 </table>
 
 <div class="overflow">
+<div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
 <div class="sourcefirst"> line diff</div>
 <div class="stripes2 reset-lineno">
 {diff}
diff -r 0f5a867a0f2c -r 691e530f63e2 tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t	Sat Jul 13 00:57:10 2013 +0400
+++ b/tests/test-hgweb-commands.t	Sat Jul 13 00:57:56 2013 +0400
@@ -450,6 +450,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
diff -r 0f5a867a0f2c -r 691e530f63e2 tests/test-hgweb-diffs.t
--- a/tests/test-hgweb-diffs.t	Sat Jul 13 00:57:10 2013 +0400
+++ b/tests/test-hgweb-diffs.t	Sat Jul 13 00:57:56 2013 +0400
@@ -142,6 +142,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
@@ -272,6 +273,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
@@ -405,6 +407,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
@@ -539,6 +542,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
diff -r 0f5a867a0f2c -r 691e530f63e2 tests/test-hgweb-removed.t
--- a/tests/test-hgweb-removed.t	Sat Jul 13 00:57:10 2013 +0400
+++ b/tests/test-hgweb-removed.t	Sat Jul 13 00:57:56 2013 +0400
@@ -115,6 +115,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
@@ -216,6 +217,7 @@ 
   </table>
   
   <div class="overflow">
+  <div class="sourcefirst" style="float: right;">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
   <div class="sourcefirst"> line diff</div>
   <div class="stripes2 reset-lineno">
   <div class="bottomline inc-lineno"><pre class="sourcelines wrap">