PageSourceSearch

https://lms.coxcampus.org/js/listbox.js?build=3.1.9758.31615

js coxcampus.org collected 2026-09-24 10:16:32 UTC 2,733 bytes, 104 lines download raw bytes

1// Set this to true to turn debuging on
2var debug = false;
3
4
5
6//This function takes to parameters "from" and "to"
7//From is the field to take the asset from
8//To is the field to add the asset to
9
10function moveAsset(from,to)
11{
12	source = document.getElementById(from);
13	dest = document.getElementById(to);
14
15	if(source.selectedIndex > -1){
16		destLength = dest.options.length;
17		sourceLength = source.options.length;
18		dest.options[destLength] = new Option(source.options[source.selectedIndex].text,source.options[source.selectedIndex].value);
19		if(debug==true){alert(source.options[source.selectedIndex].value);}
20		
21		if(source.selectedIndex != 0){
22			select = source.selectedIndex - 1;
23		}else{
24			select = source.selectedIndex;
25		}
26		
27		source.options[source.selectedIndex] = null;
28		source.selectedIndex = select;
29	}
30	
31}
32
33
34
35// This function takes one parameter "field"
36// field - is the id of the field to move the selected option down a position
37function moveDown(field)
38{
39	source = document.getElementById(field);
40	if(source.selectedIndex > -1){
41		if(source.selectedIndex != source.options.length - 1){
42		
43		var selectedNum = source.selectedIndex;
44		var nextNum = source.selectedIndex + 1;
45		var selectedValue = source.options[selectedNum].value;
46		var selectedText = source.options[selectedNum].text;
47		var nextValue = source.options[nextNum].value;
48		var nextText = source.options[nextNum].text;
49		
50		source.options[nextNum].text = selectedText;
51		source.options[nextNum].value = selectedValue;
52		source.options[selectedNum].text = nextText;
53		source.options[selectedNum].value = nextValue;
54		
55		source.selectedIndex = nextNum;
56		
57		}
58	}
59}
60
61// This function takes one parameter "field"
62// field - is the id of the field to move the selected option up a position
63function moveUp(field)
64{
65    
66source = document.getElementById(field);
67
68if(source.selectedIndex > -1){
69		if(source.selectedIndex != 0){
70		
71			var selectedNum = source.selectedIndex;
72			var nextNum = source.selectedIndex - 1;
73			var selectedValue = source.options[selectedNum].value;
74			var selectedText = source.options[selectedNum].text;
75			var nextValue = source.options[nextNum].value;
76			var nextText = source.options[nextNum].text;
77			
78			source.options[nextNum].text = selectedText;
79			source.options[nextNum].value = selectedValue;
80			source.options[selectedNum].text = nextText;
81			source.options[selectedNum].value = nextValue;
82			
83			source.selectedIndex = nextNum;
84			
85		}
86	}
87
88}
89
90function selectAllScos(field)
91{
92	source = document.getElementById(field);
93	for(var x=0; x<source.options.length; x++)
94	{
95		source.options[x].selected = true;
96	}
97}
98		
99
100
101
102
103
104

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.