Subversion Repositories wimsdev

Rev

Rev 12760 | Rev 15584 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
12569 bpr 1
 
2
!! modifiy glossary items
3
max_glossary=!defof MAX_SHEETS in wimshome/public_html/bases/sys/define.conf
4
title_limit=50
5
desc_limit=255
6
!if $cmd=new or $cmd=resume
7
  glossarys=
8
  !for i=1 to $glossarytot
9
    glo=!record $i of $gloss_dir/.glossaryindex
12760 bpr 10
    !distribute lines $glo into a_,t_,d_
11
    glossarys=!append line $i,$t_,$a_,[$d_] to $glossarys
12569 bpr 12
  !next i
13
  glossarytot=!linecnt $glossarys
14
  !ifval $glossarytot=0
15
    error=no_glossary
16
    !exit
17
  !endif
18
  !set glo=!line $gl of $(glossarys)
12760 bpr 19
  !distribute item $glo into d,ti,st,di
20
  !set di=!declosing $di
12569 bpr 21
  !exit
22
!endif
23
!if $cmd=reply
24
  !if $gl=$empty
25
    error=no_pick
26
    !exit
27
  !endif
28
  gl=$[floor($gl)]
29
  !if $gl=NaN or $gl<1 or $gl>min($max_glossary,$glossarytot)
30
    error=bad_glossary
31
    !exit
32
  !endif
33
  !set glocnt=!recordcnt $gloss_dir/.glossary$gl
34
  !for j=1 to $glocnt
35
    !set glocontent=!record $j of $gloss_dir/.glossary$gl
36
    ititle=!singlespace $(title$j)
12760 bpr 37
    idesc=!singlespace $(desc$j)
12569 bpr 38
    !set glocontent=!record $j of $gloss_dir/.glossary$gl
39
    !set sglo=!replace line number 2 by $ititle in $glocontent
12760 bpr 40
    !set sglo=!replace line number 3 by $idesc in $glocontent
12569 bpr 41
    !if $sglo!=$glocontent
42
      !read proc/updatefield.proc $gloss_dir/.glossary$gl\
43
$j\
44
\
45
$sglo
46
    !endif
47
  !next
48
  !for j=1 to $glocnt
49
    !if $(delete$j)=1
50
      !read proc/updatefield.proc $gloss_dir/.glossary$gl\
51
$j\
52
delete
53
    !endif
54
  !next
55
  !read proc/updatefield.proc $gloss_dir/.glossary$gl\
56
2\
57
sort
58
 
59
  glo=!record $gl of $gloss_dir/.glossaryindex
60
  ititle=!singlespace $title
12760 bpr 61
  idesc=!singlespace $desc
12569 bpr 62
  !set glo=$glo\
63
\
64
 
65
  !set sglo=!replace line number 2 by $ititle in $glo
12819 bpr 66
  !set sglo=!replace line number 3 by $idesc in $sglo
12569 bpr 67
  !read proc/updatefield.proc $gloss_dir/.glossaryindex\
68
$gl\
69
\
70
$sglo
71
 
72
!endif
73
 
74
  !!wims_module_log=class $wims_class: add No$glosscnt to glossary $gl
75
!endif