Rev 6975 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3425 | obado | 1 | //Ensemble de Fonctions génériques : |
2 | |||
7850 | bpr | 3 | // Actuliste : |
3425 | obado | 4 | function actuliste(liste, indice) { |
5 | var mytool_array = liste.split("-"); |
||
6 | var n2 = mytool_array.length; |
||
7 | var liste2 = ""; |
||
8 | for (var i = 0; i < n2; i++) { |
||
9 | liste2 = liste2 + "<OPTION>" + mytool_array[i] + "</OPTION>"; |
||
10 | } |
||
11 | document.forms['formu'].sel.innerHTML = liste2; |
||
12 | //var chaine=document.form.wims_deposit.value; |
||
13 | //var n=chaine.length; |
||
14 | } |
||
15 | |||
7850 | bpr | 16 | // parcoursTab : |
3425 | obado | 17 | function parcoursTab(instructionwims, indice) { |
18 | if (instructionwims != "\\") { |
||
19 | //var mytool_array=instructionwims.split("\\"); |
||
20 | //var instructionwims=mytool_array[1]; |
||
21 | //alert(instructionwims); |
||
22 | var a = "^\\" + instructionwims + ""; |
||
23 | var n2 = instructionsss.length; |
||
24 | for (var i = 0; i < n2; i++) { |
||
25 | var instruction = instructionsss[i]; |
||
26 | var MonReg = new RegExp(a); |
||
27 | if (MonReg.test(instruction)) { |
||
28 | liste = liste + instruction + "-"; |
||
29 | } |
||
30 | } |
||
31 | compter++; |
||
32 | if (liste == "-") { |
||
33 | var div_aide = document.getElementById("aide"); |
||
3437 | obado | 34 | div_aide.innerHTML = "<h3>"+names["contextual_help"]+"</h3> - "+names["contextual_help_desc"]; |
3425 | obado | 35 | initlist(); |
36 | } |
||
37 | else { |
||
38 | actuliste(liste, indice); |
||
39 | } |
||
40 | liste = "-"; |
||
41 | if (compter == 4) { |
||
42 | compter = 0; |
||
43 | liste = "-"; |
||
44 | var div_aide = document.getElementById("aide"); |
||
3437 | obado | 45 | div_aide.innerHTML = "<h3>"+names["contextual_help"]+"</h3> - "+names["contextual_help_desc"]; |
3425 | obado | 46 | } |
47 | } |
||
48 | } |
||
49 | |||
50 | //anime : |
||
51 | function anime() { |
||
52 | initlist(); |
||
53 | //if (chrono == null) chrono = setInterval("change()", 10); |
||
54 | } |
||
55 | |||
56 | //anime2 : |
||
57 | function anime2() { |
||
6975 | obado | 58 | if (chrono2 === null) chrono2 = setInterval("instruction()", 15); |
3425 | obado | 59 | } |
60 | |||
61 | //image : |
||
62 | function image() { |
||
63 | var url = document.getElementById("url").value; |
||
64 | var description = document.getElementById("description").value; |
||
65 | hudAnimationFermeture('hud_video_intro'); |
||
6975 | obado | 66 | if (description === "") { |
3437 | obado | 67 | description=names["image_alt"]; |
3425 | obado | 68 | } |
3437 | obado | 69 | var image = "\\img{" + url + "}{alt='" + description + "'}"; |
3425 | obado | 70 | Cursor_AddTexte('wims_deposit_id', image); |
71 | } |
||
72 | |||
73 | //afficheaide : |
||
74 | function afficheaide(langue) { |
||
75 | |||
76 | var div_aide = document.getElementById("aide"); |
||
77 | var selectedoption = document.getElementsByTagName("OPTION"); |
||
78 | var instruction = selectedoption[document.forms['formu'].sel.selectedIndex].innerHTML; |
||
79 | |||
80 | //alert(instruction); |
||
81 | if (langue == "undefined") langue = version; |
||
82 | if (langue == "eng") version = "eng"; |
||
83 | if (langue == "fr") version = "fr"; |
||
7850 | bpr | 84 | |
3437 | obado | 85 | var text=""; |
7850 | bpr | 86 | |
3461 | bpr | 87 | switch(instructionsss) |
3425 | obado | 88 | { |
3461 | bpr | 89 | case oefcommand : |
90 | text = oefcommandfun(instruction); |
||
3437 | obado | 91 | break; |
3461 | bpr | 92 | case latex : |
93 | text = latexfun(instruction); |
||
3437 | obado | 94 | break; |
3461 | bpr | 95 | case iff : |
96 | text = ifffun(instruction); |
||
3437 | obado | 97 | break; |
3425 | obado | 98 | case special : |
3461 | bpr | 99 | text = specialfun(instruction); |
3437 | obado | 100 | break; |
3461 | bpr | 101 | case oefparm0 : |
102 | text = oefparm0fun(instruction); |
||
3437 | obado | 103 | break; |
3425 | obado | 104 | case oefparm1 : |
3461 | bpr | 105 | text = oefparm1fun(instruction); |
3437 | obado | 106 | break; |
3425 | obado | 107 | case oefparm2 : |
3461 | bpr | 108 | text = oefparm2fun(instruction); |
3437 | obado | 109 | break; |
3461 | bpr | 110 | case oefparm3 : |
111 | text = oefparm3fun(instruction); |
||
112 | break; |
||
3425 | obado | 113 | case oefparm4 : |
3461 | bpr | 114 | text = oefparm4fun(instruction); |
3437 | obado | 115 | break; |
3425 | obado | 116 | case oefparm5 : |
3461 | bpr | 117 | text = oefparm5fun(instruction); |
3476 | bpr | 118 | break; |
3461 | bpr | 119 | case slib : |
120 | text = slibfun(instruction); |
||
3437 | obado | 121 | break; |
3481 | bpr | 122 | case anstype : |
123 | text = anstypefun(instruction); |
||
124 | break; |
||
7850 | bpr | 125 | |
3425 | obado | 126 | } |
3461 | bpr | 127 | div_aide.innerHTML = "<h3 style='display:inline-block;margin-top:0;'>" + instruction + "</h3><div class='description'>" + text + "</div>"; |
7850 | bpr | 128 | |
3461 | bpr | 129 | } |
3425 | obado | 130 | |
3478 | bpr | 131 | function funcname() { |
3461 | bpr | 132 | switch(instructionsss) |
133 | { |
||
134 | case oefcommand : |
||
135 | titre_bd= oefcommandname; |
||
136 | break; |
||
137 | case latex : |
||
138 | titre_bd= latexname; |
||
139 | break; |
||
140 | case iff : |
||
141 | titre_bd= iffname; |
||
142 | break; |
||
143 | case special : |
||
144 | titre_bd= specialname; |
||
145 | break; |
||
146 | case oefparm0 : |
||
147 | titre_bd=oefparm0name; |
||
148 | break; |
||
149 | case oefparm1 : |
||
150 | titre_bd=oefparm1name; |
||
151 | break; |
||
152 | case oefparm2 : |
||
153 | titre_bd=oefparm2name; |
||
154 | break; |
||
155 | case oefparm3 : |
||
156 | titre_bd=oefparm3name; |
||
157 | break; |
||
158 | case oefparm4 : |
||
159 | titre_bd=oefparm4name; |
||
160 | break; |
||
161 | case oefparm5 : |
||
162 | titre_bd=oefparm5name; |
||
3476 | bpr | 163 | break; |
3461 | bpr | 164 | case slib : |
165 | titre_bd= slibname; |
||
166 | break; |
||
3481 | bpr | 167 | case anstype : |
168 | titre_bd= anstypename; |
||
169 | break; |
||
7850 | bpr | 170 | |
3461 | bpr | 171 | } |
3425 | obado | 172 | } |
173 | //enregistrer() : |
||
174 | function enregistrer() { |
||
175 | var chaine = document.forms['replyform'].wims_deposit.value; |
||
176 | alert(chaine); |
||
177 | } |
||
178 | |||
179 | //initlist() : |
||
3461 | bpr | 180 | instructionsss=oefcommand; |
3425 | obado | 181 | function initlist() { |
182 | //alert('initlist'); |
||
183 | liste = "-"; |
||
184 | compter = 0; |
||
185 | index = null; |
||
186 | k = null; |
||
187 | y = 0; |
||
188 | instructionwims = ""; |
||
189 | |||
190 | //ie error alert(document.forms['replyform'].wims_deposit.value;); |
||
191 | var formselect = document.getElementById("divoptions"); |
||
3478 | bpr | 192 | funcname(); |
3425 | obado | 193 | var n2 = instructionsss.length; |
194 | var liste = ""; |
||
195 | for (var i = 0; i < n2; i++) { |
||
3461 | bpr | 196 | liste = liste + "<option>" + instructionsss[i] + "</option>"; |
3425 | obado | 197 | } |
5761 | bpr | 198 | formselect.innerHTML = "<form name='formu' onclick='afficheaide();'><select ondblclick='inser()' id='select' name='sel' size='10'>" + liste + "</select><br/><input type='button' class='wims_button' value='"+names["insert_selection"]+"' onclick='inser()' /></form>"; |
6975 | obado | 199 | document.getElementById("name_list_instruction").innerHTML = titre_bd ; |
3425 | obado | 200 | } |
3437 | obado | 201 | |
3425 | obado | 202 | function changerListeInstruction() { |
3427 | obado | 203 | afficherHud('hud_video_intro'); |
3425 | obado | 204 | } |
205 | |||
206 | function changerListeInstruction2(nomdutabo) { |
||
3427 | obado | 207 | instructionsss=nomdutabo; |
208 | hudAnimationFermeture('hud_video_intro'); |
||
209 | initlist(); |
||
7850 | bpr | 210 | } |