Bonjour tout le monde.
C'est pourtant simple, mais il doit y avoir un truc que je ne vois pas car ça ne fonctionne pas.
J'essaye de centrer la div "DIV_PATIENCE" sur la page en fonction de la résolution.
Même la div "DIV_MESS2" n'est pas centrée dans "DIV_PATIENCE" et je ne vois pas du tout où je merdouille.
Merci d'avance pour votre aide.
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284 <BODY onLoad=Window_onload();> <DIV id="main"> <DIV id="div_titre" class="titre-page">- CONTROLES BDD MULTIVAC SG (GENERALE) -<BR/> <I class="fas fa-ambulance fa-1x" style="color:black"></I> <SPAN id="DIV_VERSION"></SPAN> <I class="fas fa-database fa-1x" style="color:black"></I> </DIV> <BR/> <DIV class=""> <DIV id="div_soustitre1"></DIV> <BR/> <DIV id="div_info1"></DIV> <BR/> </DIV> <DIV id="DIV_ZS" class="col-md-12">(Zone de sélection) <DIV class="alert alert-primary-bootstrap" id="DivSelection"> <DIV class=""> <BR/> <DIV class="alert alert-info"> <SPAN class=""> <LABEL><B>Date début : </B></LABEL> <INPUT class="" name="date_deb" id="date_deb" type="text";></INPUT> </SPAN> <SPAN class="" style="position:absolute;right:25px"> <LABEL><B>(Date fin : </B></LABEL> <INPUT class="" name="date_fin" id="date_fin" type="text" disabled title="Saisie désactivée pour le moment..."></INPUT> <LABEL><B> - Saisie désactivée pour le moment...)</B></LABEL> </SPAN> </DIV> <div class="row"> <div class="col-md-5"> <DIV class="alert alert-info ModifHauteur"> <LABEL><B>Présélection :</B></LABEL> <SELECT class="" id="filtre" onChange="OnChangeBlur_MajListeFic()" onFocus="Init()"> <OPTION value=""></OPTION> <OPTION value="FILTRE_CDG">LFPG / CDG / PG</OPTION> <OPTION value="FILTRE_ORY">LFPO / ORY / PO</OPTION> <OPTION value="FILTRE_LBG">LFPB / LBG / PB</OPTION> <OPTION value="FILTRE_CRNA">CRNA</OPTION> <OPTION value="FILTRE_AUT">AUTRES</OPTION> </SELECT> </DIV> </div> <div class="col-md-2 alert alert-success center"> <label><b>OU</b></label> </div> <div class="col-md-5"> <DIV class="alert alert-info"> <LABEL><B>Recherche :</B></LABEL> <INPUT class="" name="recherche" id="recherche" onBlur="OnChangeBlur_MajListeFic()" onFocus="Init()"></INPUT> </DIV> </div> </div> <DIV class="row"> <DIV class="col-md-10"> <DIV class="alert alert-info"> <LABEL><B>Liste des Fichiers (29 + '###' + 89) - </B></LABEL> <LABEL id="nb_val_fic"> ()</LABEL> :<BR/> <!-- <SELECT class="" id="Liste_Proc" onChange="OnChange_Liste_Proc()"> </SELECT> --> <SELECT class="" id="Liste_Proc" OnChange="TestPriorite()"> </SELECT> </DIV> </DIV> <DIV class="col-md-2"> <DIV class="alert alert-info" title="Actif uniquement si on sélectionne ' TOUT ' dans la liste des fichiers à gauche."> <LABEL><B>Priorité (105) : </B></LABEL><BR/> <SELECT class="" id="Liste_Priorite" disabled title="Actif uniquement si on sélectionne ' TOUT ' dans la liste des fichiers à gauche."> <OPTION value="*" selected="selected">*</OPTION> <OPTION value="1">1</OPTION> <OPTION value="2">2</OPTION> <OPTION value="3">3</OPTION> <OPTION value="4">4</OPTION> <OPTION value="5">5</OPTION> <OPTION value="6">6</OPTION> <OPTION value="7">7</OPTION> <OPTION value="8">8</OPTION> <OPTION value="9">9</OPTION> <OPTION value="10">10</OPTION> </SELECT> </DIV> </DIV> </DIV> <div class="row center"> <div class="col-md-3"> </div> <div class="col-md-6 center"> <button type="button" class="btn btn-outline-dark btn-lg btn-block" title="Lance la recherche..." onClick="OnClick_Liste_Proc()">GO</button> </div> <div class="col-md-3"> </div> </div> </DIV> <br/> <DIV id="DIV_FL_1" class="col-md-12"><CENTER><I class="fa fa-arrow-down fa-5x" style="color:white"></I></CENTER></DIV> <DIV class=""> </DIV> <!-- Saut de ligne --> <DIV class="col-md-12"> <DIV id="DIV_ZI_1" class="TexteBlanc">(Zone de résultats intermédiaires 1) <DIV class="alert alert-warning"> <LABEL><B>Priorité (105) :</B></LABEL> <LABEL class="" NAME="priorite" id="priorite"></LABEL> <BR/> <LABEL><B>Nom Fichier (29) :</B></LABEL> <LABEL class="" NAME="nom_fic" id="nom_fic"></LABEL> <BR/> <LABEL><B>Sujet Email (89) :</B></LABEL> <LABEL class="" NAME="sujet_email" id="sujet_email"></LABEL> <BR/> <LABEL><B>Message Email (90) :</B></LABEL> <LABEL class="" NAME="msg_email" id="msg_email"></LABEL> <BR/> <LABEL><B>Catégorie (28) :</B></LABEL> <!-- Retire la classe "wrapping" si les retours à la ligne te plaisent pas --> <LABEL class="wrapping" NAME="categorie" id="categorie"></LABEL> <BR/> <LABEL><B>Type Fichier (30) :</B></LABEL> <LABEL class="" NAME="type_fic" id="type_fic"></LABEL> <BR/> <LABEL><B>Dossier Stockage (98) :</B></LABEL> <LABEL class="wrapping" NAME="dossier_stockage" id="dossier_stockage"></LABEL> <LABEL> -> (PM_LIB_PARAMETRES) </LABEL> <I><LABEL class="wrapping" NAME="ds_clair" id="ds_clair"></LABEL></I> <BR/> <LABEL><B>MacroVB (94) :</B></LABEL> <LABEL class="" NAME="macrovb" id="macrovb"></LABEL> <BR/> <LABEL><B>Nota (116) :</B></LABEL> <BR/> <!-- Retire la classe "wrapping" si les retours à la ligne te plaisent pas --> <LABEL class="wrapping" NAME="nota" id="nota"></LABEL> <DIV class=""><HR align="center" width="50%" color="midnightblue" size="3"> </DIV> <!-- Saut de ligne --> <BR/> <LABEL><B>Nom Fichier recomposé avec Catégorie :</B></LABEL> <LABEL class="" NAME="nom_fic_categ" id="nom_fic_categ"></LABEL> </DIV> </DIV> </DIV> <DIV class="col-md-12"> <DIV id="DIV_ZI_2" class="TexteBlanc">(Zone de résultats intermédiaires 2) <DIV class="alert alert-success"> <LABEL id="label_v"><B>Vérification du fichier (Les dates et n° semaine sont calculées par rapport à la date début sélectionnée) (29) : </B></LABEL> <BR/> <LABEL id="label_verif"></LABEL> <LABEL> -> </LABEL> <I><LABEL class="" NAME="verif" id="verif"></LABEL></I> </DIV> </DIV> </DIV> <DIV class="col-md-12"> <DIV id="DIV_ZI_21" class="TexteBlanc">(Zone de résultats intermédiaires 2.1) <DIV class="alert alert-success"> <DIV NAME="result_inter_1" id="result_inter_1" class=""> <TABLE id="table_result_inter_1" class="table table-statSAI"> <THEAD> <TR> <TH class="CentrageVerticalForce">P.</TH> <TH class="CentrageVerticalForce">Fichier</TH> <TH class="CentrageVerticalForce">MacroVB</TH> <TH class="CentrageVerticalForce" title="Ouvre le fichier col 1 ou exécute la macro col 3">Ouv. / Exe.</TH> </TR> </THEAD> <TBODY id="result_inter_1_Rows"> </TBODY> </TABLE> </DIV> </DIV> </DIV> </DIV> </DIV> </DIV> <DIV id="DIV_FL_2" class="col-md-12"><CENTER><I class="fa fa-arrow-down fa-5x" style="color:white"></I></CENTER></DIV> <DIV class="col-md-12">(Zone de résultats 1) <DIV class="alert alert-info"> <LABEL id="label_dependances"><B>Liste des dépendances :</B></LABEL> <BR/> <LABEL>(Vérification de l'existance des fichiers 'nom complet' => passage de la ligne en fond rouge ou vert)</LABEL> <LABEL>(Sélection d'une ligne => affichage des dépendances (META_DEPENDANCE_FICHIER_SRC_n) dans la table en dessous.</LABEL> <DIV NAME="depend" id="depend"> <TABLE id="table_depend" class="table table-statSAI"> <THEAD> <TR> <TH id="DLTHC01" class="CentrageVerticalForce" title="Numéro du champs source concerné : META_FICHIER_SRC_n -> META_DEPENDANCE_FICHIER_SRC_n">N°</TH> <TH id="DLTHC02" class="CentrageVerticalForce" title="Priorité">P.</TH> <TH id="DLTHC03" class="CentrageVerticalForce">Fichier (29)</TH> <TH id="DLTHC04" class="CentrageVerticalForce">Date</TH> <TH id="DLTHC05" class="CentrageVerticalForce">Nom Complet (Avec dossier + date + catégorie)</TH> <TH id="DLTHC06" class="CentrageVerticalForce">Ouv.</TH> </TR> </THEAD> <TBODY id="dependRows"> </TBODY> </TABLE> </DIV> </DIV> </DIV> <DIV id="DIV_FL_3" class="col-md-12"><CENTER><I class="fa fa-arrow-down fa-5x" style="color:white"></I></CENTER></DIV> <DIV class="col-md-12">(Zone de résultats 2) <DIV class="alert alert-info"> <LABEL id="label_caracteristiques"><B>Cractaéristiques -> META_DEPENDANCE_FICHIER_SRC_n pour </B></LABEL><I><LABEL id="label_caract"></LABEL></I> <BR/> <LABEL>(Sélection d'une ligne => relance du traitement après validation)</LABEL> <DIV NAME="caract" id="caract"> <TABLE id="table_caract" class="table table-statSAI"> <THEAD> <TR> <TH class="Table_Caract_Col1 CentrageVerticalForce" title="Priorité">P.</TH> <TH class="CentrageVerticalForce">Périodicité</TH> <TH class="CentrageVerticalForce">Type</TH> <TH class="CentrageVerticalForce">Lang.</TH> <TH class="CentrageVerticalForce">Module</TH> <TH class="Table_Caract_Col6 CentrageVerticalForce">Catégorie</TH> </TR> </THEAD> <TBODY id="caractRows"> </TBODY> </TABLE> </DIV> </DIV> </DIV> <DIV class="col-md-12"><HR align="center" width="50%" color="midnightblue" size="3"> </DIV> <!-- Saut de ligne --> <DIV class="col-md-12">(La suite, si besoin...) <DIV class="alert alert-secondary"> </DIV> </DIV> <DIV class=""> <DIV id="div_soustitre2"></DIV> <DIV id="div_info2"></DIV> </DIV> <BR/> </DIV> <FOOTER class="footer"> <DIV class=""> <DIV id="div_info_fotter">...</DIV> </DIV> </FOOTER> <DIV id="DIV_PATIENCE" class="alert alert-warning load-info Centrage" style="color:black;font-size:32px"> <BR/> <I id="mess01" class="fa fa-spinner fa-spin fa-3x fa-fw" style="color:black;font-size:22px"></I> .......Veuillez patienter pendant le chargement de la page....... <I class="fa fa-spinner fa-pulse fa-3x fa-fw" style="color:black;font-size:22px"></I> <BR/> <div class="row"> <div class="col-md-2"> </div> <div class="col-md-8"> <div id="DIV_MESS2" class=""> <DIV class="center alert alert-danger PlacementVertical Border TailleMess2"> <br/> <B><LABEL id="Lab_Patience"></LABEL></B> <B><LABEL>Nombre de valeurs restant à traiter : </LABEL></B> <B><LABEL id="Lab_Reste"></LABEL></B> </DIV> </div> </div> <div class="col-md-2"> </div> </div> </DIV> <SCRIPT type="text/javascript"> function Window_onload() { let WUrl = window.location.pathname; let WDevel = "(Impossible de détecter DEVEL dans l'url)"; if (WUrl.indexOf("DEVEL") == -1) { WDevel = ""; } else { WDevel = " (DEVEL)"; } document.getElementById('DIV_VERSION').innerHTML = " " + G_VERSION + WDevel + " "; ControlesBdd_Multivac_SG(); // document.getElementById("DIV_PATIENCE").style.display = "none"; AffPatience("OFF", "NON", 0, 0, 0, 0, "default") } </SCRIPT> </BODY>
Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 Appel : AffPatience("ON", "OUI", G_TOP_DIV_PATIENCE, G_LEFT_DIV_PATIENCE, G_WIDTH_DIV_PATIENCE, G_HEIGHT_DIV_PATIENCE, "wait"); ... ... ... let G_WIDTH_DIV_PATIENCE = screen.width - 300; let G_HEIGHT_DIV_PATIENCE = screen.height - 300; let G_TOP_DIV_PATIENCE = 10; let G_LEFT_DIV_PATIENCE = 10; function AffPatience(P_OnOff, P_Mess2, P_X, P_Y, P_Width, P_Height, P_Cursor) { window.top.window.scrollTo(0,0); // Permet de remonter en haut de l'écran P_Width = P_Width + "px"; P_Height = P_Height + "px"; P_X = P_X + "px"; P_Y = P_Y + "px"; if (P_OnOff == "ON") { $('body').addClass('stop-scrolling'); document.getElementById("DIV_PATIENCE").style.display = "block"; } if (P_OnOff == "OFF") { $('body').removeClass('stop-scrolling'); document.getElementById("DIV_PATIENCE").style.display = "none"; } if (P_Mess2 == "OUI") { document.getElementById("DIV_MESS2").style.display = "block"; } if (P_Mess2 == "NON") { document.getElementById("DIV_MESS2").style.display = "none"; } if (P_X != 0 || "0px") { document.getElementById("DIV_PATIENCE").style.top = P_X; } if (P_Y != 0 || "0px") { document.getElementById("DIV_PATIENCE").style.left = P_Y; } if (P_Width != 0) { document.getElementById("DIV_PATIENCE").style.width = P_Width; } if (P_Height != 0) { document.getElementById("DIV_PATIENCE").style.height = P_Height; } if (P_Cursor == "wait") { // document.body.classList.add("PointeurWait"); document.getElementById("DIV_PATIENCE").classList.add("PointeurWait"); } if (P_Cursor == "default") { document.body.classList.add("PointeurDefault"); } }
Code css : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 (Les classes alert alert-warning sont des classes définies par Bootstrap) .load-info { z-index: 1000; /* c'est souvent suffisant */ position: fixed; /* background-color: rgba(255,255,255,.5);*/ /* Pour régler la transparence */ } .centrage { margin: 0 auto; } .PlacementVertical { /* Permet de placer un élément verticlament dans la page */ margin-top: 250px; /* au lieu de '50vh' poussé de la moitié de hauteur de viewport */ transform: translateY(-50%); /* tiré de la moitié de sa propre hauteur */ } .Border { border: medium solid #6D071A; } .TailleMess2 { width: 750px; height: 300px; }
Partager