Subversion Repositories wimsdev

Rev

Rev 7850 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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