Commit | Line | Data |
71eba67c |
1 | function compareDiffs(repo, path){ |
2 | var f = document.theform; |
3 | if(!repo){ |
4 | var repo = ""; |
5 | } |
6 | if(!path){ |
7 | var path = ""; |
8 | } |
9 | var sha1,sha2; |
10 | for(var i=0,len=f.length;i<len;i++){ |
11 | if(f[i].name == "sha1_a"){ |
12 | if(f[i].checked){ |
13 | sha1 = f[i].value; |
14 | } |
15 | } |
16 | if(f[i].name == "sha1_b"){ |
17 | if(f[i].checked){ |
18 | sha2 = f[i].value; |
19 | } |
20 | } |
21 | } |
22 | //document.location.href = [% c.uri_for("/" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path) %]; |
23 | document.location.href = "/" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path; |
24 | } |