1 | Parent = "#theImage"; |
---|
2 | function Toggle_bp() { |
---|
3 | cl_visible = !cl_visible; |
---|
4 | if (cl_visible) src = src1; |
---|
5 | else src = src2; |
---|
6 | if (cl_visible) src_info = src3; |
---|
7 | else src_info = src4; |
---|
8 | |
---|
9 | jQuery('#bp_cla').attr('alt', src_info); |
---|
10 | jQuery('#bp_cla').attr('title', src_info); |
---|
11 | |
---|
12 | jQuery('#bp_img_cla').get(0).src = src; |
---|
13 | jQuery('#bp_img_cla').attr('alt', src_info); |
---|
14 | jQuery('#bp_img_cla').attr('title', src_info); |
---|
15 | jQuery('#bp_cla').attr('Stitle', src_info); |
---|
16 | jQuery('#bp_cla').attr('Stip', " "); |
---|
17 | jQuery().newResize(); |
---|
18 | |
---|
19 | } |
---|
20 | nu_img = 0; |
---|
21 | tempo=0; |
---|
22 | |
---|
23 | function Wait_pamoorama() { |
---|
24 | if (jQuery("#pamoorama").length) { |
---|
25 | mypanorama = window.myPamoorama; |
---|
26 | if (!mypanorama) { |
---|
27 | tempo = tempo + 1; |
---|
28 | if (tempo > 10) |
---|
29 | return true; |
---|
30 | |
---|
31 | setTimeout("Wait_pamoorama()", 500); |
---|
32 | return false; |
---|
33 | } |
---|
34 | if (mypanorama.skipInit == false) { |
---|
35 | setTimeout("Wait_pamoorama()", 500); |
---|
36 | return false; |
---|
37 | } |
---|
38 | info_pamoorama = jQuery("#pamoorama").infos(); |
---|
39 | new_width = info_pamoorama.width - (info_pamoorama.borderwidth.left + info_pamoorama.borderwidth.right); |
---|
40 | if (Math.abs(new_width - myPamoorama.options.width) > 10) { |
---|
41 | setTimeout("Wait_pamoorama()", 500); |
---|
42 | return false; |
---|
43 | } |
---|
44 | |
---|
45 | nopano = true; |
---|
46 | old_window = { width: 0, height: 0 }; |
---|
47 | jQuery('#pamoorama').trigger('ON'); |
---|
48 | |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | //========================================================================== |
---|
54 | function Wait_Affichage() { |
---|
55 | fade_in = parseInt(fade_in); |
---|
56 | if (!jQuery().newResize()) { |
---|
57 | setTimeout("Wait_Affichage()", 500); |
---|
58 | return |
---|
59 | } |
---|
60 | nu_img++; |
---|
61 | |
---|
62 | if (fade_in == 0) { |
---|
63 | jQuery(Parent).css({ opacity: "1" }); |
---|
64 | } else { |
---|
65 | jQuery(Parent).animate({ opacity: "1" }, |
---|
66 | fade_in, "swing", |
---|
67 | function (i) { |
---|
68 | jQuery(Parent).css({ opacity: "1" }); |
---|
69 | if (DEBUG_autosize == "true") { |
---|
70 | bp1 = jQuery('.debug').get(nu_img); |
---|
71 | if (!bp1) nu_img = 0; |
---|
72 | bp1 = jQuery('.debug').get(nu_img); |
---|
73 | jQuery(bp1).trigger('ON'); |
---|
74 | } |
---|
75 | } |
---|
76 | ); |
---|
77 | |
---|
78 | } |
---|
79 | // if (nu_img > 1) return; |
---|
80 | |
---|
81 | |
---|
82 | |
---|
83 | img_h = jQuery(theImg).height(); |
---|
84 | img_w = jQuery(theImg).width(); |
---|
85 | |
---|
86 | jQuery("#src_img_h").val(img_h); |
---|
87 | jQuery("#src_img_w").val(img_w); |
---|
88 | jQuery("#ret_autosize").val(src_img); |
---|
89 | if (typeof Window_Affichage =="undefined" ) { |
---|
90 | Window_Affichage = { height: Zone_Affichage.height, |
---|
91 | width: Zone_Affichage.width |
---|
92 | }; |
---|
93 | } |
---|
94 | jQuery("#window_height").val(Window_Affichage.height); |
---|
95 | jQuery("#window_width").val(Window_Affichage.width); |
---|
96 | jQuery("#ret_autosize").trigger('ON', { width: img_w, |
---|
97 | height: img_h, |
---|
98 | theImage: theImg, |
---|
99 | src_img: src_img, |
---|
100 | window_height: Window_Affichage.height, |
---|
101 | window_width: Window_Affichage.width |
---|
102 | }); |
---|
103 | |
---|
104 | |
---|
105 | } |
---|
106 | |
---|
107 | //===================================================================== |
---|
108 | |
---|
109 | List_autosize = new Array(); |
---|
110 | function Autosize_resize(Obj) { |
---|
111 | if (typeof cl_visible != "undefined") return; |
---|
112 | |
---|
113 | |
---|
114 | conf = jQuery(Obj).get(0).conf; |
---|
115 | Obj = jQuery(Obj).get(0).obj; |
---|
116 | myWindow = jQuery("#" + conf.parent).infos(); |
---|
117 | |
---|
118 | if (myWindow.width == 0) myWindow = jQuery(window).infos(); |
---|
119 | marge_basse = 0; |
---|
120 | if (conf.MargeBasse) |
---|
121 | marge_basse = jQuery().Get_Val_int( |
---|
122 | conf.MargeBasse |
---|
123 | ); |
---|
124 | marge_top = 0; |
---|
125 | if (conf.MargeHaute) |
---|
126 | marge_top = jQuery().Get_Val_int( |
---|
127 | conf.MargeHaute |
---|
128 | ); |
---|
129 | |
---|
130 | info_Obj = jQuery(Obj).infos(); |
---|
131 | h1_left = jQuery(Obj).absoluteLeft(); |
---|
132 | h1_top = jQuery(Obj).absoluteTop(); |
---|
133 | |
---|
134 | if (h1_top < info_Obj.height) |
---|
135 | h1 = (myWindow.height - h1_top - marge_basse - marge_top); |
---|
136 | else |
---|
137 | h1 = (myWindow.height - marge_basse); |
---|
138 | |
---|
139 | |
---|
140 | rap = info_Obj.height / info_Obj.width; |
---|
141 | w2 = parseInt(h1 / rap); |
---|
142 | |
---|
143 | if (w2 < info_Obj.width) |
---|
144 | marginLeft = info_Obj.left + parseInt((info_Obj.width - w2) / 2) + "px"; |
---|
145 | else |
---|
146 | marginLeft = "auto"; |
---|
147 | |
---|
148 | jQuery(Obj).css({ width: "auto", marginTop: marge_top, |
---|
149 | marginLeft: "auto", marginBottom: 0 + "px", |
---|
150 | verticalAlign: "middle", textAlign: "center" |
---|
151 | }); |
---|
152 | jQuery(Obj).height(h1); |
---|
153 | |
---|
154 | //============================================================= |
---|
155 | if (conf.ResizePicture != "true") { |
---|
156 | |
---|
157 | } else |
---|
158 | imgs = jQuery(Obj).find("img"); |
---|
159 | Obj_w = jQuery(Obj).width(); |
---|
160 | Obj_h = jQuery(Obj).height(); |
---|
161 | |
---|
162 | jQuery(imgs).each(function (i) { |
---|
163 | img = jQuery(this); |
---|
164 | |
---|
165 | info_img = { width: conf.width[i], height: conf.height[i] }; |
---|
166 | img_rap = conf.rap[i]; |
---|
167 | |
---|
168 | if (info_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap); |
---|
169 | else w2 = parseInt(Obj_h * img_rap); |
---|
170 | if (w2 > 0 && h1 > 0 && img.length > 0) { |
---|
171 | img.height(h1); |
---|
172 | img.width(w2); |
---|
173 | } |
---|
174 | |
---|
175 | }); |
---|
176 | |
---|
177 | |
---|
178 | |
---|
179 | |
---|
180 | } |
---|
181 | jQuery.extend(jQuery.expr[':'], { |
---|
182 | // Nom du sélecteur personnalisé |
---|
183 | Autosize: function (a) { |
---|
184 | n1 = a.className; |
---|
185 | // personal_block |
---|
186 | if (n1.match(RegExp("autosize", "gi"))) { |
---|
187 | // autoresize = "MargeBasse:30px; ResizePicture:false" |
---|
188 | infconf = jQuery(a).attr("autosize"); |
---|
189 | n1 = typeof infconf; |
---|
190 | conf = { MargeBasse: 0, NoPicture: false } |
---|
191 | if (n1 == "undefined") { |
---|
192 | |
---|
193 | } else { |
---|
194 | tableau = infconf.split(";"); |
---|
195 | for (var i = 0; i < tableau.length; i++) { |
---|
196 | tableau2 = tableau[i].split(":"); |
---|
197 | conf[jQuery.trim(tableau2[0])] = jQuery.trim(tableau2[1]); |
---|
198 | } |
---|
199 | imgs = jQuery(a).find("img"); |
---|
200 | rap = new Array(); |
---|
201 | width = new Array(); |
---|
202 | height = new Array(); |
---|
203 | jQuery(imgs).each(function (i) { |
---|
204 | img = jQuery(this); |
---|
205 | rap.push((img.width() / img.height())); |
---|
206 | width.push(img.width()); |
---|
207 | height.push(img.height()); |
---|
208 | }); |
---|
209 | |
---|
210 | conf['rap'] = rap; |
---|
211 | conf['width'] = width; |
---|
212 | conf['height'] = height; |
---|
213 | |
---|
214 | List_autosize.push({ obj: a, conf: conf }); |
---|
215 | jQuery(a).css({ opacity: 1 }); |
---|
216 | } |
---|
217 | } |
---|
218 | // Css = jQuery(a).getStyles(a); |
---|
219 | |
---|
220 | return false; |
---|
221 | |
---|
222 | } |
---|
223 | }); |
---|
224 | |
---|
225 | |
---|
226 | function List_autosize_resize(event, ui) { |
---|
227 | if (typeof wait_resize == "undefined") wait_resize = false; |
---|
228 | if (wait_resize == true) return; |
---|
229 | |
---|
230 | wait_resize = true; |
---|
231 | if (List_autosize.length == 0) return; |
---|
232 | for (i = 0; i < List_autosize.length; i++) { |
---|
233 | Autosize_resize(jQuery(List_autosize[i])); |
---|
234 | } |
---|
235 | wait_resize = false; |
---|
236 | |
---|
237 | } |
---|
238 | //============================================================== |
---|
239 | jQuery(document).ready( |
---|
240 | function (jQuery) { |
---|
241 | jQuery(':Autosize'); |
---|
242 | |
---|
243 | jQuery(window).unload(function () { |
---|
244 | try { |
---|
245 | if (theImg) { |
---|
246 | jQuery.cookie('img', theImg.src); // créer un cookie avec une valeur |
---|
247 | jQuery.cookie('img_h', jQuery(theImg).height()); |
---|
248 | jQuery.cookie('img_w', jQuery(theImg).width()); |
---|
249 | jQuery.cookie('window_height', Window_Affichage.height); |
---|
250 | jQuery.cookie('window_width', Window_Affichage.width); |
---|
251 | } |
---|
252 | } catch (r) { |
---|
253 | |
---|
254 | } |
---|
255 | |
---|
256 | }); |
---|
257 | |
---|
258 | |
---|
259 | |
---|
260 | jQuery(window).load(function () { |
---|
261 | if (typeof img_width == "undefined") { |
---|
262 | if (List_autosize.length == 0) return; |
---|
263 | for (i = 0; i < List_autosize.length; i++) { |
---|
264 | Autosize_resize(jQuery(List_autosize[i])); |
---|
265 | } |
---|
266 | return; |
---|
267 | } |
---|
268 | |
---|
269 | |
---|
270 | //========================================================= |
---|
271 | if (typeof (options) == "undefined") { |
---|
272 | options = { imageAutosizeMargin: 0, imageAutosize: false } |
---|
273 | } |
---|
274 | |
---|
275 | old_img = jQuery.cookie('img'); |
---|
276 | old_img_h = jQuery.cookie('img_h'); |
---|
277 | old_img_w = jQuery.cookie('img_w'); |
---|
278 | old_window_height = jQuery.cookie('window_height'); |
---|
279 | old_window_width = jQuery.cookie('window_width'); |
---|
280 | |
---|
281 | //============================================================ |
---|
282 | img_init = { height: img_height, width: img_width }; // taille initiale |
---|
283 | img_defaut = { height: scaled_height, width: scaled_width }; |
---|
284 | img_reelle = { height: img_height, width: img_width }; |
---|
285 | img_finale = { height: 0, width: 0 }; |
---|
286 | |
---|
287 | img_top = "0"; |
---|
288 | rapport = -1; |
---|
289 | marges_llgbo = 0; |
---|
290 | |
---|
291 | //============================================================= |
---|
292 | Type_Img = ""; |
---|
293 | theImg = null; |
---|
294 | nopano = false; |
---|
295 | |
---|
296 | |
---|
297 | Zone_Affichage = { height: 0, width: 0 }; |
---|
298 | //============================================================ |
---|
299 | jQuery("#the_page").css({ top: "0px" }); |
---|
300 | |
---|
301 | Info_the_page = jQuery("#the_page").infos(); |
---|
302 | info_HeaderBar = jQuery("#imageHeaderBar").infos(); |
---|
303 | |
---|
304 | Parent = "#theImage"; |
---|
305 | |
---|
306 | Zone_Affichage = jQuery(Parent).infos(); |
---|
307 | // |
---|
308 | var old_window = { width: 0, height: 0 }; |
---|
309 | |
---|
310 | Bandeau_bas = Info_Description_f(Parent); |
---|
311 | if (typeof Bandeau_bas == "undefined") { |
---|
312 | |
---|
313 | } |
---|
314 | if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top; |
---|
315 | else Bandeau = 0; |
---|
316 | old_window = { width: 0, height: 0 }; |
---|
317 | jQuery("#theImage").trigger('ON'); |
---|
318 | |
---|
319 | old_window = { width: 0, height: 0 }; |
---|
320 | jQuery().newResize(); |
---|
321 | |
---|
322 | //=================================================================== |
---|
323 | /* |
---|
324 | * window .resize |
---|
325 | */ |
---|
326 | jQuery(window).resize( |
---|
327 | function (event, ui) { |
---|
328 | jQuery().newResize(); |
---|
329 | }); |
---|
330 | |
---|
331 | //============== initialisation =================== |
---|
332 | |
---|
333 | var pos; |
---|
334 | var set_p = false; |
---|
335 | |
---|
336 | |
---|
337 | }); // window.onload |
---|
338 | |
---|
339 | /* Extension |
---|
340 | * affiche_debug |
---|
341 | |
---|
342 | * resize |
---|
343 | * : |
---|
344 | */ |
---|
345 | //========================================================= |
---|
346 | old_window = { width: 0, height: 0 }; |
---|
347 | jQuery(window).resize( |
---|
348 | function (event, ui) { |
---|
349 | List_autosize_resize(event, ui); |
---|
350 | jQuery().newResize(); |
---|
351 | }); |
---|
352 | |
---|
353 | jQuery.fn.extend({ |
---|
354 | //========================================================== |
---|
355 | Info_description: function (e) { |
---|
356 | return Info_Description_f(e); |
---|
357 | |
---|
358 | }, |
---|
359 | //============================================================= |
---|
360 | onPropertyChange: function (e) { |
---|
361 | return; |
---|
362 | |
---|
363 | |
---|
364 | }, |
---|
365 | /* |
---|
366 | * recherche la plus grande image (hauteur ou largeur) |
---|
367 | */ |
---|
368 | Get_Img_Maxi: function (myobj) { |
---|
369 | return Get_Img_Maxi(myobj); |
---|
370 | }, |
---|
371 | //============================================================ |
---|
372 | affiche_debug: function (aff_infos) { |
---|
373 | affiche_debug(aff_infos); |
---|
374 | }, |
---|
375 | //==================================================== |
---|
376 | newResize: function () { |
---|
377 | // |
---|
378 | if (typeof options != undefined) |
---|
379 | if (options.imageAutosize) |
---|
380 | return true; //stripped |
---|
381 | if (DEBUG_autosize == "true") { |
---|
382 | nu_img += 1; |
---|
383 | |
---|
384 | bp1 = jQuery('.debug').get(nu_img); |
---|
385 | if (!bp1) nu_img = 0; |
---|
386 | bp1 = jQuery('.debug').get(nu_img); |
---|
387 | |
---|
388 | jQuery(bp1).trigger('ON'); |
---|
389 | } |
---|
390 | if (typeof cl_visible == "undefined") return; |
---|
391 | if (!cl_visible == true) { return true; } |
---|
392 | var chk = eval(user_status + "_enabled"); |
---|
393 | if (chk == "") { return true; } |
---|
394 | //================================================================= |
---|
395 | var winwidth = jQuery(window).width(); |
---|
396 | var winheight = jQuery(window).height(); |
---|
397 | n = winwidth - old_window.width; |
---|
398 | if (Math.abs(n) < 1) { |
---|
399 | n = winheight - old_window.height; |
---|
400 | if (Math.abs(n) < 1) |
---|
401 | return true; |
---|
402 | } |
---|
403 | if (Math.abs(n) > 30) nu_img = 0; |
---|
404 | //if (nu_img > 10) return true; |
---|
405 | old_window = jQuery(window).infos(); |
---|
406 | //=========================================================================== |
---|
407 | |
---|
408 | jQuery(Parent).width(winwidth); |
---|
409 | jQuery(Parent).height(winheight); |
---|
410 | |
---|
411 | var Cadre = jQuery(Parent).get(0); |
---|
412 | var info_theImage = jQuery(Cadre).infos(); |
---|
413 | //=============== Information cadre ====== |
---|
414 | var info_the_page = jQuery("#the_page").infos(); |
---|
415 | //============================================================================= |
---|
416 | |
---|
417 | var info_content = jQuery("#content").infos(); |
---|
418 | var info_titrePage = jQuery("#titrePage").infos(); |
---|
419 | var info_imageInfoBar = jQuery("#imageInfoBar").infos(); |
---|
420 | var info_theHeader = jQuery("#theHeader").infos(); |
---|
421 | |
---|
422 | var Zone_Affichage = jQuery(Parent).infos(); |
---|
423 | var info_ToolBar = jQuery("#imageToolBar").infos(); |
---|
424 | var marge = 0; |
---|
425 | var marge_right = 0; |
---|
426 | var marge_left = 0; |
---|
427 | if (theme.match(RegExp("simple", "g"))) { |
---|
428 | if (info_ToolBar.width > 0) |
---|
429 | marge = (Zone_Affichage.width - info_ToolBar.width) / 2; |
---|
430 | else if (info_the_page.width > 0) |
---|
431 | marge = (Zone_Affichage.width - info_the_page.width) / 2; |
---|
432 | |
---|
433 | marge_right = marge; |
---|
434 | marge_left = marge; |
---|
435 | |
---|
436 | if (info_content.width > 100) { |
---|
437 | |
---|
438 | marge_left = (info_imageInfoBar.margin.left) + 1; |
---|
439 | marge_right = (marge_left + info_imageInfoBar.margin.right) + 1; |
---|
440 | winwidth = info_content.width; |
---|
441 | marge_right = info_imageInfoBar.width + marge_right; |
---|
442 | |
---|
443 | } |
---|
444 | } else { |
---|
445 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
446 | |
---|
447 | marge = (info_the_page.width - info_HeaderBar.width) / 2; |
---|
448 | marge_right = marge + 2; |
---|
449 | marge_left = marge + 2; |
---|
450 | } else if (info_ToolBar.width > 0) { |
---|
451 | marge = (info_the_page.width - info_ToolBar.width) / 2; |
---|
452 | |
---|
453 | marge_right = marge + info_the_page.left; |
---|
454 | marge_left = marge; |
---|
455 | |
---|
456 | } |
---|
457 | winwidth = info_the_page.width; |
---|
458 | } |
---|
459 | |
---|
460 | |
---|
461 | |
---|
462 | marge_right += Zone_Affichage.borderwidth.right; |
---|
463 | marge_left += Zone_Affichage.borderwidth.left; |
---|
464 | winwidth -= (marge_right + marge_left); |
---|
465 | //--------------------------------------------- |
---|
466 | /* |
---|
467 | jQuery(Parent).width(winwidth); // 1.6.2 |
---|
468 | jQuery(Parent).css({ height: "auto" }); //1.6.2 |
---|
469 | */ |
---|
470 | // jQuery(Parent).height(Zone_Affichage.height); |
---|
471 | //--------------------------------------------- |
---|
472 | |
---|
473 | if (Type_Img == "pamoorama") { |
---|
474 | |
---|
475 | mypanorama = window.myPamoorama; |
---|
476 | //============================================================ |
---|
477 | if (typeof (mypanorama) == "undefined") return false; |
---|
478 | var myPamoorama = mypanorama; |
---|
479 | if (typeof (myPamoorama.skipInit) == "undefined") return false; |
---|
480 | // |
---|
481 | |
---|
482 | if (myPamoorama.skipInit == false) { |
---|
483 | |
---|
484 | return false; |
---|
485 | } |
---|
486 | |
---|
487 | var info_pamoorama = jQuery("#pamoorama").infos(); |
---|
488 | var info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); |
---|
489 | var info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); |
---|
490 | var info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); |
---|
491 | var info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); |
---|
492 | theImg = jQuery("#pamoorama"); |
---|
493 | obj = theImg.get(0); |
---|
494 | |
---|
495 | } else { |
---|
496 | |
---|
497 | |
---|
498 | |
---|
499 | |
---|
500 | } |
---|
501 | //================================================================= |
---|
502 | |
---|
503 | |
---|
504 | switch (Type_Img) { |
---|
505 | case "map": |
---|
506 | img_reelle.height = winheight; // info_img.height; |
---|
507 | info_map = jQuery("#mapPicture").infos(); |
---|
508 | jQuery("#map").css("left", info_map.width + "px"); |
---|
509 | Bandeau_bas.height = 10; |
---|
510 | |
---|
511 | if (theme.match(RegExp("simple", "g"))) { |
---|
512 | img_reelle.width = winwidth; //- info_map.width -marge_right; |
---|
513 | } else { |
---|
514 | img_reelle.width = winwidth - info_map.width - marge_right; |
---|
515 | } |
---|
516 | |
---|
517 | |
---|
518 | info_the_page = jQuery("#the_page").infos(); |
---|
519 | winwidth = img_reelle.width; |
---|
520 | |
---|
521 | ; |
---|
522 | |
---|
523 | break |
---|
524 | |
---|
525 | |
---|
526 | case "panorama": |
---|
527 | // return; |
---|
528 | |
---|
529 | //the theMainImage ?? |
---|
530 | theImg = jQuery("#theMainImage"); |
---|
531 | if (theImg.length > 0) |
---|
532 | theImg = theImg[0]; |
---|
533 | else |
---|
534 | theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]"); |
---|
535 | info_theImage = jQuery(theImg).infos(); |
---|
536 | info_the_page = jQuery("#the_page").infos(); |
---|
537 | jQuery("#theImage").height(info_theImage.height); |
---|
538 | img_finale.height = info_theImage.height; |
---|
539 | |
---|
540 | break |
---|
541 | case "img": |
---|
542 | |
---|
543 | if (!theImg) return true; |
---|
544 | if (theme.match(RegExp("luciano", "g"))) { |
---|
545 | theImg = jQuery("#the_page #theImg"); |
---|
546 | } |
---|
547 | info_theImage = jQuery(theImg).infos(); |
---|
548 | info_the_page = jQuery("#the_page").infos(); |
---|
549 | |
---|
550 | |
---|
551 | break |
---|
552 | case "img_autre": |
---|
553 | if (!theImg) { |
---|
554 | if (DEBUG_autosize == "true") alert("theImg=null"); |
---|
555 | return true; |
---|
556 | |
---|
557 | } |
---|
558 | info_theImage = jQuery(theImg).infos(); |
---|
559 | info_the_page = jQuery("#the_page").infos(); |
---|
560 | |
---|
561 | |
---|
562 | break |
---|
563 | case "embed": |
---|
564 | // |
---|
565 | |
---|
566 | info_theImage = info_img; |
---|
567 | info_the_page = jQuery("#the_page").infos(); |
---|
568 | |
---|
569 | if (rapport < 0) { |
---|
570 | img_height = info_img.height; |
---|
571 | img_width = info_img.width; |
---|
572 | |
---|
573 | img_reelle.height = img_height; |
---|
574 | img_reelle.width = img_width; |
---|
575 | |
---|
576 | } |
---|
577 | |
---|
578 | break |
---|
579 | case "charlie": |
---|
580 | |
---|
581 | |
---|
582 | info_theImage = info_img; |
---|
583 | info_the_page = jQuery("#the_page").infos(); |
---|
584 | if (rapport < 0) { |
---|
585 | img_height = parseInt(info_img.height); |
---|
586 | img_width = parseInt(info_img.width); |
---|
587 | |
---|
588 | img_reelle.height = parseInt(info_img.height); |
---|
589 | img_reelle.width = parseInt(info_img.width); |
---|
590 | } |
---|
591 | |
---|
592 | break |
---|
593 | case "pamoorama": |
---|
594 | |
---|
595 | img_reelle = { height: img_height, width: img_width }; |
---|
596 | |
---|
597 | //========================================================= |
---|
598 | img_reelle.height = img_height; |
---|
599 | img_reelle.width = Zone_Affichage.width; |
---|
600 | |
---|
601 | |
---|
602 | theImg = myPamoorama.image; |
---|
603 | info_theImage = jQuery("#pamoorama").infos(); |
---|
604 | //img_finale.height = info_theImage.height; |
---|
605 | //info_theImage.height = img_reelle.height; |
---|
606 | |
---|
607 | info_theImage.height = info_theImage.height; |
---|
608 | |
---|
609 | info_the_page = jQuery("#the_page").infos(); |
---|
610 | |
---|
611 | break |
---|
612 | |
---|
613 | |
---|
614 | } |
---|
615 | //================= Vérification taille image ================== |
---|
616 | MinWidth = jQuery(theImg).css("minWidth"); |
---|
617 | if (MinWidth == "0px") |
---|
618 | MinWidth = mini_width; |
---|
619 | MinHeight = jQuery(theImg).css("minHeight"); |
---|
620 | if (MinHeight == "0px") |
---|
621 | MinHeight = mini_height; |
---|
622 | |
---|
623 | MaxWidth = jQuery(theImg).css("maxWidth"); |
---|
624 | if (MaxWidth == "0px") |
---|
625 | MaxWidth = winwidth; |
---|
626 | MaxHeight = jQuery(theImg).css("maxHeight"); |
---|
627 | if (MaxHeight == "0px") |
---|
628 | MaxHeight = mwinheight; |
---|
629 | |
---|
630 | //=============== Vérification taille minimale autorizée ====================== |
---|
631 | var miniWidth = jQuery(theImg).Get_Val_int(MinWidth, mini_width); |
---|
632 | var miniHeight = jQuery(theImg).Get_Val_int(MinHeight, mini_height); |
---|
633 | if (winwidth < mini_width2) mini_width2 = winwidth; |
---|
634 | |
---|
635 | var miniWidth2 = jQuery(theImg).Get_Val_int(MinWidth, mini_width2); |
---|
636 | var miniHeight2 = jQuery(theImg).Get_Val_int(MinHeight, mini_height2); |
---|
637 | |
---|
638 | |
---|
639 | var maxWidth = jQuery(theImg).Get_Val_int(MaxWidth, winwidth, "0"); |
---|
640 | maxHeight = jQuery(theImg).Get_Val_int(MaxHeight, winheight, "0"); |
---|
641 | |
---|
642 | |
---|
643 | |
---|
644 | mini_width = parseInt(miniWidth); |
---|
645 | mini_height = parseInt(miniHeight); |
---|
646 | |
---|
647 | img_reelle.width = parseInt(img_reelle.width); |
---|
648 | // jQuery(Cadre).width(mini_width); 1.6.2 |
---|
649 | |
---|
650 | |
---|
651 | if (img_reelle.width < mini_width) { |
---|
652 | //jQuery(Cadre).width(mini_width); 1.6.2 |
---|
653 | return true; |
---|
654 | |
---|
655 | } |
---|
656 | |
---|
657 | img_reelle.height = parseInt(img_reelle.height); |
---|
658 | if (img_reelle.height < parseInt(mini_height)) |
---|
659 | return true; |
---|
660 | //================================================================================== |
---|
661 | //--------------------------------------------- |
---|
662 | // jQuery(Parent).width(winwidth); |
---|
663 | // jQuery(Parent).css({ height: "auto" }); |
---|
664 | // jQuery(Parent).height(Zone_Affichage.height); |
---|
665 | //--------------------------------------------- |
---|
666 | |
---|
667 | if (rapport < 0) { |
---|
668 | |
---|
669 | img_init.height = parseInt(img_height); |
---|
670 | img_init.width = parseInt(img_width); |
---|
671 | |
---|
672 | rapport = img_width / img_height; |
---|
673 | |
---|
674 | if (Type_Img != "map") |
---|
675 | rapport = (img_init.width / img_init.height); |
---|
676 | else |
---|
677 | rapport = 0; |
---|
678 | |
---|
679 | } |
---|
680 | |
---|
681 | |
---|
682 | //=============== Zone d'affichage ============================ |
---|
683 | |
---|
684 | borderW = Zone_Affichage.borderwidth.left; |
---|
685 | borderW += Zone_Affichage.borderwidth.right; |
---|
686 | |
---|
687 | |
---|
688 | Zone_Affichage.width = winwidth - borderW; |
---|
689 | |
---|
690 | |
---|
691 | |
---|
692 | var Licence = jQuery(".licencetag"); |
---|
693 | info_Licence = jQuery(".licencetag").infos(); |
---|
694 | |
---|
695 | jQuery(Parent + " #theImg IMG").css("marginTop", "0px") |
---|
696 | //========== Correction en fonction du thème ============================= |
---|
697 | var correction = 0; |
---|
698 | if (theme.match(RegExp("sobre", "g"))) { |
---|
699 | |
---|
700 | // correction = -info_Licence.padding.top; |
---|
701 | if (Type_Img == 'img') { |
---|
702 | if (msie == true) correction = 0; |
---|
703 | else correction = 0; |
---|
704 | correction = 10; |
---|
705 | } |
---|
706 | |
---|
707 | } else if (theme.match(RegExp("Pure", "g"))) { |
---|
708 | correction += 0; //?? |
---|
709 | } else if (theme.match(RegExp("luciano", "g"))) { |
---|
710 | correction = 0; //?? |
---|
711 | |
---|
712 | } else if (theme.match(RegExp("simple", "g"))) { |
---|
713 | correction += 0; //?? |
---|
714 | } else if (theme.match(RegExp("gally", "g"))) { |
---|
715 | correction += 0; //?? |
---|
716 | |
---|
717 | } |
---|
718 | |
---|
719 | //==================================================== |
---|
720 | if (options.imageAutosizeMargin > 0) Marge_Basse = options.imageAutosizeMargin; |
---|
721 | else Marge_Basse = parseInt(marge_basse || 0); // hors bandeau |
---|
722 | //========================================================================== |
---|
723 | h = 0; |
---|
724 | Bandeau = 0; |
---|
725 | |
---|
726 | h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); |
---|
727 | if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top; |
---|
728 | Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; |
---|
729 | //========================================================================= |
---|
730 | if (Zone_Affichage.height < mini_height2) |
---|
731 | Zone_Affichage.height = mini_height2; |
---|
732 | if (Zone_Affichage.width < mini_width2) |
---|
733 | Zone_Affichage.width = mini_width2; |
---|
734 | //========================================================================= |
---|
735 | if (typeof (Bandeau_bas) != "undefined") { |
---|
736 | Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom); |
---|
737 | } else { |
---|
738 | } |
---|
739 | |
---|
740 | var Image_height = Zone_Affichage.height; |
---|
741 | |
---|
742 | //============================================================= |
---|
743 | var height_user = eval(user_status + "_height"); |
---|
744 | var reg1 = new RegExp("%", "g"); |
---|
745 | if (height_user.match(reg1)) |
---|
746 | Image_height = Image_height * parseInt(height_user) / 100; |
---|
747 | else |
---|
748 | Image_height = parseInt(height_user); |
---|
749 | |
---|
750 | echelle_max = parseFloat(echelle_max, '3'); |
---|
751 | var echelle = parseFloat(Image_height / img_reelle.height, 3); |
---|
752 | |
---|
753 | if (echelle > echelle_max) { echelle = echelle_max; } |
---|
754 | Image_height = parseInt(img_reelle.height * echelle); |
---|
755 | //============================================================ |
---|
756 | |
---|
757 | var Image_width; |
---|
758 | if (rapport > 0) |
---|
759 | Image_width = parseInt(Image_height * rapport); |
---|
760 | else if (Type_Img == "map") { |
---|
761 | Image_width = Zone_Affichage.width - marge_left - marge_right; |
---|
762 | } else { |
---|
763 | Image_width = Zone_Affichage.width; |
---|
764 | } |
---|
765 | |
---|
766 | //=============================================================== |
---|
767 | align_auto = "center"; |
---|
768 | if (jQuery("#theImg").css("textAlign")) |
---|
769 | align_auto = jQuery("#theImg").css("textAlign"); |
---|
770 | var widthmin = winwidth; |
---|
771 | |
---|
772 | if (check_auto_w == 'checked="checked"') { |
---|
773 | // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { |
---|
774 | //==== largeur à atteindre === |
---|
775 | var width_user = eval(user_status + "_width"); |
---|
776 | // Largeur maximale en fonction du statut |
---|
777 | if (width_user.match(reg1)) |
---|
778 | // pourcentage |
---|
779 | widthmin = widthmin * parseInt(width_user) / 100; |
---|
780 | else |
---|
781 | widthmin = parseInt(width_user); |
---|
782 | |
---|
783 | var marges = 0; |
---|
784 | |
---|
785 | if (typeof (info_img) != "undefined") { |
---|
786 | widthmin -= info_img.borderwidth.left || 0; |
---|
787 | widthmin -= info_img.borderwidth.right || 0; |
---|
788 | } |
---|
789 | widthmin -= marges; |
---|
790 | if (typeof Bandeau_t != "undefined") { |
---|
791 | widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); |
---|
792 | Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); |
---|
793 | } else { |
---|
794 | |
---|
795 | jQuery().newResize(); |
---|
796 | } |
---|
797 | if (Image_width > widthmin) { |
---|
798 | // Image_width largeur à atteindre |
---|
799 | // Calcul du rapport d'agrandissement |
---|
800 | var echelle_w = parseFloat((widthmin) / img_reelle.width, 3); |
---|
801 | if (echelle_w > echelle_max) { echelle_w = echelle_max; } |
---|
802 | Image_width = parseInt(img_reelle.width * echelle_w); |
---|
803 | if (rapport > 0) |
---|
804 | Image_height = parseInt(Image_width / rapport); |
---|
805 | } |
---|
806 | |
---|
807 | |
---|
808 | |
---|
809 | } |
---|
810 | |
---|
811 | |
---|
812 | // } |
---|
813 | //=================================================== |
---|
814 | |
---|
815 | img_finale.height = Image_height; |
---|
816 | img_finale.width = Image_width; |
---|
817 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
818 | img_finale.width -= (llgboframe.top * 2); |
---|
819 | if (rapport > 0) img_finale.height = (img_finale.width / rapport); |
---|
820 | else img_finale.height -= (llgboframe.top * 2); |
---|
821 | |
---|
822 | } |
---|
823 | zoom = echelle; |
---|
824 | if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) { |
---|
825 | //=============LLGBO2 =========================== |
---|
826 | t1 = llgboframe; |
---|
827 | if (!theImg.src) { |
---|
828 | theImg = jQuery("#gbo").find("img").get(0) |
---|
829 | if (!theImg.src) { |
---|
830 | theImg = jQuery(Parent).find("div").get(0) |
---|
831 | } |
---|
832 | } |
---|
833 | if (theImg.src) { |
---|
834 | |
---|
835 | |
---|
836 | wingbo = img_finale.width; |
---|
837 | heightgbo = img_finale.height; |
---|
838 | if (Type_Img == "panorama") { |
---|
839 | heightgbo = info_theImage.height; |
---|
840 | img_finale.height = info_theImage.height; |
---|
841 | } |
---|
842 | |
---|
843 | img_finale.width -= marges_llgbo; |
---|
844 | if (jQuery("#slideshow").infos().width > 0) { |
---|
845 | img_finale.height -= (marges_llgbo * 1.5); |
---|
846 | } else { |
---|
847 | img_finale.height -= marges_llgbo |
---|
848 | } |
---|
849 | |
---|
850 | |
---|
851 | if (wingbo > winwidth) { |
---|
852 | jQuery("#gbo").width(winwidth); |
---|
853 | jQuery("#gbo").height(winheight); |
---|
854 | jQuery("#gbo").css("width", winwidth + "px"); |
---|
855 | jQuery("#gbo").css("height", winheight + "px"); |
---|
856 | } |
---|
857 | else { |
---|
858 | jQuery("#gbo").width(wingbo); |
---|
859 | jQuery("#gbo").height(heightgbo); |
---|
860 | jQuery("#gbo").css("width", wingbo + "px"); |
---|
861 | jQuery("#gbo").css("height", heightgbo + "px"); |
---|
862 | } |
---|
863 | |
---|
864 | a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); |
---|
865 | a1 = jQuery("area[rel=prev]"); |
---|
866 | a2 = jQuery("area[rel=next]"); |
---|
867 | a3 = jQuery("area[rel=up]"); |
---|
868 | nb_zone = 3; |
---|
869 | if (a1.length == 0) { |
---|
870 | nb_zone -= 1; |
---|
871 | } |
---|
872 | if (a2.length == 0) { |
---|
873 | nb_zone -= 1; |
---|
874 | } |
---|
875 | |
---|
876 | |
---|
877 | var Largeur_zone = (img_finale.width / nb_zone); |
---|
878 | var Hauteur_zone = (img_finale.height); |
---|
879 | var init_zone = 0; |
---|
880 | |
---|
881 | if (a1.length > 0) { |
---|
882 | coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone }; |
---|
883 | |
---|
884 | jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); |
---|
885 | init_zone += Largeur_zone; |
---|
886 | } |
---|
887 | |
---|
888 | coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; |
---|
889 | |
---|
890 | if (a0.length > 0) { |
---|
891 | jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" }); |
---|
892 | jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" }); |
---|
893 | } else { |
---|
894 | jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" }); |
---|
895 | } |
---|
896 | init_zone += Largeur_zone; |
---|
897 | |
---|
898 | if (a2.length > 0) { |
---|
899 | coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; |
---|
900 | jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); |
---|
901 | } |
---|
902 | jQuery("#theImage").height(heightgbo + marges_llgbo / 2); |
---|
903 | } |
---|
904 | } |
---|
905 | |
---|
906 | //================ Zone affichage ========================= |
---|
907 | |
---|
908 | |
---|
909 | // jQuery(Cadre).css("top", "0px"); |
---|
910 | jQuery("#standard").css("top", 0 + "px"); |
---|
911 | jQuery("#comments").css("top", 0 + "px"); |
---|
912 | //========== Image Remise à l'échelle ======================= |
---|
913 | |
---|
914 | img_finale.height = parseInt(img_finale.height); |
---|
915 | img_finale.width = parseInt(img_finale.width); |
---|
916 | //========================================================================= |
---|
917 | if (jQuery("#slideshow").infos().width > 0) { |
---|
918 | |
---|
919 | |
---|
920 | } else { |
---|
921 | |
---|
922 | } |
---|
923 | //=== cadre = theImage |
---|
924 | jQuery(Cadre).css({ marginLeft: "auto" }); |
---|
925 | // jQuery(Cadre).width(Zone_Affichage.width); |
---|
926 | jQuery(Cadre).css("width", "auto"); |
---|
927 | |
---|
928 | if (Type_Img == "panorama" || Type_Img == "pamoorama") { |
---|
929 | img_finale.height = info_theImage.height; |
---|
930 | Zone_Affichage.height = img_finale.height; |
---|
931 | jQuery(Cadre).height(Zone_Affichage.height); |
---|
932 | } |
---|
933 | |
---|
934 | if (typeof (gmaps) != "undefined") { |
---|
935 | Gmap_ = gmaps.maps[0]; |
---|
936 | if (Gmap_.sizeMode == 'A') { |
---|
937 | jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" }); |
---|
938 | |
---|
939 | } |
---|
940 | } |
---|
941 | //============= flv,mov,mpg ok |
---|
942 | /* wmv nok |
---|
943 | * avi nok |
---|
944 | //=========================================== |
---|
945 | */ |
---|
946 | if (Type_Img == "charlie") { |
---|
947 | t1 = jQuery("#charlie").infos(); |
---|
948 | |
---|
949 | /**/ |
---|
950 | |
---|
951 | pdf = 0; |
---|
952 | jQuery("#charlie div").each(function (i) { |
---|
953 | |
---|
954 | |
---|
955 | p1 = jQuery(this).infos(); |
---|
956 | pdf += p1.padding.right + p1.padding.left; |
---|
957 | }); |
---|
958 | img_finale.width -= pdf; |
---|
959 | |
---|
960 | jQuery("#charlie").css({ |
---|
961 | width: img_finale.width + pdf, |
---|
962 | height: img_finale.height, |
---|
963 | marginLeft: "auto" |
---|
964 | }); |
---|
965 | |
---|
966 | |
---|
967 | |
---|
968 | jQuery("#player").css("width", img_finale.width + "px"); |
---|
969 | jQuery("#player").css("height", img_finale.height); |
---|
970 | |
---|
971 | jQuery("#embedplayer").css("width", img_finale.width); |
---|
972 | jQuery("#embedplayer").css("height", img_finale.height); |
---|
973 | |
---|
974 | |
---|
975 | jQuery("object").width(img_finale.width); |
---|
976 | jQuery("object").height(img_finale.height); |
---|
977 | |
---|
978 | jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //?? |
---|
979 | jQuery(theImg).height(img_finale.height); |
---|
980 | |
---|
981 | jQuery(Cadre).css("height", "auto"); |
---|
982 | |
---|
983 | } else if (Type_Img == "panorama") { |
---|
984 | // ----- jQuery(theImg).panorama2(img_finale.height, img_finale.width); |
---|
985 | // jQuery(theImg).height(img_finale.height); |
---|
986 | // jQuery(theImg).width(img_finale.width); |
---|
987 | // n = jQuery.fn.panorama(); |
---|
988 | // jQuery("#Panorama div").height(img_finale.height); |
---|
989 | // class=simple_panorama |
---|
990 | // jQuery("#Panorama div").height(img_finale.height); |
---|
991 | if (typeof asp_options != "undefined") |
---|
992 | n = asp_options; |
---|
993 | n1 = jQuery("#Panorama div").width(); |
---|
994 | // asp_options.viewport_width = winwidth; |
---|
995 | //n =n.panorama_animate(); |
---|
996 | //jQuery("#panoramaContainer").stop(); ; |
---|
997 | // n = jQuery(theImg).panorama(asp_options); |
---|
998 | |
---|
999 | //jQuery("#Panorama div").width(asp_options.viewport_width); |
---|
1000 | |
---|
1001 | jQuery(".panorama-viewport").css("margin", "auto"); |
---|
1002 | |
---|
1003 | n = info_imageToolBar; |
---|
1004 | |
---|
1005 | |
---|
1006 | } else if (Type_Img == "pamoorama") { |
---|
1007 | |
---|
1008 | |
---|
1009 | |
---|
1010 | info_theImage.height = Zone_Affichage.height; |
---|
1011 | img_height = myPamoorama.imageHeight |
---|
1012 | if (theme.match(RegExp("simple", "g"))) { |
---|
1013 | // marge_right = 2; |
---|
1014 | } |
---|
1015 | new_width = Zone_Affichage.width - marge_right - marge_left; |
---|
1016 | new_width = Zone_Affichage.width - (info_theImage.borderwidth.right + info_theImage.borderwidth.left); |
---|
1017 | if (new_width > myPamoorama.imageWidth) |
---|
1018 | new_width = myPamoorama.imageWidth; |
---|
1019 | |
---|
1020 | |
---|
1021 | |
---|
1022 | Zone_Affichage.height += info_pamoorama_footer.height; |
---|
1023 | zoom = info_theImage.height / img_height; |
---|
1024 | myPamoorama.options.width = new_width * zoom; |
---|
1025 | // if(msie || safari) jQuery("#pamoorama_inner ").css({ zoom: zoom }); |
---|
1026 | //==================================================== |
---|
1027 | jQuery("#pamoorama").css({ |
---|
1028 | marginLeft: "auto", |
---|
1029 | marginRight: "auto", |
---|
1030 | //height: Zone_Affichage.height + "px", sinon déclenchement panorama sur la hauteur; |
---|
1031 | width: new_width + "px" |
---|
1032 | }); |
---|
1033 | jQuery("#pamoorama").width(new_width); |
---|
1034 | |
---|
1035 | //==================================================== |
---|
1036 | info_pamoorama = jQuery("#pamoorama").infos(); |
---|
1037 | img_finale.height = info_pamoorama.height - info_pamoorama_footer.height; |
---|
1038 | img_finale.width = new_width; |
---|
1039 | |
---|
1040 | jQuery("#pamoorama_outter").width(new_width); |
---|
1041 | |
---|
1042 | jQuery("#pamoorama_thumb").width(200 / zoom); |
---|
1043 | // commenter sinon outter augmente à chaque resize |
---|
1044 | // jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height); |
---|
1045 | // pamoorama_frame |
---|
1046 | |
---|
1047 | |
---|
1048 | jQuery("#pamoorama_outter").css({ width: new_width + "px" }); |
---|
1049 | jQuery("#pamoorama_footer").css({ width: new_width + "px" }); |
---|
1050 | // |
---|
1051 | //==================================================== |
---|
1052 | info_pamoorama = jQuery("#pamoorama").infos(); |
---|
1053 | info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); |
---|
1054 | info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); |
---|
1055 | info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); |
---|
1056 | info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); |
---|
1057 | |
---|
1058 | info_frame = jQuery(myPamoorama.frame).infos(); |
---|
1059 | |
---|
1060 | zoom = img_finale.height / img_height; |
---|
1061 | |
---|
1062 | |
---|
1063 | } else if (theImg != null && theImg.src) { |
---|
1064 | //--- background ?? --- |
---|
1065 | jQuery(theImg).height(img_finale.height); |
---|
1066 | jQuery(theImg).width(img_finale.width); |
---|
1067 | jQuery(theImg).css({ height: img_finale.height + "px ", |
---|
1068 | width: img_finale.width + "px " |
---|
1069 | }); |
---|
1070 | |
---|
1071 | |
---|
1072 | } else { |
---|
1073 | //===map ? luciano === |
---|
1074 | |
---|
1075 | // jQuery(Cadre).height(Zone_Affichage.height + Bandeau_bas.height); //?? |
---|
1076 | // jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //?? |
---|
1077 | jQuery(Cadre).css("height","auto"); //?? |
---|
1078 | jQuery(theImg).height(img_finale.height); |
---|
1079 | jQuery(theImg).width(img_finale.width); |
---|
1080 | jQuery(theImg).css({ height: img_finale.height + "px ", |
---|
1081 | width: img_finale.width + "px " |
---|
1082 | }); |
---|
1083 | if (theme.match(RegExp("luciano", "g"))) { |
---|
1084 | jQuery(Parent + " #theImg IMG").css({ height: img_finale.height + "px ", |
---|
1085 | width: img_finale.width + "px " |
---|
1086 | }) |
---|
1087 | } |
---|
1088 | |
---|
1089 | } |
---|
1090 | |
---|
1091 | jQuery("#navThumbPrev").css({ overflow: "hidden" }); |
---|
1092 | jQuery("#navThumbNext").css({ overflow: "hidden" }); |
---|
1093 | n = typeof inittoolbar; |
---|
1094 | if (Type_Img == "map") { |
---|
1095 | jQuery("#navThumbNext").css({ display: 'none' }); |
---|
1096 | jQuery("#navThumbPrev").css({ display: 'none' }); |
---|
1097 | jQuery("#theImage").css({ marginTop: info_ToolBar.height + "px", marginLeft: "0px", |
---|
1098 | width: winwidth + "px", |
---|
1099 | height: winheight + "px" |
---|
1100 | }); |
---|
1101 | //mapPicture |
---|
1102 | } |
---|
1103 | try { |
---|
1104 | if (theme.match(RegExp("gally", "gi"))) { |
---|
1105 | if (typeof inittoolbar == "function") { |
---|
1106 | if (typeof (currentTab) == "undefined") inittoolbar(); |
---|
1107 | else initializeImageMode("resize"); |
---|
1108 | } else { |
---|
1109 | tp = gallyPP.getImageProp(); |
---|
1110 | if (typeof (GallyPP) == "function") |
---|
1111 | gallyPP = new GallyPP(); |
---|
1112 | |
---|
1113 | iph = jQuery("#imageHeaderBar").infos(); |
---|
1114 | jQuery("#imageToolBar").css({ top: iph.bottom + "px", position: "absolute" }); |
---|
1115 | jQuery("#theImage").width(winwidth); |
---|
1116 | } |
---|
1117 | //=========================================================================== |
---|
1118 | if (jQuery("#navThumbPrev").length > 0) { |
---|
1119 | jQuery("#navThumbPrevContainer").css({ left: "0px" |
---|
1120 | }); |
---|
1121 | } |
---|
1122 | if (jQuery("#navThumbNext").length > 0) { |
---|
1123 | jQuery("#navThumbNextContainer").css({ left: "0px" |
---|
1124 | }); |
---|
1125 | } |
---|
1126 | //============================================================================= |
---|
1127 | if (!theme.match(RegExp("lapis", "gi"))) { |
---|
1128 | if (typeof initializeImageMode == "function") { |
---|
1129 | initializeImageMode("resize"); |
---|
1130 | } |
---|
1131 | |
---|
1132 | } |
---|
1133 | |
---|
1134 | } else if (theme.match(RegExp("simple", "g"))) { |
---|
1135 | |
---|
1136 | jQuery("#imageToolBar").css({ position: "static" }); |
---|
1137 | |
---|
1138 | info_imageInfoBar = jQuery("#imageInfoBar").infos(); |
---|
1139 | if (info_imageInfoBar.bottom < info_img.bottom) { |
---|
1140 | // jQuery("#imageInfoBar").height(info_img.bottom); |
---|
1141 | } |
---|
1142 | |
---|
1143 | } else { |
---|
1144 | |
---|
1145 | // jQuery("#imageToolBar").css("position", "static"); |
---|
1146 | } |
---|
1147 | } catch (e) { |
---|
1148 | |
---|
1149 | } |
---|
1150 | // --- réglage de la hauteur de page en fonction du copyright----------- |
---|
1151 | if (typeof (pos_copyright) == "undefined") pos_copyright = jQuery("#copyright").infos(); |
---|
1152 | |
---|
1153 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
1154 | var TitleBox = jQuery("#imageTitleContainer"); |
---|
1155 | if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px"); |
---|
1156 | } else { |
---|
1157 | if (pos_copyright.top > 100) { |
---|
1158 | jQuery("#the_page").height(pos_copyright.top); |
---|
1159 | } |
---|
1160 | } |
---|
1161 | |
---|
1162 | |
---|
1163 | /* |
---|
1164 | if (!theme.match(RegExp("luciano", "gi"))) { |
---|
1165 | jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" }); |
---|
1166 | jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" }); |
---|
1167 | jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); |
---|
1168 | } |
---|
1169 | */ |
---|
1170 | info_frame = jQuery(Cadre).infos(); |
---|
1171 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
1172 | pos = "absolute"; |
---|
1173 | info_theImageBox = jQuery("#theImageAndTitle").infos(); |
---|
1174 | p1 = jQuery(".randomButtons").infos(); |
---|
1175 | p2 = jQuery("#imageHeaderBar").infos(); |
---|
1176 | jQuery("#theImage").width("width", info_theImageBox.width + "px"); |
---|
1177 | jQuery("#theImageAndTitle").css("position", "relative"); |
---|
1178 | jQuery("#theImageAndTitle").css({ marginTop: "0px", |
---|
1179 | paddingTop: (p1.top) + "px" |
---|
1180 | }); |
---|
1181 | t1 = info_theImageBox.top; |
---|
1182 | l1 = info_theImageBox.left; |
---|
1183 | // info_theImageBox = jQuery(Parent).infos(); |
---|
1184 | |
---|
1185 | } else { |
---|
1186 | |
---|
1187 | t1 = info_frame.top; |
---|
1188 | l1 = info_frame.left; |
---|
1189 | info_theImageBox = jQuery(Parent).infos(); //theImage |
---|
1190 | } |
---|
1191 | |
---|
1192 | info_theImageBox.margin.margin = info_frame.margin.margin; |
---|
1193 | info_theImageBox.top = t1; |
---|
1194 | info_theImageBox.left = l1; |
---|
1195 | // info_theImageBox.position = "absolute"; |
---|
1196 | |
---|
1197 | Window_Affichage = info_theImageBox; |
---|
1198 | if (DEBUG_autosize == "true") { |
---|
1199 | // jQuery(Cadre).css("border", "solid green"); |
---|
1200 | |
---|
1201 | jQuery("#Debug5").css({ background: "red", |
---|
1202 | position: "absolute", |
---|
1203 | border: "green solid 2px", |
---|
1204 | textAlign: align_auto, |
---|
1205 | margin: "auto", |
---|
1206 | top: Window_Affichage.top + "px", |
---|
1207 | left: Window_Affichage.left + "px", |
---|
1208 | width: Window_Affichage.width + "px", |
---|
1209 | height: Window_Affichage.height + "px" |
---|
1210 | }); //red |
---|
1211 | jQuery("#Debug4").css({ top: info_frame.bottom - info_description.height + "px" }); //green |
---|
1212 | } |
---|
1213 | |
---|
1214 | Wait_Affichage(); |
---|
1215 | |
---|
1216 | return true; |
---|
1217 | |
---|
1218 | |
---|
1219 | |
---|
1220 | |
---|
1221 | |
---|
1222 | //_____________________________________________________ |
---|
1223 | } // Resize(); |
---|
1224 | |
---|
1225 | |
---|
1226 | //====================================================================== |
---|
1227 | |
---|
1228 | |
---|
1229 | }); // fin extend |
---|
1230 | |
---|
1231 | |
---|
1232 | |
---|
1233 | } // function |
---|
1234 | ); |
---|
1235 | |
---|
1236 | |
---|
1237 | /* |
---|
1238 | * recherche la plus grande image (hauteur ou largeur) |
---|
1239 | */ |
---|
1240 | function Get_Img_Maxi(myobj) { |
---|
1241 | var w00 = 0; |
---|
1242 | var myImg = null; |
---|
1243 | img = jQuery(myobj); |
---|
1244 | |
---|
1245 | img = jQuery('img[alt]'); |
---|
1246 | |
---|
1247 | jQuery(myobj).each(function (i) { |
---|
1248 | w0 = img_reelle.width; |
---|
1249 | h0 = img_reelle.height; |
---|
1250 | if (h0 > w0) w0 = h0; |
---|
1251 | if (w0 > w00) { |
---|
1252 | if (!this.src.match(RegExp(".png", "g"))) |
---|
1253 | if (!this.src.match(RegExp(thumbnail, "g"))) { |
---|
1254 | myImg = this; |
---|
1255 | w00 = w0; |
---|
1256 | } |
---|
1257 | |
---|
1258 | } |
---|
1259 | }); |
---|
1260 | return myImg; |
---|
1261 | } |
---|
1262 | |
---|
1263 | //============================================================ |
---|
1264 | /* |
---|
1265 | * |
---|
1266 | */ |
---|
1267 | |
---|
1268 | function Info_entete(Parent) { |
---|
1269 | |
---|
1270 | info_imageToolBar = jQuery("#imageToolBar").infos(); |
---|
1271 | if (typeof (marge_top) != "undefined") return info_imageToolBar; |
---|
1272 | |
---|
1273 | if (info_imageToolBar.position == "absolute") { |
---|
1274 | jQuery("#imageToolBar").css("position", "relative"); |
---|
1275 | jQuery("#imageToolBar").css("top", 0 + "px"); |
---|
1276 | } |
---|
1277 | optiontop = 0; |
---|
1278 | |
---|
1279 | |
---|
1280 | info_imageInfoBar = jQuery("#imageInfoBar").infos(); |
---|
1281 | |
---|
1282 | jQuery("#" + "theImgContainer").css("marginTop", "0px"); |
---|
1283 | info_theImage = jQuery(Parent).infos(); |
---|
1284 | info_thePicturePage = jQuery("#thePicturePage").infos(); |
---|
1285 | |
---|
1286 | |
---|
1287 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
1288 | |
---|
1289 | info_theImageAndTitle = jQuery("#theImageAndTitle").infos(); |
---|
1290 | info_theImageBox = jQuery("#theImageBox").infos(); |
---|
1291 | |
---|
1292 | optiontop = (marges_llgbo / 2) + info_theImageAndTitle.margin.top; |
---|
1293 | |
---|
1294 | } |
---|
1295 | |
---|
1296 | if (info_theImage.position == "relative") { |
---|
1297 | //--- passage relative ==> static ===/ |
---|
1298 | jQuery(Parent).css("position", "static"); |
---|
1299 | info_theImage = jQuery(Parent).infos(); |
---|
1300 | |
---|
1301 | } else { |
---|
1302 | |
---|
1303 | } |
---|
1304 | if (info_theImage.position == "absolute") { |
---|
1305 | //--- passage absolute ==> static ===/ |
---|
1306 | jQuery(Parent).css("position", "static"); |
---|
1307 | info_theImage = jQuery(Parent).infos(); |
---|
1308 | |
---|
1309 | } |
---|
1310 | |
---|
1311 | marge_top = Math.ceil(Info_the_page.top + |
---|
1312 | Info_the_page.borderwidth.top + |
---|
1313 | info_theImage.borderwidth.top + |
---|
1314 | info_thePicturePage.margin.top |
---|
1315 | ); |
---|
1316 | |
---|
1317 | img_top = Math.ceil(info_theImage.top + |
---|
1318 | info_theImage.borderwidth.top + |
---|
1319 | info_thePicturePage.margin.top + optiontop); |
---|
1320 | result = info_imageToolBar; |
---|
1321 | // result.width = "20%"; |
---|
1322 | // result.left = "40%"; |
---|
1323 | result.marge_top = marge_top; |
---|
1324 | result.img_top = img_top; |
---|
1325 | //=== Afficher le titre de l'image sur le cadre === |
---|
1326 | llgboh2 = jQuery("#gboh2").infos(); |
---|
1327 | result.img_top += llgboh2.height; |
---|
1328 | |
---|
1329 | return result; |
---|
1330 | |
---|
1331 | } |
---|
1332 | |
---|
1333 | /* Récupère les informations sur la description. |
---|
1334 | * |
---|
1335 | */ |
---|
1336 | |
---|
1337 | //==================================================== |
---|
1338 | function Info_Description_f(Parent) { |
---|
1339 | |
---|
1340 | |
---|
1341 | jQuery(Parent).css({ display: "block" }); |
---|
1342 | //====== détection du type d'images ====== |
---|
1343 | if (jQuery("#charlie").length > 0) { |
---|
1344 | Type_Img = "charlie"; |
---|
1345 | |
---|
1346 | } else if (jQuery("#pamoorama").length) { |
---|
1347 | Type_Img = "pamoorama"; |
---|
1348 | } else if (jQuery(Parent + " embed").length > 0) { |
---|
1349 | Type_Img = "embed"; |
---|
1350 | } else if (jQuery("#map").length) { |
---|
1351 | Type_Img = "map"; |
---|
1352 | |
---|
1353 | } else if (jQuery("#Panorama").length) { |
---|
1354 | Type_Img = "panorama"; |
---|
1355 | } else if (jQuery(Parent).find("img").length > 0) { |
---|
1356 | Type_Img = "img"; |
---|
1357 | } else if (jQuery(Parent + "Box").find("img").length > 0) { |
---|
1358 | Type_Img = "img"; |
---|
1359 | Parent = Parent + "Box"; |
---|
1360 | } else if (jQuery("img").length > 0) { |
---|
1361 | Type_Img = "img_autre"; |
---|
1362 | return; |
---|
1363 | } else { |
---|
1364 | return; |
---|
1365 | } |
---|
1366 | // jQuery(Parent + " p:not(:contains(' ')) ").remove(); |
---|
1367 | // jQuery(Parent + " p:(:contains('')) ").remove(); |
---|
1368 | llgboframe = jQuery("#gbo").infos(); |
---|
1369 | marges_llgbo = 0; |
---|
1370 | |
---|
1371 | if (llgboframe.height > 0) { |
---|
1372 | ll2 = jQuery("#gbo div:last").infos(); |
---|
1373 | ll1 = jQuery("#gbo div:first").infos(); |
---|
1374 | ll2 ="" ; |
---|
1375 | jQuery("#gbo div").each(function (i) { |
---|
1376 | |
---|
1377 | if ( this.id=="") return ; |
---|
1378 | ll2=this ; |
---|
1379 | }); |
---|
1380 | ll2 = jQuery(ll2).infos(); |
---|
1381 | ll1 = ll1.width; |
---|
1382 | ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right; |
---|
1383 | marges_llgbo = (ll1 - ll2); |
---|
1384 | |
---|
1385 | } |
---|
1386 | |
---|
1387 | Bandeau_t = Info_entete(Parent) |
---|
1388 | Bandeau = Bandeau_t.img_top; |
---|
1389 | |
---|
1390 | info_theImgContainer = jQuery("#" + "theImgContainer").infos(); |
---|
1391 | info_description = jQuery("#" + "description").infos(); |
---|
1392 | //============================================================================= |
---|
1393 | // jQuery(Parent + " p").css({ padding: "0px", margin: "0px " }); |
---|
1394 | if (theme.match(RegExp("simple", "gi"))) { |
---|
1395 | jQuery(Parent).css({ padding: "0px", |
---|
1396 | marginLeft: "0px", |
---|
1397 | marginRight: "auto", |
---|
1398 | marginTop: "0px", |
---|
1399 | marginBottom: "0px" |
---|
1400 | |
---|
1401 | }); |
---|
1402 | } |
---|
1403 | |
---|
1404 | |
---|
1405 | if (theme.match(RegExp("luciano", "g"))) { |
---|
1406 | jQuery("#imageContainer").css({ height: "auto" }); |
---|
1407 | theImg = jQuery(Parent + " #theImg img"); |
---|
1408 | info_img = jQuery(theImg).infos(); |
---|
1409 | |
---|
1410 | |
---|
1411 | } else if (Type_Img == "map") { |
---|
1412 | |
---|
1413 | info_map = jQuery("#mapPicture").infos(); |
---|
1414 | marge_left = info_map.width; |
---|
1415 | |
---|
1416 | jQuery("#map").css({ left: marge_left + "px", padding: "0px", |
---|
1417 | marginLeft: "0px", |
---|
1418 | marginRight: "4px", |
---|
1419 | marginTop: "0px", |
---|
1420 | marginBottom: "0px", |
---|
1421 | position: "relative" |
---|
1422 | }); |
---|
1423 | |
---|
1424 | theImg = jQuery("#map"); |
---|
1425 | info_img = jQuery(theImg).infos(); |
---|
1426 | |
---|
1427 | |
---|
1428 | } else if (jQuery("#charlie").length > 0) { |
---|
1429 | |
---|
1430 | if (jQuery("object").attr("type") == 'application/x-shockwave-flash') { |
---|
1431 | jQuery("#charlie").css({ |
---|
1432 | paddingTop: "0px", |
---|
1433 | marginTop: "0px", |
---|
1434 | paddingBottom: "30px", |
---|
1435 | marginBottom: "0px" |
---|
1436 | }); |
---|
1437 | } else { |
---|
1438 | jQuery("#charlie").css({ |
---|
1439 | paddingTop: "0px", |
---|
1440 | marginTop: "0px", |
---|
1441 | paddingBottom: "10px", |
---|
1442 | marginBottom: "0px" |
---|
1443 | }); |
---|
1444 | } |
---|
1445 | theImg = jQuery("#charlie"); |
---|
1446 | info_img = jQuery(theImg).infos(); |
---|
1447 | |
---|
1448 | } else if (jQuery(Parent + " embed").length > 0) { |
---|
1449 | |
---|
1450 | theImg = jQuery(Parent + " embed"); |
---|
1451 | info_img = jQuery(theImg).infos(); |
---|
1452 | |
---|
1453 | |
---|
1454 | |
---|
1455 | } else if (Type_Img == "pamoorama") { |
---|
1456 | if (!nopano) { |
---|
1457 | Wait_pamoorama(); |
---|
1458 | return info_description; |
---|
1459 | } |
---|
1460 | theImg = jQuery("#pamoorama"); |
---|
1461 | info_img = jQuery(theImg).infos(); |
---|
1462 | info_footer = jQuery("#pamoorama_footer").infos(); |
---|
1463 | info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height); |
---|
1464 | |
---|
1465 | } else { |
---|
1466 | theImg = jQuery(Parent + " img[alt]"); |
---|
1467 | |
---|
1468 | //theImg = Get_Img_Maxi(theImg); |
---|
1469 | //theMainImage |
---|
1470 | |
---|
1471 | if (!theImg) |
---|
1472 | theImg = jQuery(Parent); // sans img ?? |
---|
1473 | if (theImg.length > 1) |
---|
1474 | {theImg = theImg[0]; |
---|
1475 | |
---|
1476 | } |
---|
1477 | |
---|
1478 | //theImg = Get_Img_Maxi(theImg); //1.6.2 |
---|
1479 | //if (!theImg) theImg = jQuery(Parent); // 1.6.2sans img ?? |
---|
1480 | info_img = jQuery(theImg).infos(); |
---|
1481 | } |
---|
1482 | //===================================================================================== |
---|
1483 | |
---|
1484 | switch (info_img.position) { |
---|
1485 | case "relative": |
---|
1486 | break; |
---|
1487 | case "static": |
---|
1488 | break; |
---|
1489 | case "absolute": |
---|
1490 | break; |
---|
1491 | case "": |
---|
1492 | break; |
---|
1493 | default: |
---|
1494 | break; |
---|
1495 | } |
---|
1496 | |
---|
1497 | info_description.marge = { |
---|
1498 | bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, |
---|
1499 | top: info_img.padding.top + info_img.borderwidth.top + info_img.margin.top |
---|
1500 | } |
---|
1501 | |
---|
1502 | if (llgboframe.height > 0) info_img = llgboframe; // format de l'image+largeur du cadre |
---|
1503 | |
---|
1504 | if (theme.match(RegExp("luciano", "g"))) { |
---|
1505 | |
---|
1506 | info_theImgContainer = jQuery("#imageContainer").infos(); |
---|
1507 | info_description.bottom = jQuery("#imageInfo").infos().top; |
---|
1508 | info_description.top = info_theImgContainer.bottom; |
---|
1509 | Info_slidshowToolBar = jQuery("#slidshowToolBar").infos(); |
---|
1510 | |
---|
1511 | if (Info_slidshowToolBar.height > 0) { |
---|
1512 | correction = (Info_slidshowToolBar.height); |
---|
1513 | info_description.top = info_img.bottom; |
---|
1514 | info_description.bottom = jQuery("#copyright").infos().top; |
---|
1515 | } |
---|
1516 | |
---|
1517 | //========================================================= |
---|
1518 | } else if (theme.match(RegExp("stripped", "gi"))) { |
---|
1519 | //options.imageAutosize |
---|
1520 | //options.imageMargin |
---|
1521 | if (options.imageAutosizeTitle == false) { |
---|
1522 | info_description.top = info_theImageBox.bottom; |
---|
1523 | |
---|
1524 | info_description.bottom =info_HeaderBar.margin.top+ info_description.top + |
---|
1525 | info_description.borderwidth.top + |
---|
1526 | info_description.borderwidth.bottom + |
---|
1527 | options.imageAutosizeMargin*2 + |
---|
1528 | (marges_llgbo / 2)+4; |
---|
1529 | |
---|
1530 | } else { |
---|
1531 | |
---|
1532 | |
---|
1533 | info_description.top = info_theImageBox.bottom + |
---|
1534 | jQuery("#content").infos().top + |
---|
1535 | options.imageAutosizeMargin * 2 + |
---|
1536 | (marges_llgbo / 2) |
---|
1537 | ; |
---|
1538 | info_description.bottom = jQuery("#tabZone").infos().top + |
---|
1539 | info_theImageAndTitle.margin.top; |
---|
1540 | if (msie == true) info_description.bottom -= 4; |
---|
1541 | }; |
---|
1542 | check_desc_v = true; |
---|
1543 | |
---|
1544 | } else { |
---|
1545 | if (theme.match(RegExp("sobre", "gi"))) { |
---|
1546 | info_description.marge.top = -2; |
---|
1547 | } |
---|
1548 | info_description.bottom = info_theImage.bottom; |
---|
1549 | info_description.top = info_img.height + info_theImage.top; |
---|
1550 | // info_description.bottom -= info_img.top; |
---|
1551 | } |
---|
1552 | // |
---|
1553 | |
---|
1554 | info_description.height = info_description.bottom - info_description.top; |
---|
1555 | |
---|
1556 | if (check_desc_v == false) { |
---|
1557 | info_description.height = 0; |
---|
1558 | } |
---|
1559 | |
---|
1560 | Debug_pos(); |
---|
1561 | |
---|
1562 | //cl_visible=false ; |
---|
1563 | return info_description; |
---|
1564 | } |
---|
1565 | |
---|
1566 | //==================================================== |
---|
1567 | function Debug_info(index, infos, nom) { |
---|
1568 | |
---|
1569 | if (infos.height > 0) { |
---|
1570 | |
---|
1571 | message = browser.browser + " -- > Info : " + nom + " " + infos.id + "\n" + |
---|
1572 | "Info nodeName: " + infos.nodeName + "\n" + |
---|
1573 | "Info width: " + infos.width + "\n" + |
---|
1574 | "Info height: " + infos.height + "\n" + |
---|
1575 | "Info top: " + infos.top + "\n" + |
---|
1576 | "Info left: " + infos.left + "\n" + |
---|
1577 | "Info position: " + infos.position + "\n"; |
---|
1578 | |
---|
1579 | myDebug = { id: "Debug" + index, texte: message, |
---|
1580 | css: { |
---|
1581 | color: "black", |
---|
1582 | opacity: "0.5", |
---|
1583 | position: "absolute", |
---|
1584 | height: infos.height || 100 + "px", |
---|
1585 | width: infos.width || 300 + "px", |
---|
1586 | left: infos.left || 0 + "px", |
---|
1587 | border: "solid 1px green", |
---|
1588 | top: infos.top + "px" |
---|
1589 | |
---|
1590 | } |
---|
1591 | } |
---|
1592 | return myDebug; |
---|
1593 | } else { |
---|
1594 | return null; |
---|
1595 | } |
---|
1596 | |
---|
1597 | |
---|
1598 | } |
---|
1599 | //==================================================== |
---|
1600 | function Debug_pos() { |
---|
1601 | if (DEBUG_autosize == "true") { |
---|
1602 | |
---|
1603 | jQuery("[id ^='Debug']").show(); |
---|
1604 | /* |
---|
1605 | Debug2 background-color:yellow |
---|
1606 | Debug3 background-color:blue |
---|
1607 | Debug4 background-color:green |
---|
1608 | Debug5 background-color:red |
---|
1609 | |
---|
1610 | */ |
---|
1611 | |
---|
1612 | affiche_debug({ |
---|
1613 | Debug1: Debug_info(1, Bandeau_t, "Bandeau_t"), |
---|
1614 | Debug4: Debug_info(4, info_description, "info_description"), |
---|
1615 | Debug5: Debug_info(5, info_img, "info_img") |
---|
1616 | }); |
---|
1617 | } |
---|
1618 | } |
---|
1619 | |
---|
1620 | function affiche_debug(aff_infos) { |
---|
1621 | jQuery(jQuery("[id ^='Debug']")).each(function (i) { |
---|
1622 | if (aff_infos[this.id]) { |
---|
1623 | if (aff_infos[this.id].css) { |
---|
1624 | jQuery("#" + this.id).css(aff_infos[this.id].css); |
---|
1625 | jQuery("#" + this.id).text(aff_infos[this.id].texte); |
---|
1626 | } |
---|
1627 | } |
---|
1628 | }); |
---|
1629 | return; |
---|
1630 | |
---|
1631 | } |
---|
1632 | |
---|
1633 | |
---|
1634 | |
---|
1635 | |
---|
1636 | jQuery(function () { |
---|
1637 | //'gallyInterfaceReady' |
---|
1638 | |
---|
1639 | jQuery('#pamoorama').live('ON', function (e) { |
---|
1640 | jQuery(jQuery('.debug').get(1)).trigger('ON'); |
---|
1641 | Bandeau_bas = Info_Description_f(Parent); |
---|
1642 | Bandeau = Bandeau_bas.top; |
---|
1643 | old_window = { width: 0, height: 0 }; |
---|
1644 | Wait_Affichage(); |
---|
1645 | }); |
---|
1646 | |
---|
1647 | jQuery(Parent).live('ON', function (e) { |
---|
1648 | jQuery(jQuery('.debug').get(1)).trigger('ON'); |
---|
1649 | Wait_Affichage(); |
---|
1650 | }); |
---|
1651 | |
---|
1652 | // Custom Event, ON to turn on a debug. |
---|
1653 | jQuery('.debug').live('ON', function (e) { |
---|
1654 | |
---|
1655 | jQuery('.debug').trigger('OFF'); |
---|
1656 | jQuery(this).addClass('debugOn'); |
---|
1657 | }); |
---|
1658 | |
---|
1659 | // On Click = debugs On |
---|
1660 | jQuery('.debug').live('click', function (e) { |
---|
1661 | |
---|
1662 | jQuery(this).trigger('ON'); |
---|
1663 | }); |
---|
1664 | |
---|
1665 | // Custom Event, Turn off a debug |
---|
1666 | jQuery('.debug').live('OFF', function (e) { |
---|
1667 | |
---|
1668 | jQuery(this).removeClass('debugOn'); |
---|
1669 | }); |
---|
1670 | |
---|
1671 | // on Double Click, remove the debug from the DOM |
---|
1672 | jQuery('.debug').live('dblclick', function () { |
---|
1673 | |
---|
1674 | jQuery(this).fadeOut(function () { $(this).remove() }); |
---|
1675 | }); |
---|
1676 | |
---|
1677 | // Add another debug to the DOM |
---|
1678 | jQuery('#adddebugs').click(function () { |
---|
1679 | jQuery('<div></div>') |
---|
1680 | .addClass('debug') |
---|
1681 | .appendTo('#debugsContainer'); |
---|
1682 | }); |
---|
1683 | |
---|
1684 | // Add 10 testing debugs to start with |
---|
1685 | jQuery(window).load(function () { |
---|
1686 | DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false"; |
---|
1687 | if (DEBUG_autosize == "true") { |
---|
1688 | for (var i = 0; i < 10; i++) { |
---|
1689 | jQuery('#adddebugs').click(); |
---|
1690 | } |
---|
1691 | jQuery(jQuery('.debug').get(8)).click(); |
---|
1692 | |
---|
1693 | |
---|
1694 | |
---|
1695 | } |
---|
1696 | }); //on load |
---|
1697 | }); |
---|