Add age to commit info.
[catagits/Gitalist.git] / root / static / js / common.js
CommitLineData
666bb4cf 1// THIS IS NOT USED - it is in the wrapper.tt as js is not parsed by TT (needed for the c.uri_for)
71eba67c 2function compareDiffs(repo, path){
3 var f = document.theform;
4 if(!repo){
5 var repo = "";
6 }
7 if(!path){
8 var path = "";
9 }
10 var sha1,sha2;
11 for(var i=0,len=f.length;i<len;i++){
12 if(f[i].name == "sha1_a"){
13 if(f[i].checked){
14 sha1 = f[i].value;
15 }
16 }
17 if(f[i].name == "sha1_b"){
18 if(f[i].checked){
19 sha2 = f[i].value;
20 }
21 }
22 }
666bb4cf 23 document.location.href = [% c.uri_for("/" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path) %];
71eba67c 24}