diff --git a/rhodecode/templates/files/diff_2way.html b/rhodecode/templates/files/diff_2way.html
--- a/rhodecode/templates/files/diff_2way.html
+++ b/rhodecode/templates/files/diff_2way.html
@@ -45,8 +45,8 @@
- ##${c.ignorews_url(request.GET, h.FID(c.cs2,path))}
- ##${c.context_url(request.GET, h.FID(c.cs2,path))}
+ ${h.checkbox('ignorews', label=_('ignore white space'))}
+ ${h.checkbox('edit_mode', label=_('turn on edit mode'))}
@@ -73,6 +73,17 @@ var orig2 = '${(c.orig2)|n}';
setValue(orig2);
},
});
+ $('#ignorews').change(function(e){
+ var val = e.currentTarget.checked;
+ $('#compare').mergely('options', {ignorews: val});
+ $('#compare').mergely('update');
+ })
+ $('#edit_mode').change(function(e){
+ var val = !e.currentTarget.checked;
+ $('#compare').mergely('cm', 'lhs').setOption('readOnly', val);
+ $('#compare').mergely('cm', 'rhs').setOption('readOnly', val);
+ $('#compare').mergely('update');
+ })
});