|
1
|
/* This script runs when the submenu contains controls created by routines |
|
2
|
** like style_submenu_checkbox() or style_submenu_multichoice() - controls |
|
3
|
** that require javascript support. |
|
4
|
*/ |
|
5
|
|
|
6
|
function toggle_annotation_log(){ |
|
7
|
var w = document.getElementById("annotation_log"); |
|
8
|
var x = document.forms["f01"].elements["log"].checked |
|
9
|
w.style.display = x ? "block" : "none"; |
|
10
|
} |
|
11
|
function submenu_onchange_submit(){ |
|
12
|
var w = document.getElementById("f01"); |
|
13
|
w.submit(); |
|
14
|
} |
|
15
|
|
|
16
|
(function (){ |
|
17
|
for(var i=0; 1; i++){ |
|
18
|
var x = document.getElementById("submenuctrl-"+i); |
|
19
|
if(!x) break; |
|
20
|
if( !x.hasAttribute('data-ctrl') ){ |
|
21
|
x.onchange = submenu_onchange_submit; |
|
22
|
}else{ |
|
23
|
var cx = x.getAttribute('data-ctrl'); |
|
24
|
if( cx=="toggle_annotation_log" ){ |
|
25
|
x.onchange = toggle_annotation_log; |
|
26
|
} |
|
27
|
} |
|
28
|
} |
|
29
|
})(); |
|
30
|
|