4
function move( listId ) {
6
var fromList = document.getElementById(listId);
8
if ( fromList.selectedIndex == -1 ) { return; }
10
if ( ! availableList ) {
11
availableList = document.getElementById('availableList');
14
if ( ! selectedList ) {
15
selectedList = document.getElementById('selectedList');
18
var toList = ( fromList == availableList ? selectedList : availableList );
20
while ( fromList.selectedIndex > -1 ) {
21
option = fromList.options.item(fromList.selectedIndex);
22
fromList.remove(fromList.selectedIndex);
23
toList.add(option, null);
28
var selectedListAuthority;
29
var availableListAuthority;
31
function moveAuthority( listId ) {
33
var fromList = document.getElementById(listId);
35
if ( fromList.selectedIndex == -1 ) { return; }
37
if ( ! availableListAuthority ) {
38
availableListAuthority = document.getElementById('availableListAuthority');
41
if ( ! selectedListAuthority ) {
42
selectedListAuthority = document.getElementById('selectedListAuthority');
45
var toList = ( fromList == availableListAuthority ? selectedListAuthority : availableListAuthority );
47
while ( fromList.selectedIndex > -1 ) {
48
option = fromList.options.item(fromList.selectedIndex);
49
fromList.remove(fromList.selectedIndex);
50
toList.add(option, null);
55
function submitForm() {
57
if ( ! availableList ) {
58
availableList = document.getElementById('availableList');
61
if ( ! selectedList ) {
62
selectedList = document.getElementById('selectedList');
65
// selectAll(availableList);
66
selectAll(selectedList);
72
function selectAll(list) {
74
for ( var i = 0, option; option = list.options.item(i); i++ ) {
75
option.selected = true;
b'\\ No newline at end of file'