-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
95 lines (94 loc) · 2.55 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!doctype html>
<html>
<head>
<script type="application/javascript" src="gSelect.js"></script>
<style type="text/css">
@import 'gSelect.css';
</style>
<script type="application/javascript">
var sel, msel, tsel;
window.addEventListener('load', function(){
sel = new gSelect('testList',{
'onChange' : function(val){
console.log(val);
}
});
msel = new gSelect('testSelect',{
toggleMode : false,
exclusive : true,
allGroupSelect : true,
'onChange' : function(val){
console.log(val);
}
});
tsel = new gSelect('testSelectToggle',{
'onChange' : function(val){
console.log(val);
}
});
});
</script>
<body>
<table>
<tr>
<th>Single Select</th>
<th>Multi Select Standard</th>
<th>Multi Select Toggle</th>
</tr>
<tr style="vertical-align: top">
<td>
<ul id="testList" class='gList' tabindex='1'>
<li value="sometext">Some text</li>
<li>Another entry</li>
<li>Test test</li>
<li>Some text</li>
<li>Another entry</li>
<li>Test test</li>
<li>Some text</li>
<li>Another entry</li>
<li>Test test</li>
<li>Some text</li>
<li>Another entry</li>
<li>Test test</li>
<li>Some text</li>
<li>Another entry</li>
<li>Test test</li>
</ul>
</td>
<td>
<select id='testSelect' size=15 name='testSelect' multiple >
<option value="no">Option Null</option>
<? for($i=0; $i<40 ; $i++){
if($i%10==0){
if($i>0) echo "</optgroup>";
echo "<optgroup label='Job ".(floor($i/10)+1)."'>";
}
?> <option value="<?=$i?>">Option <?=$i?></option>
<? }
?> </select>
</td>
<td>
<select id='testSelectToggle' multiple size=15 name='testSelectToggle' >
<option value="no">Option Null</option>
<? for($i=0; $i<40 ; $i++){
if($i%10==0){
if($i>0) echo "</optgroup>";
echo "<optgroup label='Job ".(floor($i/10)+1)."'>";
}
?> <option value="<?=$i?>">Option <?=$i?></option>
<? }
?> </select>
</td>
<td>
<select multiple size="15">
<? for($i=0; $i<40 ; $i++){
if($i%10==0){
if($i>0) echo "</optgroup>";
echo "<optgroup label='Job ".(floor($i/10)+1)."'>";
}
?> <option value="<?=$i?>">Option <?=$i?></option>
<? }
?> </select>
</td>
</tr>
</table>