File: chooselist.phtml

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (55 lines) | stat: -rw-r--r-- 2,423 bytes parent folder | download | duplicates (2)
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
!! wims_chooselist_checked
!! wims_chooselist_select
!! wims_chooselist_option
!! wims_chooselist_data  : empty is default mode if non empty wims_chooselist_checked and wims_chooselist_select are name of file to read data instead of data
!!                        (in this case wims_chooselist_data should be number of line of file wims_chooselist_select).
!! select : names of the three variables left form, right form, invisible form
!set select_=!words2items $wims_read_parm

!if $wims_chooselist_data=$empty
  !set cnt_chooselist=!linecnt $wims_chooselist_select
!else
  !set cnt_chooselist=$wims_chooselist_data
!endif
!default wims_chooselist_option=style="min-width:200px" multiple="multiple" size="$[max(min($cnt_chooselist,15),2)]"
<table class="wimscenter wimsnoborder" id="wims_chooselist">
 <tr>
  <td valign="top">
   <select  $wims_chooselist_option name="$(select_[1])"
    ondblclick="moveSelections(this.form.elements['$(select_[1])'], this.form.elements['$(select_[2])'], this.form.elements['$(select_[3])'], 'add')">
    !if $wims_chooselist_data!=$empty
      !record 0 of $wims_chooselist_select
    !else
      $wims_chooselist_select
    !endif
   </select>
  </td><td>
    <input name="add" value=" &gt;&gt; " type="button" class="wims_button"
      onclick="moveSelections(this.form.elements['$(select_[1])'],
      this.form.elements['$(select_[2])'], this.form.elements['$(select_[3])'], 'add'); return false;"/>
    <br/>
    <input name="remove" value=" &lt;&lt; " type="button" class="wims_button"
      onclick="moveSelections(this.form.elements['$(select_[1])'],
      this.form.elements['$(select_[2])'], this.form.elements['$(select_[3])'], 'remove'); return false;"/>
  </td><td valign="top">
   <select $wims_chooselist_option name="$(select_[2])" ondblclick="moveSelections(this.form.elements['$(select_[1])'],
    this.form.elements['$(select_[2])'], this.form.elements['$(select_[3])'], 'remove')">
    !if $wims_chooselist_data!=$empty
      !record 0 of $wims_chooselist_checked
    !else
      $wims_chooselist_checked
    !endif
    </select>
   <select style="overflow: hidden; visibility: hidden; width: 1px; height: 0;" name="$(select_[3])"
    multiple="multiple" size="10">
    !if $wims_chooselist_data!=$empty
      !record 0 of $wims_chooselist_checked
    !else
      $wims_chooselist_checked
    !endif
    </select>
  </td>
 </tr>
</table>

!reset wims_chooselist_data