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