Rev 13985 | Rev 13991 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | #! /bin/sh |
2 | |||
3 | cd `dirname $0` |
||
3799 | bpr | 4 | cd .. |
5 | WIMS_HOME=`pwd` |
||
7355 | bpr | 6 | if [ -f ../../log/wims.conf ] ; then |
7 | language=`awk -F= '$1=="site_languages" {print $2;exit}' ../../log/wims.conf` |
||
8774 | bpr | 8 | fi |
8846 | bpr | 9 | if [ -z "$language" ] ; then |
7355 | bpr | 10 | language="en fr nl it es cn ca si" |
11 | fi |
||
3799 | bpr | 12 | cd $WIMS_HOME/slib |
20 | reyssat | 13 | |
14 | cat <<@ >index.phtml |
||
15 | !! This file is automatically generated! Do not edit it. |
||
16 | !! Edit the script 'mkindex'. |
||
17 | |||
1310 | bpr | 18 | !if adm/createxo isin \$module |
1103 | bpr | 19 | !set slib_cmd=help |
20 | !endif |
||
1915 | bpr | 21 | !read tabletheme |
3757 | bpr | 22 | !read lang/slib.phtml.\$lang |
23 | !if \$slib_lang_exists!=yes |
||
24 | !read lang/slib.phtml.en |
||
25 | !endif |
||
1103 | bpr | 26 | !default slib_cmd=resume |
20 | reyssat | 27 | !default slib_detname=special_cmd |
28 | !set slib_detail=\$(\$slib_detname) |
||
6275 | bpr | 29 | |
20 | reyssat | 30 | !if \$slib_detail!=\$empty |
13975 | obado | 31 | |
32 | !set box_head=<div class="field box"><h3 class="box_title"> |
||
13985 | bpr | 33 | !set box_head2=<div class="field box"><h4 class="box_title"> |
13975 | obado | 34 | !set box_head_full=<div class="field box fullwidth"><h3 class="box_title"> |
35 | !set box_middle=</h3><div class="box_desc"> |
||
13985 | bpr | 36 | !set box_middle2=</h4><div class="box_desc"> |
13975 | obado | 37 | !set box_middle_tt=</h3><div class="box_desc tt"> |
38 | !set box_foot=</div></div> |
||
39 | |||
13919 | bpr | 40 | !readproc slib/\$slib_detail slib_header |
41 | !reset slib_lang_exists_tmp |
||
42 | !readproc help/\$lang/slib/\$slib_detail |
||
43 | !if \$slib_lang_exists_tmp!=yes |
||
44 | !readproc help/en/slib/\$slib_detail |
||
45 | !endif |
||
13986 | bpr | 46 | !distribute lines \$slib_parms into slpcnt,slp1,slp2,slp3,slp4,slp5,slp6,slp7,slp8,slp9,slp10,slp11,slp12,slp13,slp14 |
13919 | bpr | 47 | !for i=1 to \$slpcnt |
48 | !set slpdflt\$i=!item 1 of \$(slp\$i) |
||
49 | !set slp\$i=!item 2 to -1 of \$(slp\$i) |
||
50 | !next i |
||
51 | !readproc namewriting.phtml \$slib_author |
||
52 | !set slib_author=\$script_out |
||
13975 | obado | 53 | <fieldset class="property_fields blockcenter"> |
54 | <legend>\$wims_name_slib</legend> |
||
55 | \$box_head \$wims_name_name \$box_middle_tt \$slib_detail \$box_foot |
||
56 | \$box_head \$wims_name_title \$box_middle \$slib_title \$box_foot |
||
57 | \$box_head \$wims_name_Author \$box_middle \$slib_author \$box_foot |
||
58 | \$box_head \$wims_name_call1 \$box_middle <code>!readproc slib/\$slib_detail [parameters]</code> |
||
13984 | bpr | 59 | (\$wims_name_result <span class="tt">slib_out</span>) \$box_foot |
13975 | obado | 60 | \$box_head \$wims_name_call2 \$box_middle <code>slib(\$slib_detail [parameters])</code> \$box_foot |
13984 | bpr | 61 | \$box_head_full \$wims_name_Parameters |
62 | !if \$slpcnt>1 |
||
63 | !if + isin \$slpcnt |
||
64 | \$wims_name_variable_list |
||
13919 | bpr | 65 | !else |
13984 | bpr | 66 | \$wims_name_upto |
13919 | bpr | 67 | !endif |
13984 | bpr | 68 | !else |
69 | : \$slpcnt |
||
70 | !endif |
||
71 | \$box_middle |
||
13919 | bpr | 72 | !for i=1 to \$slpcnt |
13985 | bpr | 73 | \$box_head2 \$wims_name_Parameter \$i |
13919 | bpr | 74 | !ifval \$i=\$slpcnt and + isin \$slpcnt |
75 | and up |
||
76 | !endif |
||
13985 | bpr | 77 | \$box_middle2 \$(slp\$i) |
13919 | bpr | 78 | !if \$(slpdflt\$i)!=\$empty |
79 | <div class="param_default"><em>(\$wims_name_default: <span class="tt">\$(slpdflt\$i)</span>)</em></div> |
||
80 | !endif |
||
13984 | bpr | 81 | \$box_foot |
13919 | bpr | 82 | !next i |
13984 | bpr | 83 | \$box_foot |
13975 | obado | 84 | \$box_head \$wims_name_Output \$box_middle \$slib_out \$box_foot |
13919 | bpr | 85 | !if \$slib_comment!=\$empty |
13975 | obado | 86 | \$box_head \$wims_name_comment \$box_middle \$slib_comment \$box_foot |
20 | reyssat | 87 | !endif |
13919 | bpr | 88 | !if \$slib_require!=\$empty |
13975 | obado | 89 | \$box_head \$wims_name_Required_Software \$box_middle_tt \$slib_require \$box_foot |
20 | reyssat | 90 | !endif |
13919 | bpr | 91 | !if \$slib_example!=\$empty |
92 | !set excnt=!linecnt \$slib_example |
||
13984 | bpr | 93 | \$box_head_full \$wims_name_Example OEF \$box_middle |
13919 | bpr | 94 | !for i=1 to \$excnt |
95 | !set slib_exemple=!line \$i of \$slib_example |
||
96 | <hr /> |
||
97 | <code>\text{A=slib(\$slib_detail \$slib_exemple)}</code> |
||
98 | !set slib_wims_backslash=\$wims_backslash_insmath |
||
99 | !set wims_backslash_insmath=yes |
||
100 | !readproc slib/\$slib_detail \$slib_exemple |
||
101 | <p>\$wims_name_Output:</p> |
||
102 | !if table notin \$slib_out and object notin \$slib_out and bubble notin \$slib_out and geogebra notin \$slib_detail |
||
103 | <pre>\$slib_out</pre> |
||
104 | !else |
||
105 | \$slib_out |
||
106 | !endif |
||
107 | !set wims_backslash_insmath=\$slib_wims_backslash |
||
108 | !reset slib_wims_backslash |
||
109 | !next i |
||
110 | !reset slib_exemple |
||
13975 | obado | 111 | \$box_foot |
13919 | bpr | 112 | !endif |
4170 | bpr | 113 | |
13975 | obado | 114 | </fieldset> |
13919 | bpr | 115 | !reset \$slib_detname |
116 | !exit |
||
20 | reyssat | 117 | !endif |
3757 | bpr | 118 | \$wims_name_instruction |
20 | reyssat | 119 | |
3799 | bpr | 120 | !read slib/index.phtml.\$lang |
121 | @ |
||
7355 | bpr | 122 | for ll in $language |
3799 | bpr | 123 | do |
13919 | bpr | 124 | echo "!! This file is automatically generated! Do not edit it. |
3799 | bpr | 125 | !! Edit the script 'mkindex'. |
126 | |||
5936 | bpr | 127 | !reset table_center |
8835 | obado | 128 | <h2>\$wims_name_listslib</h2> |
129 | <div id='listslib'> |
||
130 | <ul>" > index.phtml.$ll |
||
13919 | bpr | 131 | echo "" > index.phtml.temp |
8835 | obado | 132 | cnt_slib_tot=0 |
8846 | bpr | 133 | |
8847 | bpr | 134 | for categorie in `find . -maxdepth 1 -type d | sed 's!^\./!!g' | egrep -v '\/\.svn\/' | sort` |
8846 | bpr | 135 | do |
8835 | obado | 136 | if [ "$categorie" = "." ];then |
137 | cat_name="\$wims_name_All" |
||
138 | else |
||
139 | cat_name="$categorie" |
||
140 | fi |
||
141 | cat <<@ >>index.phtml.temp |
||
142 | <div id="content_$categorie"> |
||
143 | \$table_header |
||
144 | <caption>$cat_name</caption> |
||
145 | \$table_tr<th>\$wims_name_name</th><th>\$wims_name_Output</th></tr> |
||
146 | @ |
||
147 | cnt_slib=0 |
||
148 | for f in `find ./$categorie -type f | sed 's!^\./!!g' | sed 's!^\./!!g' | grep ./ | egrep -v '\/\.svn\/' | egrep -v '\.html'| sort` |
||
149 | do |
||
150 | if [ -f "$WIMS_HOME/help/$ll/slib/$f" ]; then |
||
151 | tit=`awk -F= '$1=="slib_title" {print $2; exit}' $WIMS_HOME/help/$ll/slib/$f` |
||
152 | fi |
||
153 | if [ -z "$tit" ]; then |
||
154 | if [ -f "$WIMS_HOME/help/en/slib/$f" ]; then |
||
155 | tit=`awk -F= '$1=="slib_title" {print $2; exit}' $WIMS_HOME/help/en/slib/$f` |
||
156 | else |
||
157 | tit=`awk -F= '$1=="slib_title" {print $2; exit}' $f` |
||
158 | fi |
||
159 | fi |
||
160 | if [ -n "$tit" ]; then |
||
161 | #echo $f |
||
162 | cnt_slib=`expr $cnt_slib + 1` |
||
8847 | bpr | 163 | if [ $cnt_slib -ge 1 ]; then |
8835 | obado | 164 | cat <<@ >>index.phtml.temp |
165 | \$table_tr<td class="tt wims_code_words">$f</td><td>$tit |
||
166 | !href cmd=\$slib_cmd&special_parm=slib&\$slib_detname=$f\$slib_detailanchor [\$wims_name_detail] |
||
167 | </td></tr> |
||
168 | @ |
||
8847 | bpr | 169 | fi; |
8835 | obado | 170 | tit='' |
171 | fi |
||
172 | done |
||
173 | echo "'$cat_name' done ($cnt_slib)" |
||
174 | cat <<@ >>index.phtml.temp |
||
175 | \$table_end |
||
176 | </div> |
||
177 | @ |
||
178 | |||
3799 | bpr | 179 | cat <<@ >>index.phtml.$ll |
8835 | obado | 180 | <li> |
181 | <a href="#content_$categorie"> |
||
182 | $cat_name ($cnt_slib)</a> |
||
183 | </li> |
||
20 | reyssat | 184 | @ |
8835 | obado | 185 | cnt_slib_tot=`expr $cnt_slib_tot + $cnt_slib` |
186 | done |
||
8846 | bpr | 187 | |
8835 | obado | 188 | cat <<@ >>index.phtml.$ll |
189 | </ul> |
||
20 | reyssat | 190 | @ |
8835 | obado | 191 | |
192 | cat index.phtml.temp >>index.phtml.$ll |
||
193 | cat <<@ >>index.phtml.$ll |
||
194 | </div> |
||
195 | !!# Si les librairies Jquery sont chargées, on affiche des onglets. |
||
196 | !if \$jquery_defined=yes |
||
13306 | obado | 197 | <script> |
8835 | obado | 198 | /*<![CDATA[*/ jQuery(function(jq) { |
8857 | obado | 199 | jq( "#listslib" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); |
8835 | obado | 200 | jq( "#listslib li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); |
8857 | obado | 201 | jq( "#listslib li a" ).click(function() { |
202 | //get the top offset of the target anchor |
||
203 | var target_offset = jq("#listslib").offset(); |
||
204 | var target_top = target_offset.top; |
||
205 | //goto that anchor by setting the body scroll top to anchor top |
||
206 | jq('html, body').animate({scrollTop:target_top}); |
||
207 | }); |
||
8835 | obado | 208 | }); /*]]>*/ |
209 | </script> |
||
13919 | bpr | 210 | <style> |
11288 | bpr | 211 | /*<![CDATA[*/\ |
8835 | obado | 212 | /*.ui-tabs-vertical { width: 55em; }*/ |
8857 | obado | 213 | .ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; /*width: 12em;*/ } |
8835 | obado | 214 | .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; } |
215 | .ui-tabs-vertical .ui-tabs-nav li a { display:block; } |
||
216 | .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; } |
||
217 | .ui-tabs-vertical .ui-tabs-panel { margin-left: 1em; float: left; width: 70%;} |
||
218 | .ui-tabs-vertical .ui-tabs-panel .wimstable { width: 100%;} |
||
11288 | bpr | 219 | /*]]>*/\ |
220 | </style> |
||
8835 | obado | 221 | !endif |
222 | @ |
||
223 | |||
224 | echo "*** '$ll' done ($cnt_slib_tot)" |
||
225 | echo |
||
3799 | bpr | 226 | done |
20 | reyssat | 227 | echo |
8835 | obado | 228 | echo Indexed $cnt_slib_tot scripts. |
20 | reyssat | 229 | echo |
230 |