[7873] | 1 | |
---|
[8074] | 2 | |
---|
[7369] | 3 | function Toggle_bp() { |
---|
| 4 | cl_visible = !cl_visible; |
---|
| 5 | if (cl_visible) src = src1; |
---|
| 6 | else src = src2; |
---|
| 7 | if (cl_visible) src_info = src3; |
---|
| 8 | else src_info = src4; |
---|
| 9 | |
---|
| 10 | jQuery('#bp_cla').attr('alt', src_info); |
---|
| 11 | jQuery('#bp_cla').attr('title', src_info); |
---|
| 12 | |
---|
| 13 | jQuery('#bp_img_cla').get(0).src = src; |
---|
| 14 | jQuery('#bp_img_cla').attr('alt', src_info); |
---|
| 15 | jQuery('#bp_img_cla').attr('title', src_info); |
---|
| 16 | jQuery('#bp_cla').attr('Stitle', src_info); |
---|
[7805] | 17 | jQuery('#bp_cla').attr('Stip', " "); |
---|
| 18 | jQuery().newResize(); |
---|
| 19 | |
---|
[7369] | 20 | } |
---|
[7867] | 21 | |
---|
| 22 | function Wait_pamoorama() { |
---|
| 23 | if (jQuery("#pamoorama").length) { |
---|
[7872] | 24 | mypanorama = window.myPamoorama; |
---|
| 25 | if (!mypanorama){ |
---|
| 26 | setTimeout("Wait_pamoorama()", 500); |
---|
| 27 | return false ; |
---|
[7867] | 28 | } |
---|
[7872] | 29 | if ( mypanorama.skipInit==false) { |
---|
[7867] | 30 | setTimeout("Wait_pamoorama()", 500); |
---|
[7820] | 31 | return false ; |
---|
| 32 | } |
---|
[7872] | 33 | info_pamoorama = jQuery("#pamoorama").infos(); |
---|
[8536] | 34 | new_width = info_pamoorama.width -( info_pamoorama.borderwidth.left + info_pamoorama.borderwidth.right); |
---|
[7872] | 35 | if ( Math.abs(new_width - myPamoorama.options.width)>10 ) { |
---|
[7867] | 36 | setTimeout("Wait_pamoorama()", 500); |
---|
[7820] | 37 | return false ; |
---|
[7819] | 38 | } |
---|
[7820] | 39 | |
---|
[7867] | 40 | nopano = true; |
---|
[7884] | 41 | old_window = { width: 0, height: 0 }; |
---|
[7867] | 42 | jQuery('#pamoorama').trigger('ON'); |
---|
| 43 | |
---|
[7872] | 44 | } |
---|
| 45 | } |
---|
| 46 | nu_img = 0; |
---|
[7867] | 47 | |
---|
| 48 | //========================================================================== |
---|
[8729] | 49 | function Wait_Affichage() { |
---|
| 50 | |
---|
| 51 | fade_in = parseInt(fade_in); |
---|
[7872] | 52 | if(!jQuery().newResize()) { |
---|
[7820] | 53 | setTimeout("Wait_Affichage()", 500); |
---|
[7872] | 54 | return |
---|
| 55 | } |
---|
[8729] | 56 | |
---|
| 57 | if (fade_in == 0) { |
---|
| 58 | jQuery(Parent).css({opacity:"1" }); |
---|
| 59 | } else { |
---|
[7820] | 60 | |
---|
[8729] | 61 | jQuery(Parent).animate( |
---|
| 62 | { opacity: "1" }, fade_in, "swing" |
---|
[7872] | 63 | , function (i) { |
---|
[8729] | 64 | jQuery(Parent).css({ opacity: "1" }); |
---|
[8007] | 65 | if (DEBUG == "true") { |
---|
| 66 | bp1 = jQuery('.debug').get(nu_img); |
---|
| 67 | if (!bp1) nu_img = 0; |
---|
| 68 | bp1 = jQuery('.debug').get(nu_img); |
---|
| 69 | jQuery(bp1).trigger('ON'); |
---|
| 70 | } |
---|
| 71 | } |
---|
| 72 | ); |
---|
[7872] | 73 | } |
---|
| 74 | |
---|
[7819] | 75 | } |
---|
[7805] | 76 | |
---|
| 77 | |
---|
| 78 | //========================================================= |
---|
[7736] | 79 | |
---|
[7353] | 80 | jQuery(document).ready( |
---|
[7702] | 81 | function (jQuery) { |
---|
[8729] | 82 | jQuery(window).unload(function () { |
---|
| 83 | |
---|
| 84 | |
---|
[8731] | 85 | |
---|
[8729] | 86 | }); |
---|
[7740] | 87 | jQuery(window).load(function () { |
---|
[8729] | 88 | |
---|
| 89 | // jQuery("#theImage").css({ opacity: "0" }); |
---|
| 90 | |
---|
| 91 | jQuery("#the_page").css({ top: "0px" }); |
---|
| 92 | |
---|
[7702] | 93 | //======= cl_conflit ====== |
---|
[7805] | 94 | img_top = "0"; |
---|
| 95 | rapport = -1; |
---|
| 96 | marges_llgbo = 0; |
---|
| 97 | pos = 0; |
---|
[7725] | 98 | //============================================================= |
---|
| 99 | function cl_Timer() { |
---|
| 100 | // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); } |
---|
| 101 | if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) |
---|
| 102 | alert(jQuery.browser.version); |
---|
| 103 | panoramaContainer = jQuery(".panorama-container"); |
---|
| 104 | n = document.scripts[6]; //12--14affiche_script ; |
---|
| 105 | t = n.src; |
---|
| 106 | currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left')); |
---|
| 107 | if (currentPosition == NaN) return; |
---|
| 108 | if (currentPosition > 1000) |
---|
| 109 | jQuery(panoramaContainer).css('margin-left', "0px") |
---|
| 110 | setTimeout("cl_Timer()", 500); |
---|
| 111 | } |
---|
[7669] | 112 | |
---|
| 113 | |
---|
| 114 | |
---|
[7867] | 115 | Type_Img = ""; |
---|
| 116 | TheImg = null; |
---|
| 117 | nopano = false; |
---|
[7669] | 118 | |
---|
[7725] | 119 | /* |
---|
| 120 | * |
---|
| 121 | */ |
---|
[7669] | 122 | |
---|
[7725] | 123 | //============================================================ |
---|
[7669] | 124 | |
---|
[7725] | 125 | /* jQuery */ |
---|
[7805] | 126 | img_init = { height: img_height, width: img_width }; // taille initiale |
---|
| 127 | img_defaut = { height: scaled_height, width: scaled_width }; |
---|
| 128 | img_reelle = { height: img_height, width: img_width }; |
---|
| 129 | img_finale = { height: 0, width: 0 }; |
---|
| 130 | Zone_Affichage = { height: 0, width: 0 }; |
---|
[8729] | 131 | //============================================================ |
---|
[7669] | 132 | |
---|
[7805] | 133 | Info_the_page = jQuery("#the_page").infos(); |
---|
[7669] | 134 | |
---|
[7872] | 135 | Parent = "#theImage"; |
---|
| 136 | Zone_Affichage = jQuery(Parent).infos(); |
---|
[7867] | 137 | // |
---|
[7725] | 138 | var old_window = { width: 0, height: 0 }; |
---|
[7872] | 139 | |
---|
| 140 | if (Info_description(Parent)) { |
---|
| 141 | Bandeau_bas = Info_description(Parent); |
---|
[7867] | 142 | Bandeau = Bandeau_bas.top; |
---|
[7872] | 143 | } else { |
---|
| 144 | |
---|
[7867] | 145 | } |
---|
[8007] | 146 | old_window = { width: 0, height: 0 }; |
---|
[8729] | 147 | jQuery("#theImage").trigger('ON'); |
---|
| 148 | |
---|
[8007] | 149 | old_window = { width: 0, height: 0 }; |
---|
| 150 | jQuery().newResize(); |
---|
[7193] | 151 | |
---|
[7725] | 152 | //=================================================================== |
---|
| 153 | /* |
---|
| 154 | * window .resize |
---|
| 155 | */ |
---|
[7669] | 156 | |
---|
[7193] | 157 | |
---|
[7725] | 158 | jQuery(window).resize( |
---|
[7867] | 159 | function (event, ui) { |
---|
[7872] | 160 | jQuery().newResize(); |
---|
[7805] | 161 | }); |
---|
[7193] | 162 | |
---|
[7805] | 163 | //============== initialisation =================== |
---|
[7008] | 164 | |
---|
[7805] | 165 | var pos; |
---|
| 166 | var set_p = false; |
---|
[7736] | 167 | |
---|
[7867] | 168 | |
---|
[7805] | 169 | }); // window.onload |
---|
| 170 | /* Extension |
---|
| 171 | * affiche_debug |
---|
| 172 | |
---|
| 173 | * resize |
---|
| 174 | * : |
---|
| 175 | */ |
---|
| 176 | //========================================================= |
---|
[7874] | 177 | old_window = { width: 0, height: 0 }; |
---|
[7805] | 178 | |
---|
| 179 | jQuery.fn.extend({ |
---|
[7867] | 180 | //========================================================== |
---|
| 181 | Info_description: function (e) { |
---|
| 182 | return Info_description(e); |
---|
[7805] | 183 | |
---|
[7867] | 184 | }, |
---|
| 185 | //============================================================= |
---|
| 186 | onPropertyChange: function (e) { |
---|
| 187 | return; |
---|
[7805] | 188 | |
---|
[7867] | 189 | |
---|
[7805] | 190 | }, |
---|
[7820] | 191 | /* |
---|
[7805] | 192 | * recherche la plus grande image (hauteur ou largeur) |
---|
| 193 | */ |
---|
[7867] | 194 | Get_Img_Maxi: function (myobj) { |
---|
[7805] | 195 | |
---|
[7867] | 196 | return Get_Img_Maxi(myobj); |
---|
[7805] | 197 | }, |
---|
[7867] | 198 | //============================================================ |
---|
| 199 | affiche_debug: function (aff_infos) { |
---|
| 200 | affiche_debug(aff_infos); |
---|
| 201 | |
---|
| 202 | |
---|
[7805] | 203 | }, |
---|
[7867] | 204 | //==================================================== |
---|
[7805] | 205 | newResize: function () { |
---|
[7867] | 206 | // |
---|
[7872] | 207 | if (DEBUG == "true") { |
---|
| 208 | nu_img += 1; |
---|
| 209 | |
---|
| 210 | bp1 = jQuery('.debug').get(nu_img); |
---|
| 211 | if (!bp1) nu_img = 0; |
---|
| 212 | bp1 = jQuery('.debug').get(nu_img); |
---|
| 213 | |
---|
| 214 | jQuery(bp1).trigger('ON'); |
---|
| 215 | } |
---|
[7805] | 216 | var chk = eval(user_status + "_enabled"); |
---|
[7867] | 217 | if (!cl_visible == true) { return true; } |
---|
| 218 | if (chk == "") { return true; } |
---|
| 219 | |
---|
[7725] | 220 | //================================================================= |
---|
[7867] | 221 | |
---|
[7962] | 222 | |
---|
[7725] | 223 | var winwidth = jQuery(window).width(); |
---|
| 224 | var winheight = jQuery(window).height(); |
---|
[7873] | 225 | n = winwidth - old_window.width; |
---|
| 226 | if (n == 0) { |
---|
| 227 | n = winheight - old_window.height; |
---|
[8536] | 228 | if (n == 0) |
---|
| 229 | return true; |
---|
[7873] | 230 | } |
---|
[7725] | 231 | old_window = jQuery(window).infos(); |
---|
| 232 | //=========================================================================== |
---|
[7008] | 233 | |
---|
| 234 | |
---|
[7872] | 235 | Parent = "#theImage"; |
---|
[7915] | 236 | jQuery(Parent).width(winwidth); |
---|
| 237 | jQuery(Parent).height(winheight); |
---|
| 238 | |
---|
[7872] | 239 | var Cadre = jQuery(Parent).get(0); |
---|
[8588] | 240 | var info_theImage = jQuery(Cadre).infos(); |
---|
[7725] | 241 | //=============== Information cadre ====== |
---|
| 242 | var info_the_page = jQuery("#the_page").infos(); |
---|
| 243 | //============================================================================= |
---|
| 244 | var info_HeaderBar = jQuery("#imageHeaderBar").infos(); |
---|
| 245 | var info_content = jQuery("#content").infos(); |
---|
| 246 | var info_titrePage = jQuery("#titrePage").infos(); |
---|
| 247 | var info_imageInfoBar = jQuery("#imageInfoBar").infos(); |
---|
| 248 | var info_theHeader = jQuery("#theHeader").infos(); |
---|
[7193] | 249 | |
---|
[7872] | 250 | var Zone_Affichage = jQuery(Parent).infos(); |
---|
| 251 | var info_ToolBar = jQuery("#imageToolBar").infos(); |
---|
[7725] | 252 | var marge = 0; |
---|
[8729] | 253 | var marge_right = 0; |
---|
| 254 | var marge_left = 0; |
---|
[7873] | 255 | if (theme.match(RegExp("simple", "g"))) { |
---|
| 256 | if (info_ToolBar.width > 0) |
---|
| 257 | marge = (Zone_Affichage.width - info_ToolBar.width) / 2; |
---|
[8536] | 258 | else if (info_the_page.width > 0) |
---|
[8093] | 259 | marge = (Zone_Affichage.width - info_the_page.width) / 2; |
---|
[7669] | 260 | |
---|
[8729] | 261 | marge_right = marge; |
---|
| 262 | marge_left = marge; |
---|
[7669] | 263 | |
---|
[7873] | 264 | if (info_content.width > 100) { |
---|
[7669] | 265 | |
---|
[8536] | 266 | marge_left = (info_imageInfoBar.margin.left); |
---|
[7873] | 267 | marge_right = (info_imageInfoBar.margin.left + info_imageInfoBar.margin.right); |
---|
| 268 | winwidth = info_content.width; |
---|
| 269 | marge_right = info_imageInfoBar.width + marge_right; |
---|
| 270 | |
---|
| 271 | } |
---|
[8729] | 272 | } else { |
---|
[8731] | 273 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
| 274 | |
---|
| 275 | marge = (info_the_page.width - info_HeaderBar.width) / 2; |
---|
[8735] | 276 | } else if (info_ToolBar.width > 0) |
---|
[8729] | 277 | marge = (info_the_page.width - info_ToolBar.width) / 2; |
---|
| 278 | |
---|
| 279 | marge_right = marge; |
---|
| 280 | marge_left = marge; |
---|
| 281 | winwidth = info_the_page.width; |
---|
[7702] | 282 | } |
---|
[7872] | 283 | |
---|
| 284 | |
---|
[7873] | 285 | |
---|
| 286 | marge_right += Zone_Affichage.borderwidth.right; |
---|
[7872] | 287 | marge_left += Zone_Affichage.borderwidth.left; |
---|
[7725] | 288 | winwidth -= (marge_right + marge_left); |
---|
[7915] | 289 | //--------------------------------------------- |
---|
| 290 | jQuery(Parent).width(winwidth); |
---|
[7931] | 291 | jQuery(Parent).css({ height: "auto" }); |
---|
| 292 | |
---|
| 293 | |
---|
| 294 | // jQuery(Parent).height(Zone_Affichage.height); |
---|
[7915] | 295 | //--------------------------------------------- |
---|
| 296 | |
---|
[7725] | 297 | if (Type_Img == "pamoorama") { |
---|
[7805] | 298 | |
---|
[7867] | 299 | mypanorama = window.myPamoorama; |
---|
[7805] | 300 | //============================================================ |
---|
| 301 | if (typeof (mypanorama) == "undefined") return false; |
---|
| 302 | var myPamoorama = mypanorama; |
---|
| 303 | if (typeof (myPamoorama.skipInit) == "undefined") return false; |
---|
[7867] | 304 | // |
---|
[7805] | 305 | |
---|
| 306 | if (myPamoorama.skipInit == false) { |
---|
[7867] | 307 | |
---|
| 308 | return false; |
---|
[7805] | 309 | } |
---|
| 310 | |
---|
[7867] | 311 | var info_pamoorama = jQuery("#pamoorama").infos(); |
---|
[7725] | 312 | var info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); |
---|
| 313 | var info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); |
---|
| 314 | var info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); |
---|
[7740] | 315 | var info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); |
---|
[7725] | 316 | TheImg = jQuery("#pamoorama"); |
---|
[7867] | 317 | obj = TheImg.get(0); |
---|
[6978] | 318 | |
---|
[7702] | 319 | } else { |
---|
[7008] | 320 | |
---|
[7193] | 321 | |
---|
| 322 | |
---|
| 323 | |
---|
[7725] | 324 | } |
---|
| 325 | //================================================================= |
---|
[7458] | 326 | |
---|
[7193] | 327 | |
---|
[7725] | 328 | switch (Type_Img) { |
---|
| 329 | case "map": |
---|
[7867] | 330 | img_reelle.height = info_img.height; |
---|
| 331 | info_map = jQuery("#mapPicture").infos(); |
---|
[8588] | 332 | jQuery("#map").css("left", info_map.width + "px"); |
---|
| 333 | Bandeau_bas.height = 10; |
---|
[8729] | 334 | |
---|
[8588] | 335 | if (theme.match(RegExp("simple", "g"))) { |
---|
| 336 | img_reelle.width = winwidth; //- info_map.width -marge_right; |
---|
[8729] | 337 | } else { |
---|
| 338 | img_reelle.width = winwidth - info_map.width - marge_right; |
---|
[8588] | 339 | } |
---|
[7193] | 340 | |
---|
[8588] | 341 | |
---|
[7725] | 342 | info_the_page = jQuery("#the_page").infos(); |
---|
[8588] | 343 | winwidth = img_reelle.width; |
---|
| 344 | |
---|
[7725] | 345 | ; |
---|
[7193] | 346 | |
---|
[7725] | 347 | break |
---|
[6912] | 348 | |
---|
[6936] | 349 | |
---|
[7725] | 350 | case "panorama": |
---|
| 351 | // return; |
---|
[6912] | 352 | |
---|
[7867] | 353 | |
---|
[7805] | 354 | TheImg = jQuery().Get_Img_Maxi("#Panorama img"); |
---|
[7725] | 355 | info_theImage = jQuery(TheImg).infos(); |
---|
| 356 | info_the_page = jQuery("#the_page").infos(); |
---|
[7124] | 357 | |
---|
[7725] | 358 | break |
---|
| 359 | case "img": |
---|
[7193] | 360 | |
---|
[7872] | 361 | if (!TheImg) return true; |
---|
[7725] | 362 | if (theme.match(RegExp("luciano", "g"))) { |
---|
| 363 | TheImg = jQuery("#the_page #theImg"); |
---|
| 364 | } |
---|
| 365 | info_theImage = jQuery(TheImg).infos(); |
---|
| 366 | info_the_page = jQuery("#the_page").infos(); |
---|
[7193] | 367 | |
---|
[7124] | 368 | |
---|
[7725] | 369 | break |
---|
| 370 | case "img_autre": |
---|
[7872] | 371 | if (!TheImg) { |
---|
| 372 | if (DEBUG == "true") alert("TheImg=null"); |
---|
| 373 | return true; |
---|
| 374 | |
---|
| 375 | } |
---|
[7725] | 376 | info_theImage = jQuery(TheImg).infos(); |
---|
| 377 | info_the_page = jQuery("#the_page").infos(); |
---|
[7193] | 378 | |
---|
| 379 | |
---|
[7725] | 380 | break |
---|
| 381 | case "embed": |
---|
| 382 | // |
---|
[7193] | 383 | |
---|
[7867] | 384 | info_theImage = info_img; |
---|
| 385 | info_the_page = jQuery("#the_page").infos(); |
---|
[7193] | 386 | |
---|
[7725] | 387 | if (rapport < 0) { |
---|
[7867] | 388 | img_height = info_img.height; |
---|
| 389 | img_width = info_img.width; |
---|
[7124] | 390 | |
---|
[7725] | 391 | img_reelle.height = img_height; |
---|
| 392 | img_reelle.width = img_width; |
---|
[7124] | 393 | |
---|
[7725] | 394 | } |
---|
[7574] | 395 | |
---|
[7725] | 396 | break |
---|
| 397 | case "charlie": |
---|
[7642] | 398 | |
---|
[7867] | 399 | |
---|
| 400 | info_theImage = info_img; |
---|
[7725] | 401 | info_the_page = jQuery("#the_page").infos(); |
---|
| 402 | if (rapport < 0) { |
---|
[7867] | 403 | img_height = parseInt(info_img.height); |
---|
| 404 | img_width = parseInt(info_img.width); |
---|
[7574] | 405 | |
---|
[7867] | 406 | img_reelle.height = parseInt(info_img.height); |
---|
| 407 | img_reelle.width = parseInt(info_img.width); |
---|
[7725] | 408 | } |
---|
[7124] | 409 | |
---|
[7725] | 410 | break |
---|
| 411 | case "pamoorama": |
---|
[7805] | 412 | |
---|
[7867] | 413 | img_reelle = { height: img_height, width: img_width }; |
---|
[7805] | 414 | |
---|
[7725] | 415 | //========================================================= |
---|
[7943] | 416 | img_reelle.height = img_height; |
---|
[7934] | 417 | img_reelle.width = Zone_Affichage.width; |
---|
| 418 | |
---|
| 419 | |
---|
[7725] | 420 | TheImg = myPamoorama.image; |
---|
| 421 | info_theImage = jQuery("#pamoorama").infos(); |
---|
[7934] | 422 | info_theImage.height = img_reelle.height; |
---|
| 423 | |
---|
| 424 | |
---|
[7725] | 425 | info_the_page = jQuery("#the_page").infos(); |
---|
[7124] | 426 | |
---|
[7725] | 427 | break |
---|
[7124] | 428 | |
---|
[6912] | 429 | |
---|
[7725] | 430 | } |
---|
[7931] | 431 | |
---|
[7725] | 432 | //=============== Vérification taille minimale autorizée ====================== |
---|
| 433 | var miniWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); |
---|
[8006] | 434 | var miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); |
---|
[7124] | 435 | |
---|
[7962] | 436 | var miniWidth2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width2); |
---|
| 437 | var miniHeight2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height2); |
---|
[7193] | 438 | |
---|
[7725] | 439 | var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); |
---|
| 440 | maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); |
---|
[7193] | 441 | |
---|
[7962] | 442 | |
---|
[7725] | 443 | mini_width = parseInt(miniWidth); |
---|
| 444 | mini_height = parseInt(miniHeight); |
---|
[7193] | 445 | |
---|
[7725] | 446 | img_reelle.width = parseInt(img_reelle.width); |
---|
[7193] | 447 | |
---|
[7816] | 448 | if (img_reelle.width < mini_width) return true; |
---|
[7193] | 449 | |
---|
[7725] | 450 | img_reelle.height = parseInt(img_reelle.height); |
---|
[7816] | 451 | if (img_reelle.height < parseInt(mini_height)) return true; |
---|
[7725] | 452 | //================================================================================== |
---|
| 453 | if (rapport < 0) { |
---|
[7193] | 454 | |
---|
[7725] | 455 | img_init.height = parseInt(img_height); |
---|
| 456 | img_init.width = parseInt(img_width); |
---|
[7193] | 457 | |
---|
[7725] | 458 | rapport = img_width / img_height; |
---|
[7193] | 459 | |
---|
[7725] | 460 | if (Type_Img != "map") |
---|
| 461 | rapport = (img_init.width / img_init.height); |
---|
| 462 | else |
---|
| 463 | rapport = 0; |
---|
[7193] | 464 | |
---|
[7725] | 465 | } |
---|
[7193] | 466 | |
---|
| 467 | |
---|
[7725] | 468 | //=============== Zone d'affichage ============================ |
---|
[6936] | 469 | |
---|
[7725] | 470 | borderW = Zone_Affichage.borderwidth.left; |
---|
| 471 | borderW += Zone_Affichage.borderwidth.right; |
---|
[6936] | 472 | |
---|
[7931] | 473 | |
---|
[7725] | 474 | Zone_Affichage.width = winwidth - borderW; |
---|
[7458] | 475 | |
---|
[7536] | 476 | |
---|
[7458] | 477 | |
---|
[7725] | 478 | var Licence = jQuery(".licencetag"); |
---|
| 479 | info_Licence = jQuery(".licencetag").infos(); |
---|
[7458] | 480 | |
---|
[7872] | 481 | jQuery(Parent + " #theImg IMG").css("marginTop", "0px") |
---|
[7725] | 482 | //========== Correction en fonction du thème ============================= |
---|
| 483 | var correction = 0; |
---|
| 484 | if (theme.match(RegExp("sobre", "g"))) { |
---|
[7536] | 485 | |
---|
[7867] | 486 | // correction = -info_Licence.padding.top; |
---|
[7872] | 487 | if (Type_Img == 'img') { |
---|
[8006] | 488 | if (msie == true) correction = 0; |
---|
| 489 | else correction = 0; |
---|
[7872] | 490 | } |
---|
[7124] | 491 | |
---|
[7725] | 492 | } else if (theme.match(RegExp("Pure", "g"))) { |
---|
| 493 | correction += 0; //?? |
---|
| 494 | } else if (theme.match(RegExp("luciano", "g"))) { |
---|
| 495 | correction = 0; //?? |
---|
[7458] | 496 | |
---|
[7725] | 497 | } else if (theme.match(RegExp("simple", "g"))) { |
---|
| 498 | correction += 0; //?? |
---|
| 499 | } else if (theme.match(RegExp("gally", "g"))) { |
---|
| 500 | correction += 0; //?? |
---|
[7193] | 501 | |
---|
[7725] | 502 | } |
---|
[7193] | 503 | |
---|
[7725] | 504 | //==================================================== |
---|
[7369] | 505 | |
---|
[7725] | 506 | Marge_Basse = parseInt(marge_basse || 0); // hors bandeau |
---|
| 507 | //========================================================================== |
---|
| 508 | h = 0; |
---|
[7931] | 509 | |
---|
[7962] | 510 | h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); |
---|
| 511 | Bandeau = Bandeau_t.img_top; |
---|
| 512 | Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; |
---|
| 513 | //========================================================================= |
---|
[8006] | 514 | if (Zone_Affichage.height < mini_height2) |
---|
[7962] | 515 | Zone_Affichage.height = mini_height2; |
---|
[8006] | 516 | if (Zone_Affichage.width < mini_width2) |
---|
[7962] | 517 | Zone_Affichage.width = mini_width2; |
---|
| 518 | //========================================================================= |
---|
[7872] | 519 | if (typeof (Bandeau_bas) != "undefined") { |
---|
[7962] | 520 | Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom); |
---|
[7124] | 521 | |
---|
[7872] | 522 | |
---|
| 523 | } else { |
---|
[7962] | 524 | |
---|
[7872] | 525 | } |
---|
| 526 | |
---|
[7962] | 527 | var Image_height = Zone_Affichage.height; |
---|
[7872] | 528 | |
---|
[7725] | 529 | //============================================================= |
---|
| 530 | var height_user = eval(user_status + "_height"); |
---|
| 531 | var reg1 = new RegExp("%", "g"); |
---|
| 532 | if (height_user.match(reg1)) |
---|
| 533 | Image_height = Image_height * parseInt(height_user) / 100; |
---|
| 534 | else |
---|
| 535 | Image_height = parseInt(height_user); |
---|
[7124] | 536 | |
---|
[7725] | 537 | echelle_max = parseFloat(echelle_max, '3'); |
---|
| 538 | var echelle = parseFloat(Image_height / img_reelle.height, 3); |
---|
[7124] | 539 | |
---|
[7725] | 540 | if (echelle > echelle_max) { echelle = echelle_max; } |
---|
| 541 | Image_height = parseInt(img_reelle.height * echelle); |
---|
| 542 | //============================================================ |
---|
[7124] | 543 | |
---|
[7725] | 544 | var Image_width; |
---|
| 545 | if (rapport > 0) |
---|
| 546 | Image_width = parseInt(Image_height * rapport); |
---|
| 547 | else if (Type_Img == "map") { |
---|
| 548 | Image_width = Zone_Affichage.width - marge_left - marge_right; |
---|
| 549 | } else { |
---|
| 550 | Image_width = Zone_Affichage.width; |
---|
| 551 | } |
---|
[7394] | 552 | |
---|
[7725] | 553 | //=============================================================== |
---|
| 554 | align_auto = "center"; |
---|
| 555 | if (jQuery("#theImg").css("textAlign")) |
---|
| 556 | align_auto = jQuery("#theImg").css("textAlign"); |
---|
| 557 | var widthmin = winwidth; |
---|
[6983] | 558 | |
---|
[7725] | 559 | if (check_auto_w == 'checked="checked"') { |
---|
| 560 | // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { |
---|
| 561 | //==== largeur à atteindre === |
---|
| 562 | var width_user = eval(user_status + "_width"); |
---|
| 563 | // Largeur maximale en fonction du statut |
---|
| 564 | if (width_user.match(reg1)) |
---|
| 565 | // pourcentage |
---|
| 566 | widthmin = widthmin * parseInt(width_user) / 100; |
---|
| 567 | else |
---|
| 568 | widthmin = parseInt(width_user); |
---|
[7962] | 569 | |
---|
[8006] | 570 | var marges = 0; |
---|
[7962] | 571 | |
---|
[7873] | 572 | if (typeof (info_img) != "undefined") { |
---|
| 573 | widthmin -= info_img.borderwidth.left || 0; |
---|
| 574 | widthmin -= info_img.borderwidth.right || 0; |
---|
[7872] | 575 | } |
---|
[7725] | 576 | widthmin -= marges; |
---|
[7962] | 577 | widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); |
---|
| 578 | Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); |
---|
[7725] | 579 | if (Image_width > widthmin) { |
---|
| 580 | // Image_width largeur à atteindre |
---|
| 581 | // Calcul du rapport d'agrandissement |
---|
| 582 | var echelle_w = parseFloat((widthmin) / img_reelle.width, 3); |
---|
| 583 | if (echelle_w > echelle_max) { echelle_w = echelle_max; } |
---|
| 584 | Image_width = parseInt(img_reelle.width * echelle_w); |
---|
| 585 | if (rapport > 0) |
---|
| 586 | Image_height = parseInt(Image_width / rapport); |
---|
| 587 | } |
---|
[6978] | 588 | |
---|
[7124] | 589 | |
---|
[7725] | 590 | |
---|
[7702] | 591 | } |
---|
[7124] | 592 | |
---|
| 593 | |
---|
[7725] | 594 | // } |
---|
| 595 | //=================================================== |
---|
[7193] | 596 | |
---|
[7962] | 597 | img_finale.height = Image_height; |
---|
| 598 | img_finale.width = Image_width; |
---|
[8006] | 599 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
[8735] | 600 | img_finale.width -= (llgboframe.top * 2); |
---|
[8070] | 601 | img_finale.height = img_finale.width / rapport; |
---|
[8006] | 602 | } |
---|
[7725] | 603 | zoom = echelle; |
---|
[8006] | 604 | if (llgboframe.height > 0) { |
---|
| 605 | //=============LLGBO2 =========================== |
---|
| 606 | t1 = llgboframe; |
---|
[7725] | 607 | if (!TheImg.src) { |
---|
| 608 | TheImg = jQuery(TheImg).find("img").get(0) |
---|
| 609 | } |
---|
| 610 | if (TheImg.src) { |
---|
[7867] | 611 | |
---|
[7962] | 612 | |
---|
[8070] | 613 | wingbo = img_finale.width; |
---|
| 614 | heightgbo = img_finale.height; |
---|
| 615 | img_finale.width -= marges_llgbo; |
---|
[8729] | 616 | if (jQuery("#slideshow").infos().width > 0) { |
---|
| 617 | img_finale.height -= (marges_llgbo * 1.5); |
---|
| 618 | } else { |
---|
| 619 | img_finale.height -= marges_llgbo |
---|
| 620 | } |
---|
[7394] | 621 | |
---|
[8729] | 622 | |
---|
[8006] | 623 | if (wingbo > winwidth) { |
---|
| 624 | jQuery("#gbo").width(winwidth); |
---|
| 625 | jQuery("#gbo").height(winheight); |
---|
| 626 | jQuery("#gbo").css("width", winwidth + "px"); |
---|
| 627 | jQuery("#gbo").css("height", winheight + "px"); |
---|
[7702] | 628 | } |
---|
[8006] | 629 | else { |
---|
| 630 | jQuery("#gbo").width(wingbo); |
---|
| 631 | jQuery("#gbo").height(heightgbo); |
---|
| 632 | jQuery("#gbo").css("width", wingbo + "px"); |
---|
| 633 | jQuery("#gbo").css("height", heightgbo + "px"); |
---|
| 634 | } |
---|
[7962] | 635 | |
---|
[7725] | 636 | a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); |
---|
| 637 | a1 = jQuery("area[rel=prev]"); |
---|
| 638 | a2 = jQuery("area[rel=next]"); |
---|
| 639 | a3 = jQuery("area[rel=up]"); |
---|
| 640 | nb_zone = 3; |
---|
| 641 | if (a1.length == 0) { |
---|
| 642 | nb_zone -= 1; |
---|
[7702] | 643 | } |
---|
[7725] | 644 | if (a2.length == 0) { |
---|
| 645 | nb_zone -= 1; |
---|
| 646 | } |
---|
[7536] | 647 | |
---|
| 648 | |
---|
[7962] | 649 | var Largeur_zone = (img_finale.width / nb_zone); |
---|
| 650 | var Hauteur_zone = (img_finale.height); |
---|
[7725] | 651 | var init_zone = 0; |
---|
[7193] | 652 | |
---|
[7725] | 653 | if (a1.length > 0) { |
---|
| 654 | coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone }; |
---|
[7193] | 655 | |
---|
[7725] | 656 | jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); |
---|
| 657 | init_zone += Largeur_zone; |
---|
[7702] | 658 | } |
---|
[7536] | 659 | |
---|
[7962] | 660 | coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; |
---|
[7536] | 661 | |
---|
[7725] | 662 | if (a0.length > 0) { |
---|
| 663 | jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" }); |
---|
| 664 | jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" }); |
---|
| 665 | } else { |
---|
| 666 | jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" }); |
---|
| 667 | } |
---|
[7702] | 668 | init_zone += Largeur_zone; |
---|
[6978] | 669 | |
---|
[7725] | 670 | if (a2.length > 0) { |
---|
[7962] | 671 | coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; |
---|
[7725] | 672 | jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); |
---|
| 673 | } |
---|
[7702] | 674 | } |
---|
| 675 | } |
---|
[6978] | 676 | |
---|
[7725] | 677 | //================ Zone affichage ========================= |
---|
[7962] | 678 | |
---|
[7375] | 679 | |
---|
[7725] | 680 | // jQuery(Cadre).css("top", "0px"); |
---|
| 681 | jQuery("#standard").css("top", 0 + "px"); |
---|
| 682 | jQuery("#comments").css("top", 0 + "px"); |
---|
[7962] | 683 | //========== Image Remise à l'échelle ======================= |
---|
[6936] | 684 | |
---|
[7962] | 685 | Image_height = img_finale.height; |
---|
| 686 | Image_width = img_finale.width; |
---|
[7725] | 687 | //========================================================================= |
---|
[8729] | 688 | if (jQuery("#slideshow").infos().width > 0) { |
---|
| 689 | |
---|
| 690 | jQuery(Cadre).css({ marginLeft: "auto" |
---|
| 691 | }); |
---|
| 692 | } |
---|
| 693 | else |
---|
| 694 | jQuery(Cadre).css({ marginLeft: marge_left + "px" |
---|
| 695 | }); |
---|
[7962] | 696 | jQuery(Cadre).width(Zone_Affichage.width); |
---|
| 697 | // jQuery(Cadre).height(Zone_Affichage.height); |
---|
[7220] | 698 | |
---|
[7725] | 699 | if (typeof (gmaps) != "undefined") { |
---|
| 700 | Gmap_ = gmaps.maps[0]; |
---|
| 701 | if (Gmap_.sizeMode == 'A') { |
---|
| 702 | jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" }); |
---|
[7124] | 703 | |
---|
[7725] | 704 | } |
---|
[7702] | 705 | } |
---|
[7826] | 706 | //============= flv,mov,mpg ok |
---|
| 707 | /* wmv nok |
---|
| 708 | * avi nok |
---|
| 709 | //=========================================== |
---|
| 710 | */ |
---|
[7725] | 711 | if (Type_Img == "charlie") { |
---|
| 712 | t1 = jQuery("#charlie").infos(); |
---|
[7826] | 713 | |
---|
[7725] | 714 | /**/ |
---|
[7867] | 715 | |
---|
| 716 | pdf = 0; |
---|
| 717 | jQuery("#charlie div").each(function (i) { |
---|
| 718 | |
---|
| 719 | |
---|
| 720 | p1 = jQuery(this).infos(); |
---|
| 721 | pdf += p1.padding.right + p1.padding.left; |
---|
| 722 | }); |
---|
[7962] | 723 | img_finale.width -= pdf; |
---|
[7867] | 724 | |
---|
[7725] | 725 | jQuery("#charlie").css({ |
---|
[7962] | 726 | width: img_finale.width + pdf, |
---|
| 727 | height: img_finale.height, |
---|
[7725] | 728 | margin: "auto" |
---|
| 729 | }); |
---|
[7124] | 730 | |
---|
[7008] | 731 | |
---|
[7826] | 732 | |
---|
[7962] | 733 | jQuery("#player").css("width", img_finale.width + "px"); |
---|
| 734 | jQuery("#player").css("height", img_finale.height); |
---|
[7008] | 735 | |
---|
[7962] | 736 | jQuery("#embedplayer").css("width", img_finale.width); |
---|
| 737 | jQuery("#embedplayer").css("height", img_finale.height); |
---|
[7193] | 738 | |
---|
[7369] | 739 | |
---|
[7962] | 740 | jQuery("object").width(img_finale.width); |
---|
| 741 | jQuery("object").height(img_finale.height); |
---|
[7826] | 742 | |
---|
| 743 | |
---|
[7725] | 744 | } else if (Type_Img == "panorama") { |
---|
[7574] | 745 | |
---|
[7725] | 746 | // ----- jQuery(TheImg).panorama2(img_finale.height, img_finale.width); |
---|
| 747 | // jQuery(TheImg).height(img_finale.height); |
---|
| 748 | // jQuery(TheImg).width(img_finale.width); |
---|
[7962] | 749 | jQuery("#Panorama div").height(img_finale.height); |
---|
[7725] | 750 | // class=simple_panorama |
---|
[7574] | 751 | |
---|
[7725] | 752 | jQuery(".panorama-viewport").css("left", "2px"); |
---|
| 753 | jQuery(".panorama-viewport").css("width", "auto"); |
---|
| 754 | // setTimeout("cl_Timer()", 500); |
---|
[6978] | 755 | |
---|
[7725] | 756 | } else if (Type_Img == "pamoorama") { |
---|
[8536] | 757 | info_theImage.height = Zone_Affichage.height; |
---|
[7725] | 758 | img_height = myPamoorama.imageHeight |
---|
| 759 | if (theme.match(RegExp("simple", "g"))) { |
---|
[8536] | 760 | // marge_right = 2; |
---|
[7725] | 761 | } |
---|
| 762 | new_width = Zone_Affichage.width - marge_right - marge_left; |
---|
[8536] | 763 | new_width = Zone_Affichage.width - (info_theImage.borderwidth.right + info_theImage.borderwidth.left); |
---|
[7867] | 764 | |
---|
[8006] | 765 | |
---|
| 766 | |
---|
[8536] | 767 | Zone_Affichage.height += info_pamoorama_footer.height; |
---|
[8006] | 768 | zoom = info_theImage.height / img_height; |
---|
| 769 | myPamoorama.options.width = new_width * zoom; |
---|
[8070] | 770 | // if(msie || safari) jQuery("#pamoorama_inner ").css({ zoom: zoom }); |
---|
[7736] | 771 | //==================================================== |
---|
| 772 | jQuery("#pamoorama").css({ |
---|
| 773 | marginLeft: "auto", |
---|
[7725] | 774 | marginRight: "auto", |
---|
[8536] | 775 | //height: Zone_Affichage.height + "px", sinon déclenchement panorama sur la hauteur; |
---|
[7725] | 776 | width: new_width + "px" |
---|
| 777 | }); |
---|
| 778 | jQuery("#pamoorama").width(new_width); |
---|
[7805] | 779 | |
---|
[7736] | 780 | //==================================================== |
---|
[7867] | 781 | info_pamoorama = jQuery("#pamoorama").infos(); |
---|
| 782 | img_finale.height = info_pamoorama.height - info_pamoorama_footer.height; |
---|
| 783 | img_finale.width = new_width; |
---|
[7805] | 784 | |
---|
[7867] | 785 | jQuery("#pamoorama_outter").width(new_width); |
---|
[8536] | 786 | |
---|
| 787 | |
---|
[8074] | 788 | // commenter sinon outter augmente à chaque resize |
---|
[8536] | 789 | // jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height); |
---|
[7805] | 790 | |
---|
[7817] | 791 | |
---|
[7867] | 792 | |
---|
[8074] | 793 | jQuery("#pamoorama_outter").css({ width: new_width + "px" }); |
---|
[8536] | 794 | jQuery("#pamoorama_footer").css({ width: new_width + "px" }); |
---|
[7867] | 795 | // |
---|
[7736] | 796 | //==================================================== |
---|
[7867] | 797 | info_pamoorama = jQuery("#pamoorama").infos(); |
---|
| 798 | info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); |
---|
| 799 | info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); |
---|
| 800 | info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); |
---|
| 801 | info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); |
---|
[7536] | 802 | |
---|
[7740] | 803 | info_frame = jQuery(myPamoorama.frame).infos(); |
---|
[7736] | 804 | |
---|
[7962] | 805 | zoom = img_finale.height / img_height; |
---|
[7316] | 806 | |
---|
| 807 | |
---|
[7725] | 808 | } else if (TheImg.src) { |
---|
| 809 | //--- background ?? --- |
---|
| 810 | jQuery(TheImg).height(img_finale.height); |
---|
| 811 | jQuery(TheImg).width(img_finale.width); |
---|
[7962] | 812 | jQuery(TheImg).css({ height: img_finale.height + "px ", |
---|
| 813 | width: img_finale.width + "px " |
---|
| 814 | }); |
---|
[7458] | 815 | |
---|
[7875] | 816 | |
---|
[7725] | 817 | } else { |
---|
| 818 | //===map ? === |
---|
| 819 | jQuery(TheImg).height(img_finale.height); |
---|
| 820 | jQuery(TheImg).width(img_finale.width); |
---|
[7962] | 821 | jQuery(TheImg).css({ height: img_finale.height + "px ", |
---|
| 822 | width: img_finale.width + "px " |
---|
| 823 | }); |
---|
[7458] | 824 | |
---|
[7725] | 825 | } |
---|
[7458] | 826 | |
---|
[8729] | 827 | jQuery("#imageContainer").css({ height: "auto" }); |
---|
[7316] | 828 | |
---|
[7872] | 829 | jQuery("#navThumbPrev").css({ overflow: "hidden" }); |
---|
| 830 | jQuery("#navThumbNext").css({ overflow: "hidden" }); |
---|
[8588] | 831 | n = typeof inittoolbar; |
---|
[8729] | 832 | if (Type_Img == "map") { |
---|
| 833 | jQuery("#navThumbNext").css({ display: 'none' }); |
---|
| 834 | jQuery("#navThumbPrev").css({ display: 'none' }); |
---|
| 835 | } |
---|
[7725] | 836 | try { |
---|
[7821] | 837 | if (theme.match(RegExp("gally", "gi"))) { |
---|
[8588] | 838 | if (typeof inittoolbar == "function") { |
---|
| 839 | if (typeof (currentTab) == "undefined") inittoolbar(); |
---|
| 840 | else initializeImageMode("resize"); |
---|
| 841 | } |
---|
| 842 | //=========================================================================== |
---|
[7354] | 843 | |
---|
[7725] | 844 | if (jQuery("#navThumbPrev").length > 0) { |
---|
| 845 | jQuery("#navThumbPrev").css({ height: info_img.height + "px", |
---|
| 846 | top: info_img.top + 20 + "px", overflow: "hidden" |
---|
| 847 | }); |
---|
[8729] | 848 | |
---|
[7725] | 849 | } |
---|
| 850 | if (jQuery("#navThumbNext").length > 0) { |
---|
| 851 | jQuery("#navThumbNext").css({ height: info_img.height + "px", |
---|
| 852 | top: info_img.top + 20 + "px", overflow: "hidden" |
---|
| 853 | }); |
---|
| 854 | |
---|
| 855 | } |
---|
[8729] | 856 | |
---|
| 857 | |
---|
[8588] | 858 | if (!theme.match(RegExp("lapis", "gi"))) { |
---|
[8729] | 859 | if (typeof initializeImageMode == "function") { |
---|
| 860 | initializeImageMode("resize"); |
---|
| 861 | } |
---|
| 862 | |
---|
[8588] | 863 | } |
---|
[7354] | 864 | |
---|
[7725] | 865 | } else if (theme.match(RegExp("simple", "g"))) { |
---|
[7394] | 866 | |
---|
[8536] | 867 | jQuery("#imageToolBar").css({ position: "static" }); |
---|
[8588] | 868 | |
---|
[7725] | 869 | info_imageInfoBar = jQuery("#imageInfoBar").infos(); |
---|
| 870 | if (info_imageInfoBar.bottom < info_img.bottom) { |
---|
[8588] | 871 | // jQuery("#imageInfoBar").height(info_img.bottom); |
---|
[7725] | 872 | } |
---|
[7394] | 873 | |
---|
[7725] | 874 | } else { |
---|
| 875 | |
---|
| 876 | // jQuery("#imageToolBar").css("position", "static"); |
---|
[7702] | 877 | } |
---|
[7725] | 878 | } catch (e) { |
---|
[7702] | 879 | |
---|
| 880 | } |
---|
[7805] | 881 | // --- rglage de la hauteur de page en fonction du copyright----------- |
---|
| 882 | if (typeof (pos) == "undefined") pos = jQuery("#copyright").infos(); |
---|
[7725] | 883 | if (pos != jQuery("#copyright").infos()) |
---|
| 884 | pos = jQuery("#copyright").infos(); |
---|
[7873] | 885 | if (!theme.match(RegExp("stripped", "gi"))) { |
---|
| 886 | if (pos.top > 100) |
---|
| 887 | |
---|
| 888 | jQuery("#the_page").height(pos.top); |
---|
| 889 | } |
---|
| 890 | |
---|
[7867] | 891 | if (!theme.match(RegExp("luciano", "gi"))) { |
---|
| 892 | jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" }); |
---|
| 893 | jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" }); |
---|
| 894 | jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); |
---|
[7821] | 895 | } |
---|
[8006] | 896 | info_frame = jQuery(Cadre).infos(); |
---|
[7962] | 897 | |
---|
[7872] | 898 | if (DEBUG == "true") { |
---|
[7962] | 899 | if (theme.match(RegExp("stripped", "gi"))) { |
---|
| 900 | pos = "absolute"; |
---|
| 901 | t1 = info_imageInfoBar.bottom; |
---|
| 902 | l1 = info_imageInfoBar.left; |
---|
| 903 | } else { |
---|
| 904 | pos = "absolute"; |
---|
| 905 | t1 = info_frame.top; |
---|
| 906 | l1 = info_frame.left; |
---|
| 907 | } |
---|
| 908 | // jQuery(Cadre).css("border", "solid green"); |
---|
[8536] | 909 | margins = info_frame.margin.margin; |
---|
[7874] | 910 | jQuery("#Debug5").css({ background: "transparent", |
---|
[7962] | 911 | position: pos, |
---|
[8006] | 912 | border: "green solid 2px", |
---|
[7962] | 913 | textAlign: align_auto, |
---|
[8536] | 914 | margin: margins, |
---|
[7962] | 915 | top: t1 + "px", |
---|
| 916 | left: l1 + "px", |
---|
[7874] | 917 | width: info_frame.width + "px", |
---|
| 918 | height: info_frame.height + "px" |
---|
[7875] | 919 | }); //red |
---|
[7872] | 920 | jQuery("#Debug4").css({ top: info_frame.bottom - info_description.height + "px" }); //green |
---|
| 921 | } |
---|
[7740] | 922 | |
---|
[8735] | 923 | Wait_Affichage(); |
---|
| 924 | |
---|
[7867] | 925 | return true; |
---|
[7702] | 926 | |
---|
[7740] | 927 | |
---|
| 928 | |
---|
[7867] | 929 | |
---|
| 930 | |
---|
[7805] | 931 | //_____________________________________________________ |
---|
| 932 | } // Resize(); |
---|
[7702] | 933 | |
---|
| 934 | |
---|
[7805] | 935 | //====================================================================== |
---|
[7702] | 936 | |
---|
| 937 | |
---|
[7725] | 938 | }); // fin extend |
---|
[7702] | 939 | |
---|
[7867] | 940 | |
---|
| 941 | |
---|
[7725] | 942 | } // function |
---|
[7805] | 943 | ); |
---|
[7316] | 944 | |
---|
[7867] | 945 | |
---|
| 946 | /* |
---|
| 947 | * recherche la plus grande image (hauteur ou largeur) |
---|
| 948 | */ |
---|
| 949 | function Get_Img_Maxi(myobj) { |
---|
| 950 | var w00 = 0; |
---|
| 951 | var myImg = null; |
---|
| 952 | jQuery(myobj).each(function (i) { |
---|
| 953 | w0 = img_reelle.width; |
---|
| 954 | h0 = img_reelle.height; |
---|
| 955 | if (h0 > w0) w0 = h0; |
---|
| 956 | if (w0 > w00) { |
---|
| 957 | if (!this.src.match(RegExp(".png", "g"))) |
---|
| 958 | if (!this.src.match(RegExp(thumbnail, "g"))) { |
---|
| 959 | myImg = this; |
---|
| 960 | w00 = w0; |
---|
| 961 | } |
---|
| 962 | |
---|
| 963 | } |
---|
| 964 | }); |
---|
| 965 | return myImg; |
---|
| 966 | } |
---|
| 967 | |
---|
| 968 | //============================================================ |
---|
| 969 | /* |
---|
| 970 | * |
---|
| 971 | */ |
---|
[8729] | 972 | |
---|
[7867] | 973 | function Info_entete(Parent) { |
---|
[7962] | 974 | if (typeof (marge_top) != "undefined") return result; |
---|
[7867] | 975 | info_imageToolBar = jQuery("#imageToolBar").infos(); |
---|
| 976 | if (info_imageToolBar.position == "absolute") { |
---|
| 977 | jQuery("#imageToolBar").css("position", "relative"); |
---|
| 978 | jQuery("#imageToolBar").css("top", 0 + "px"); |
---|
| 979 | } |
---|
[7962] | 980 | optiontop = 0; |
---|
| 981 | |
---|
| 982 | info_imageInfoBar = jQuery("#imageInfoBar").infos(); |
---|
[7867] | 983 | |
---|
[7962] | 984 | |
---|
| 985 | info_theImgContainer = jQuery("#"+ "theImgContainer").infos(); |
---|
[7872] | 986 | info_theImage = jQuery(Parent).infos(); |
---|
[7962] | 987 | info_thePicturePage = jQuery("#thePicturePage").infos(); |
---|
[8006] | 988 | if ( theme.match(RegExp("stripped", "gi"))) |
---|
| 989 | { |
---|
| 990 | optiontop = info_imageInfoBar.bottom + llgboframe.top; |
---|
| 991 | } |
---|
[7867] | 992 | |
---|
[7962] | 993 | if (info_theImage.position == "relative") { |
---|
| 994 | //--- passage relative ==> static ===/ |
---|
| 995 | jQuery(Parent).css("position", "static"); |
---|
| 996 | info_theImage = jQuery(Parent).infos(); |
---|
[7867] | 997 | |
---|
[7962] | 998 | } else { |
---|
[8006] | 999 | |
---|
[7962] | 1000 | } |
---|
[7867] | 1001 | if (info_theImage.position == "absolute") { |
---|
| 1002 | //--- passage absolute ==> static ===/ |
---|
[7872] | 1003 | jQuery(Parent).css("position", "static"); |
---|
| 1004 | info_theImage = jQuery(Parent).infos(); |
---|
[7867] | 1005 | |
---|
| 1006 | } |
---|
| 1007 | |
---|
| 1008 | marge_top = Math.ceil(Info_the_page.top + |
---|
| 1009 | Info_the_page.borderwidth.top + |
---|
[7962] | 1010 | info_theImage.borderwidth.top + |
---|
| 1011 | info_thePicturePage.margin.top |
---|
| 1012 | ); |
---|
[7867] | 1013 | |
---|
[8006] | 1014 | img_top = Math.ceil(info_theImage.top + |
---|
| 1015 | info_theImage.borderwidth.top + |
---|
| 1016 | info_thePicturePage.margin.top + optiontop); |
---|
| 1017 | result = info_imageToolBar; |
---|
| 1018 | result.width = "20%"; |
---|
| 1019 | result.left = "40%"; |
---|
| 1020 | result.marge_top = marge_top; |
---|
| 1021 | result.img_top = img_top; |
---|
| 1022 | //=== Afficher le titre de l'image sur le cadre === |
---|
| 1023 | llgboh2 = jQuery("#gboh2").infos(); |
---|
[8007] | 1024 | result.img_top += llgboh2.height ; |
---|
[7867] | 1025 | return result; |
---|
| 1026 | |
---|
| 1027 | } |
---|
| 1028 | |
---|
| 1029 | /* Récupère les informations sur la description. |
---|
| 1030 | * |
---|
| 1031 | */ |
---|
| 1032 | |
---|
| 1033 | //==================================================== |
---|
| 1034 | function Info_description(Parent) { |
---|
| 1035 | |
---|
[7872] | 1036 | // jQuery(Parent + " p:not(:contains(' ')) ").remove(); |
---|
[7867] | 1037 | //============================================================================= |
---|
| 1038 | info_description = { top: 0, bottom: 0, height: 0 }; |
---|
| 1039 | |
---|
[8729] | 1040 | jQuery(Parent).css({ display: "block" }); |
---|
[7867] | 1041 | //====== détection du type d'images ====== |
---|
| 1042 | if (jQuery("#charlie").length > 0) { |
---|
| 1043 | Type_Img = "charlie"; |
---|
| 1044 | } else if (jQuery("#pamoorama").length) { |
---|
| 1045 | Type_Img = "pamoorama"; |
---|
[7872] | 1046 | } else if (jQuery(Parent +" embed").length > 0) { |
---|
[7867] | 1047 | Type_Img = "embed"; |
---|
| 1048 | } else if (jQuery("#map").length) { |
---|
| 1049 | Type_Img = "map"; |
---|
| 1050 | |
---|
| 1051 | } else if (jQuery("#Panorama").length) { |
---|
| 1052 | Type_Img = "panorama"; |
---|
[7872] | 1053 | } else if (jQuery(Parent).find("img").length > 0) { |
---|
[7867] | 1054 | Type_Img = "img"; |
---|
[7872] | 1055 | } else if (jQuery(Parent+"Box").find("img").length > 0) { |
---|
| 1056 | Type_Img = "img"; |
---|
| 1057 | Parent = Parent + "Box"; |
---|
[7867] | 1058 | } else if (jQuery("img").length > 0) { |
---|
| 1059 | Type_Img = "img_autre"; |
---|
| 1060 | return; |
---|
| 1061 | } else { |
---|
| 1062 | return; |
---|
| 1063 | } |
---|
| 1064 | |
---|
| 1065 | |
---|
[7962] | 1066 | |
---|
[8006] | 1067 | llgboframe = jQuery("#gbo").infos(); |
---|
[7867] | 1068 | marges_llgbo = 0; |
---|
| 1069 | //========================================================= |
---|
| 1070 | |
---|
[8006] | 1071 | if (llgboframe.height > 0) { |
---|
| 1072 | |
---|
[7962] | 1073 | ll1 = jQuery("#gbo div:first").infos(); |
---|
[8006] | 1074 | ll2 = jQuery("#gbo div:last").infos(); ; |
---|
| 1075 | ll1 = ll1.width; |
---|
| 1076 | ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right; |
---|
| 1077 | marges_llgbo = (ll1 - ll2) ; |
---|
| 1078 | |
---|
[7867] | 1079 | } |
---|
[8006] | 1080 | |
---|
[7867] | 1081 | |
---|
[7962] | 1082 | Bandeau_t = Info_entete(Parent) |
---|
| 1083 | Bandeau = Bandeau_t.img_top; |
---|
[7867] | 1084 | |
---|
| 1085 | if (theme.match(RegExp("simple", "gi"))) { |
---|
[7872] | 1086 | jQuery(Parent).css({ padding: "0px", |
---|
[7867] | 1087 | marginLeft: "0px", |
---|
| 1088 | marginRight: "auto", |
---|
| 1089 | marginTop: "0px", |
---|
| 1090 | marginBottom: "0px" |
---|
| 1091 | |
---|
| 1092 | }); |
---|
| 1093 | } else { |
---|
| 1094 | |
---|
| 1095 | |
---|
| 1096 | |
---|
| 1097 | } |
---|
| 1098 | |
---|
[7872] | 1099 | // jQuery(Parent + " p").css({ padding: "0px", margin: "0px " }); |
---|
[7867] | 1100 | if (theme.match(RegExp("luciano", "g"))) { |
---|
[7872] | 1101 | TheImg = jQuery(Parent + " #theImg img"); |
---|
[8729] | 1102 | |
---|
[7867] | 1103 | info_img = jQuery(TheImg).infos(); |
---|
| 1104 | |
---|
| 1105 | |
---|
| 1106 | } else if (Type_Img == "map") { |
---|
| 1107 | |
---|
| 1108 | info_map = jQuery("#mapPicture").infos(); |
---|
| 1109 | marge_left = info_map.width; |
---|
| 1110 | |
---|
| 1111 | jQuery("#map").css({ left: marge_left + "px", padding: "0px", |
---|
| 1112 | marginLeft: "0px", |
---|
| 1113 | marginRight: "4px", |
---|
| 1114 | marginTop: "0px", |
---|
| 1115 | marginBottom: "0px", position: "relative" |
---|
| 1116 | }); |
---|
| 1117 | |
---|
| 1118 | TheImg = jQuery("#map"); |
---|
| 1119 | info_img = jQuery(TheImg).infos(); |
---|
| 1120 | |
---|
| 1121 | |
---|
| 1122 | } else if (jQuery("#charlie").length > 0) { |
---|
| 1123 | |
---|
| 1124 | jQuery("#charlie").css({ padding: "0px" |
---|
| 1125 | |
---|
| 1126 | }); |
---|
| 1127 | TheImg = jQuery("#charlie") |
---|
| 1128 | info_img = jQuery(TheImg).infos(); |
---|
| 1129 | |
---|
| 1130 | |
---|
| 1131 | |
---|
[7872] | 1132 | } else if (jQuery(Parent +" embed").length > 0) { |
---|
[7867] | 1133 | |
---|
[7872] | 1134 | TheImg = jQuery(Parent +" embed"); |
---|
[7867] | 1135 | info_img = jQuery(TheImg).infos(); |
---|
| 1136 | |
---|
| 1137 | |
---|
| 1138 | |
---|
| 1139 | } else if (Type_Img == "pamoorama") { |
---|
| 1140 | |
---|
| 1141 | |
---|
| 1142 | |
---|
| 1143 | if (!nopano) { |
---|
| 1144 | Wait_pamoorama(); |
---|
| 1145 | return |
---|
| 1146 | } |
---|
| 1147 | TheImg = jQuery("#pamoorama"); |
---|
| 1148 | info_img = jQuery(TheImg).infos(); |
---|
| 1149 | info_footer = jQuery("#pamoorama_footer").infos(); |
---|
| 1150 | info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height); |
---|
| 1151 | |
---|
| 1152 | } else { |
---|
[7872] | 1153 | TheImg = jQuery(Parent + " img"); |
---|
[7867] | 1154 | TheImg = Get_Img_Maxi(TheImg); |
---|
| 1155 | info_img = jQuery(TheImg).infos(); |
---|
| 1156 | } |
---|
| 1157 | //===================================================================================== |
---|
| 1158 | |
---|
| 1159 | switch (info_img.position) { |
---|
| 1160 | case "relative": |
---|
| 1161 | break; |
---|
| 1162 | case "static": |
---|
| 1163 | break; |
---|
| 1164 | case "absolute": |
---|
| 1165 | break; |
---|
| 1166 | case "": |
---|
| 1167 | break; |
---|
| 1168 | default: |
---|
| 1169 | break; |
---|
| 1170 | } |
---|
| 1171 | info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, |
---|
| 1172 | top: info_img.padding.top + info_img.borderwidth.top + info_img.margin.top |
---|
| 1173 | } |
---|
| 1174 | marges_ = info_img.margin.bottom + info_img.borderwidth.bottom; |
---|
| 1175 | |
---|
[8006] | 1176 | info_img.bottom += marges_ * 2; |
---|
| 1177 | info_img.bottom += marges_llgbo / 2; |
---|
| 1178 | info_img.bottom += info_description.marge.top + info_description.marge.bottom; |
---|
[7867] | 1179 | |
---|
| 1180 | info_img.right += marges_ * 2; |
---|
| 1181 | info_img.width += marges_ * 2; |
---|
| 1182 | info_img.height = info_img.bottom - info_img.top; |
---|
| 1183 | //====================================================================================== |
---|
| 1184 | info_description.top = info_img.bottom; |
---|
| 1185 | info_description.bottom = info_description.top; //init |
---|
| 1186 | |
---|
| 1187 | //===================== Recherche Description Bas ================================== |
---|
| 1188 | |
---|
| 1189 | info_para = info_description; |
---|
| 1190 | |
---|
| 1191 | |
---|
[7872] | 1192 | jQuery(Parent + " p").each(function (i) { |
---|
[7867] | 1193 | para = jQuery(this).infos(); |
---|
| 1194 | if (para.height > 0) { |
---|
| 1195 | if (para.top >= info_description.top) { |
---|
| 1196 | para.height = para.bottom - info_description.top; |
---|
| 1197 | info_para = para; |
---|
| 1198 | info_para.top = info_description.top; |
---|
| 1199 | |
---|
| 1200 | } |
---|
| 1201 | } |
---|
| 1202 | }); |
---|
| 1203 | //===================== Recherche lmt Bas =====(bleu debug3)==================== |
---|
[7872] | 1204 | info_licencetag = jQuery(Parent + ".licencetag").infos(); |
---|
[7867] | 1205 | jQuery(".licencetag").css("position", "static"); |
---|
| 1206 | |
---|
| 1207 | jQuery(".licencetag table").each(function (i) { |
---|
| 1208 | info_licencetag = jQuery(this).infos(); |
---|
| 1209 | info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom; |
---|
| 1210 | |
---|
| 1211 | if (jQuery.browser.msie == true) |
---|
| 1212 | jQuery(this).css("padding", "0px"); |
---|
| 1213 | jQuery(this).css("border", "solid 5px transparent"); |
---|
| 1214 | |
---|
| 1215 | }); |
---|
| 1216 | |
---|
| 1217 | if (info_licencetag.top == 0 && info_licencetag.height > 10) { |
---|
| 1218 | info_licencetag.top = info_para.bottom; |
---|
| 1219 | info_licencetag.bottom = info_para.bottom + info_licencetag.height; |
---|
| 1220 | info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom; |
---|
| 1221 | |
---|
| 1222 | } |
---|
| 1223 | |
---|
| 1224 | //======================================================== |
---|
[7872] | 1225 | info_table = jQuery(Parent + " Table").infos(); |
---|
[7867] | 1226 | if (info_table.height > 0) { |
---|
| 1227 | info_table.bottom += info_table.margin.top + info_table.margin.bottom; |
---|
| 1228 | info_licencetag.bottom = Math.max(info_table.bottom, info_licencetag.bottom) |
---|
| 1229 | info_licencetag.top = info_table.top; |
---|
| 1230 | info_licencetag.bottom = info_table.bottom; |
---|
| 1231 | info_licencetag.height = info_table.height; |
---|
| 1232 | } |
---|
| 1233 | info_description.top = info_img.bottom; |
---|
| 1234 | |
---|
| 1235 | info_description.height = Math.max(info_para.bottom, info_licencetag.bottom) - info_description.top; |
---|
| 1236 | |
---|
| 1237 | |
---|
| 1238 | info_description.bottom = info_description.bottom + info_description.height; |
---|
| 1239 | //============================================================================= |
---|
| 1240 | if (theme.match(RegExp("gally", "gi"))) { |
---|
| 1241 | if (!theme.match(RegExp("lapis", "gi"))) { |
---|
| 1242 | info_description.bottom = info_description.bottom |
---|
| 1243 | } |
---|
| 1244 | } |
---|
| 1245 | |
---|
| 1246 | |
---|
| 1247 | |
---|
| 1248 | info_description.height = info_description.bottom - info_description.top; |
---|
| 1249 | |
---|
| 1250 | |
---|
| 1251 | |
---|
| 1252 | if (theme.match(RegExp("gally", "g"))) { |
---|
| 1253 | if (!theme.match(RegExp("lapis", "gi"))) { |
---|
| 1254 | info_copyright = jQuery("#copyright").infos(); |
---|
| 1255 | info_description.bottom += info_copyright.height; |
---|
| 1256 | } |
---|
| 1257 | } |
---|
| 1258 | |
---|
| 1259 | if (theme.match(RegExp("luciano", "g"))) { |
---|
[8729] | 1260 | info_description.bottom -= 0; |
---|
| 1261 | |
---|
| 1262 | |
---|
| 1263 | correction = -30; |
---|
| 1264 | Info_slidshowToolBar = jQuery("#slidshowToolBar").infos(); |
---|
| 1265 | |
---|
| 1266 | if (Info_slidshowToolBar.height > 0) { |
---|
| 1267 | correction -= (Info_slidshowToolBar.height); |
---|
| 1268 | info_description.top -= 90; |
---|
| 1269 | |
---|
| 1270 | } |
---|
| 1271 | |
---|
| 1272 | |
---|
| 1273 | |
---|
| 1274 | //========================================================= |
---|
[7867] | 1275 | } |
---|
| 1276 | |
---|
| 1277 | |
---|
| 1278 | if (jQuery.browser.msie != true) |
---|
| 1279 | info_description.bottom += 4; |
---|
| 1280 | |
---|
| 1281 | |
---|
| 1282 | |
---|
| 1283 | info_description.height = info_description.bottom - info_description.top; |
---|
| 1284 | if (check_desc_v != 'checked="checked"') { |
---|
| 1285 | info_description.height = 0; |
---|
| 1286 | } |
---|
| 1287 | Debug_pos(); |
---|
| 1288 | return info_description; |
---|
| 1289 | } |
---|
| 1290 | |
---|
| 1291 | //==================================================== |
---|
| 1292 | function Debug_info(index,infos,nom) { |
---|
| 1293 | if (DEBUG != "true") return ; |
---|
| 1294 | if(infos.height>0){ |
---|
| 1295 | |
---|
| 1296 | message = browser.browser + " -- > Info : "+ nom +" " + infos.id +"\n"+ |
---|
| 1297 | "Info nodeName: " + infos.nodeName +"\n"+ |
---|
| 1298 | "Info width: " + infos.width +"\n"+ |
---|
| 1299 | "Info height: " + infos.height +"\n"+ |
---|
| 1300 | "Info top: " + infos.top +"\n"+ |
---|
| 1301 | "Info left: " + infos.left +"\n"+ |
---|
| 1302 | "Info position: " + infos.position +"\n"; |
---|
| 1303 | |
---|
| 1304 | myDebug = { id: "Debug" + index, texte: message, |
---|
| 1305 | css: { |
---|
| 1306 | color:"black", |
---|
[7872] | 1307 | opacity: "0.5", |
---|
[7867] | 1308 | position: "absolute", |
---|
| 1309 | height: infos.height||100 +"px", |
---|
| 1310 | width: infos.width||300 +"px", |
---|
| 1311 | left: infos.left||0 +"px", |
---|
| 1312 | border: "solid 1px green", |
---|
| 1313 | top: infos.top + "px" |
---|
| 1314 | |
---|
| 1315 | } |
---|
| 1316 | } |
---|
| 1317 | return myDebug; |
---|
| 1318 | }else{ |
---|
| 1319 | return null ; |
---|
| 1320 | } |
---|
| 1321 | |
---|
| 1322 | |
---|
| 1323 | } |
---|
| 1324 | //==================================================== |
---|
| 1325 | function Debug_pos() { |
---|
| 1326 | if (DEBUG == "true") { |
---|
| 1327 | |
---|
| 1328 | jQuery("[id ^='Debug']").show(); |
---|
| 1329 | /* |
---|
| 1330 | Debug2 background-color:yellow |
---|
| 1331 | Debug3 background-color:blue |
---|
| 1332 | Debug4 background-color:green |
---|
| 1333 | Debug5 background-color:red |
---|
| 1334 | |
---|
| 1335 | */ |
---|
| 1336 | |
---|
| 1337 | affiche_debug({ |
---|
| 1338 | Debug1: Debug_info(1, Bandeau_t,"Bandeau_t"), |
---|
| 1339 | Debug3: Debug_info(3, info_licencetag, "info_licencetag"), |
---|
| 1340 | Debug4: Debug_info(4, info_description, "info_description"), |
---|
| 1341 | Debug5: Debug_info(5, info_img, "info_img") |
---|
| 1342 | }); |
---|
| 1343 | } |
---|
| 1344 | } |
---|
| 1345 | |
---|
| 1346 | function affiche_debug(aff_infos) { |
---|
| 1347 | jQuery(jQuery("[id ^='Debug']")).each(function (i) { |
---|
| 1348 | if (aff_infos[this.id]) { |
---|
| 1349 | if (aff_infos[this.id].css) { |
---|
| 1350 | jQuery("#" + this.id).css(aff_infos[this.id].css); |
---|
| 1351 | jQuery("#" + this.id).text(aff_infos[this.id].texte); |
---|
| 1352 | } |
---|
| 1353 | } |
---|
| 1354 | }); |
---|
| 1355 | return; |
---|
| 1356 | |
---|
| 1357 | } |
---|
| 1358 | |
---|
| 1359 | |
---|
[8070] | 1360 | jQuery(function () { |
---|
[7867] | 1361 | jQuery('#pamoorama').live('ON', function (e) { |
---|
| 1362 | jQuery(jQuery('.debug').get(1)).trigger('ON'); |
---|
[7872] | 1363 | Bandeau_bas = Info_description(Parent); |
---|
[7867] | 1364 | Bandeau = Bandeau_bas.top; |
---|
[7884] | 1365 | old_window = { width: 0, height: 0 }; |
---|
| 1366 | Wait_Affichage(); |
---|
[7867] | 1367 | }); |
---|
[8729] | 1368 | jQuery(Parent).live('ON', function (e) { |
---|
| 1369 | jQuery(jQuery('.debug').get(1)).trigger('ON'); |
---|
| 1370 | Wait_Affichage(); |
---|
| 1371 | }); |
---|
[7867] | 1372 | |
---|
| 1373 | // Custom Event, ON to turn on a debug. |
---|
| 1374 | jQuery('.debug').live('ON', function (e) { |
---|
[8070] | 1375 | |
---|
[7867] | 1376 | jQuery('.debug').trigger('OFF'); |
---|
| 1377 | jQuery(this).addClass('debugOn'); |
---|
| 1378 | }); |
---|
| 1379 | |
---|
| 1380 | // On Click = debugs On |
---|
| 1381 | jQuery('.debug').live('click', function (e) { |
---|
[8070] | 1382 | |
---|
[7867] | 1383 | jQuery(this).trigger('ON'); |
---|
| 1384 | }); |
---|
| 1385 | |
---|
| 1386 | // Custom Event, Turn off a debug |
---|
| 1387 | jQuery('.debug').live('OFF', function (e) { |
---|
[8070] | 1388 | |
---|
[7867] | 1389 | jQuery(this).removeClass('debugOn'); |
---|
| 1390 | }); |
---|
| 1391 | |
---|
| 1392 | // on Double Click, remove the debug from the DOM |
---|
| 1393 | jQuery('.debug').live('dblclick', function () { |
---|
[8070] | 1394 | |
---|
[7867] | 1395 | jQuery(this).fadeOut(function () { $(this).remove() }); |
---|
| 1396 | }); |
---|
| 1397 | |
---|
| 1398 | // Add another debug to the DOM |
---|
| 1399 | jQuery('#adddebugs').click(function () { |
---|
| 1400 | jQuery('<div></div>') |
---|
| 1401 | .addClass('debug') |
---|
| 1402 | .appendTo('#debugsContainer'); |
---|
| 1403 | }); |
---|
| 1404 | |
---|
| 1405 | // Add 10 testing debugs to start with |
---|
[8057] | 1406 | jQuery(window).load(function () { |
---|
[8070] | 1407 | if (DEBUG == "true") { |
---|
| 1408 | for (var i = 0; i < 10; i++) { |
---|
| 1409 | jQuery('#adddebugs').click(); |
---|
| 1410 | } |
---|
| 1411 | jQuery(jQuery('.debug').get(8)).click(); |
---|
| 1412 | |
---|
[7867] | 1413 | } |
---|
[8070] | 1414 | }); //on load |
---|
[7867] | 1415 | }); |
---|