Rev 12760 | Go to most recent revision | Details | 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 |
||
10 | !distribute lines $glo into a_,t_ |
||
11 | glossarys=!append line $i,$t_ to $glossarys |
||
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) |
||
19 | !distribute item $glo into d,ti |
||
20 | !exit |
||
21 | !endif |
||
22 | !if $cmd=reply |
||
23 | !if $gl=$empty |
||
24 | error=no_pick |
||
25 | !exit |
||
26 | !endif |
||
27 | gl=$[floor($gl)] |
||
28 | !if $gl=NaN or $gl<1 or $gl>min($max_glossary,$glossarytot) |
||
29 | error=bad_glossary |
||
30 | !exit |
||
31 | !endif |
||
32 | !set glocnt=!recordcnt $gloss_dir/.glossary$gl |
||
33 | !for j=1 to $glocnt |
||
34 | !set glocontent=!record $j of $gloss_dir/.glossary$gl |
||
35 | ititle=!singlespace $(title$j) |
||
36 | !set glocontent=!record $j of $gloss_dir/.glossary$gl |
||
37 | !set sglo=!replace line number 2 by $ititle in $glocontent |
||
38 | !if $sglo!=$glocontent |
||
39 | !read proc/updatefield.proc $gloss_dir/.glossary$gl\ |
||
40 | $j\ |
||
41 | \ |
||
42 | $sglo |
||
43 | !endif |
||
44 | !next |
||
45 | !for j=1 to $glocnt |
||
46 | !if $(delete$j)=1 |
||
47 | !read proc/updatefield.proc $gloss_dir/.glossary$gl\ |
||
48 | $j\ |
||
49 | delete |
||
50 | !endif |
||
51 | !next |
||
52 | !read proc/updatefield.proc $gloss_dir/.glossary$gl\ |
||
53 | 2\ |
||
54 | sort |
||
55 | |||
56 | glo=!record $gl of $gloss_dir/.glossaryindex |
||
57 | ititle=!singlespace $title |
||
58 | !set glo=$glo\ |
||
59 | \ |
||
60 | |||
61 | !set sglo=!replace line number 2 by $ititle in $glo |
||
62 | !read proc/updatefield.proc $gloss_dir/.glossaryindex\ |
||
63 | $gl\ |
||
64 | \ |
||
65 | $sglo |
||
66 | |||
67 | !endif |
||
68 | |||
69 | !!wims_module_log=class $wims_class: add No$glosscnt to glossary $gl |
||
70 | !endif |