clone.sh: tolerate empty email addresses
[girocco.git] / html / girocco.js
blobe3155148ed686bbfd2a187362cb7bd75d01e9344
1 /* Girocco JS */
4 /* Hide/show various bits depending on mirror/push
5  * mode in regproj.cgi: */
7 var tr_display;
8 function mirror_push__click(ev, which) {
9         if (!ev) var ev = window.event;
10         if (which == 'mirror') {
11                 document.getElementById('mirror_url').style.display = tr_display;
12         } else {
13                 document.getElementById('mirror_url').style.display = 'none';
14         }
16 function mirror_push_prepare(mr, pr) {
17         if (!mr || !pr)
18                 return;
19         mr.onclick = function(e) { mirror_push__click(e, 'mirror') };
20         pr.onclick = function(e) { mirror_push__click(e, 'push') };
21         tr_display = document.getElementById('mirror_url').style.display;
23 window.addEvent('domready', function() {
24         mirror_push_prepare(document.getElementById('mirror_radio'),
25                             document.getElementById('push_radio'));
26 });