Changeset 22191
- Timestamp:
- Apr 13, 2013, 4:53:32 PM (11 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r22133 r22191 39 39 global $defined_types,$pictureSelType,$pictureMap ,$pictureDeriv ,$liste_type,$SRC_IMG; 40 40 global $autosize_parametres,$user_status; 41 global $infos_message,$error_message;42 41 //============================================================================== 43 global $DEBUG_autosize ;42 global $DEBUG_autosize,$infos_message,$error_message; 44 43 if(preg_match("|event|", $DEBUG_autosize, $val)) $infos_message = "autosize_calcContent, " ; 44 if(!realpath($element_info['path'])) return $content; 45 45 46 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 46 47 if ($ma_page !='thePicturePage') return ; … … 93 94 *********************/ 94 95 static public function init_3(){ 96 global $DEBUG_autosize,$infos_message,$error_message; 97 if(preg_match("|event|", $DEBUG_autosize, $val)) $infos_message .= "init_3, " ; 95 98 96 99 } … … 98 101 { 99 102 global $conf, $template, $page; 103 global $DEBUG_autosize,$infos_message,$error_message; 104 if(!realpath($image['path'])) return $content; 105 if(preg_match("|event|", $DEBUG_autosize, $val)) $infos_message .= "init_1, " ; 100 106 if(!isset($conf['AS_panorama'])) return $content; 101 if( !is_array($conf['AS_panorama']) ){ 102 return $content; 103 } 107 if( !is_array($conf['AS_panorama']) ) return $content; 104 108 $asp = & $conf['AS_panorama']; 105 109 if(!isset($asp['in_mode_360'])) $asp['in_mode_360']=""; 106 110 if(!isset($asp['in_mode_180'])) $asp['in_mode_180']=""; 107 108 111 if ( !stristr($image['name'], $asp['in_mode_360']) and !stristr($image['name'], $asp['in_mode_180']) ) return $content; 109 110 112 $asp['min_viewport_width']=$_COOKIE['windowWidth'] -$_COOKIE['theImageLeft']-$_COOKIE['theImageRight']; 111 113 $asp['viewport_height']=$_COOKIE['windowHeight']-130 ; 112 113 114 $asp['start_position']= 10; 114 115 115 } 116 116 /*********************/ … … 119 119 global $user,$Css,$css_slideshow,$css_display,$liste_type; 120 120 global $has_pamoorama,$pictureSelType,$pictureDeriv,$pictureMap; 121 global $ infos_message,$warnings_message;122 123 global $set_miniature,$imgSizeWH ,$DEBUG_autosize;121 global $warnings_message; 122 123 global $set_miniature,$imgSizeWH; 124 124 global $theImageHeight,$theImageWidth,$theImageLeft,$theImageTop,$windowWidth,$windowHeight,$theMainImageSize; 125 125 //======================================================= 126 global $has_pamoorama, $DEBUG_autosize ; 127 128 if(preg_match("|event|", $DEBUG_autosize, $val)) { 129 $infos_message .= "init, "; 130 } ; 126 global $has_pamoorama ; 127 global $DEBUG_autosize,$infos_message,$error_message; 128 if(!realpath($element_info['path'])) return $content; 129 if(preg_match("|event|", $DEBUG_autosize, $val)) $infos_message .= "init, " ; 131 130 132 131 $has_pamoorama = isset($template->files['pamooramics_content'])?"true":"false"; … … 194 193 if(preg_match("|test|", $DEBUG_autosize, $val)) { 195 194 $infos_message .= "#208 <br>Init:SESSION:" . cl_print_var($_SESSION) ; 196 195 197 196 if ( isset($_COOKIE['pwg_id']) ) unset ($_COOKIE['pwg_id']) ; 198 197 $infos_message .= "Init: COOKIE:" . cl_print_var($_COOKIE) ; … … 210 209 if(preg_match("|c1|", $DEBUG_autosize, $val)) { 211 210 echo "<!-- " . $theImageWidth . "x" . $theImageHeight . " " .cl_print_var($content) ." -->"; 212 self::Fin_php("#21 2: " . $DEBUG_autosize);211 self::Fin_php("#211: " . $DEBUG_autosize); 213 212 } 214 213 return $content; … … 260 259 *************************/ 261 260 static public function init2($content,$element_info){ 262 263 264 261 global $template,$version,$icon_path,$page,$picture,$conf; 265 262 global $user,$Css,$css_slideshow,$css_display,$liste_type; … … 270 267 global $has_pamoorama,$pictureSelType,$pictureDeriv; 271 268 global $DEBUG_autosize; 272 if(preg_match("|event|", $DEBUG_autosize, $val)) { 273 $infos_message .= "init2, "; 274 } ; 269 if(preg_match("|event|", $DEBUG_autosize, $val)) $infos_message .= "init2, "; 270 if(!realpath($element_info['path'])) return $content; 275 271 global $theImageHeight,$theImageWidth,$theImageLeft,$theImageTop,$windowWidth,$windowHeight,$theMainImageSize; 276 272 //-- si Autosize correction redim --------------- … … 307 303 echo "left:".$theImageLeft."px;top:".$theImageTop."px;width:".$theImageWidth ."px;height:" .$theImageHeight."px;"; 308 304 echo "<div style='position:absolute;left:".$theImageLeft."px;top:".$theImageTop."px;width:".$theImageWidth ."px;height:" . $theImageHeight."px;background-color:green;'>"; 309 self::Fin_php("#30 9: " . $content + $DEBUG_autosize);305 self::Fin_php("#305 : " . $content + $DEBUG_autosize); 310 306 311 307 } //INIT2 … … 320 316 global $conf; 321 317 $set_miniature = "<!DOCTYPE html><html><head> 322 <meta http-equiv='content-type' content='text/html; charset=UTF-8'/> 323 <script type='text/javascript' src='themes/default/js/jquery.min.js'></script> 324 <script type='text/javascript' src='plugins/Autosize/js/autosizeDetect.js'></script> 325 <script type='text/javascript' src='plugins/Autosize/js/autosize.cookie.js'></script> 326 <script type='text/javascript' src='themes/default/js/plugins/jquery.ajaxmanager.js'></script>"; $set_miniature .= "<script type='text/javascript' src='plugins/Autosize/js/autosize_ajax.js' id='autosize_ajax' > </script >"; 318 <meta http-equiv='content-type' content='text/html; charset=UTF-8'/> 319 <script type='text/javascript' src='themes/default/js/jquery.min.js'></script> 320 <script type='text/javascript' src='plugins/Autosize/js/autosizeDetect.js'></script> 321 <script type='text/javascript' src='plugins/Autosize/js/autosize.cookie.js'></script> 322 <script type='text/javascript' src='themes/default/js/plugins/jquery.ajaxmanager.js'></script>"; 323 $set_miniature .= "<script type='text/javascript' src='plugins/Autosize/js/autosize_ajax.js' id='autosize_ajax' > </script >"; 327 324 $set_var = "<script type='text/javascript'>\n var COOKIE_PATH = '".cookie_path()."';\n"; 328 325 if(preg_match("|noreload|", $DEBUG_autosize, $val)) { … … 370 367 echo "INIT <pre>"; 371 368 print_r($_COOKIE); 372 self::Fin_php("#3 72: No COOKIE['picture_deriv'] ".$DEBUG_autosize);369 self::Fin_php("#369: No COOKIE['picture_deriv'] ".$DEBUG_autosize); 373 370 } 374 371 … … 380 377 echo "GET:" . cl_print_var($_GET) ; 381 378 echo "POST:" . cl_print_var($_POST) ; 382 self::Fin_php("#3 82: ".$DEBUG_autosize);379 self::Fin_php("#379: ".$DEBUG_autosize); 383 380 } 384 381 … … 391 388 echo $autoscript; 392 389 if (!isset($_COOKIE['autosize_reload']) ){ 393 self::Fin_php("#393: Initialisation ".$DEBUG_autosize); 394 } 395 // 396 390 self::Fin_php("#390: Initialisation ".$DEBUG_autosize); 391 } 397 392 } 398 393 … … 452 447 ); 453 448 if( preg_match("|c2|", $DEBUG_autosize, $val) ){ 454 self::Fin_php( "4 54: " . $DEBUG_autosize);449 self::Fin_php( "449: " . $DEBUG_autosize); 455 450 return $content ; 456 451 … … 517 512 if ($ma_page !='thePicturePage') return ; 518 513 519 514 520 515 $template->func_combine_script(array('id'=>'my_script_2', 521 516 'path'=> AUTOSIZE_PATH.'js/JScript.js', … … 540 535 $template->append('footer_elements',$autoscript); 541 536 542 537 543 538 return ; 544 539 }// function cl_autosize_script_3 … … 578 573 if(count($set_miniatures)> 1 ) 579 574 $infos_message .= "PictureDeriv:" . $pictureDeriv. ' miniature:' . cl_print_var( $set_miniature); 580 575 581 576 }else { 582 577 … … 664 659 $template->parse('mes_script'); 665 660 } 666 661 667 662 668 663 if(preg_match("|vue_cookies|", $DEBUG_autosize, $val)) { … … 679 674 $infos_message .= "<br />SelType:" . $pictureSelType."; pictureDeriv:".$pictureDeriv ."; pictureMap:".$pictureMap; 680 675 681 self::Fin_php("#6 81: ".$DEBUG_autosize);676 self::Fin_php("#676: ".$DEBUG_autosize); 682 677 } 683 678 cl_aff_infos_plus(); … … 847 842 } 848 843 849 844 850 845 return $css; 851 846 } … … 872 867 $i++; 873 868 } 874 869 875 870 } 876 871 ; … … 920 915 if(file_exists(PHPWG_ROOT_PATH.$img_url)){ 921 916 } // if file 922 917 923 918 if ($theImage_def==0){ 924 919 // Avant Autosize ou Original; … … 976 971 else 977 972 $maxi_image = $img_select; 978 973 979 974 $maxi_image->url = $maxi_image->get_path(); 980 975 … … 986 981 $mini_image->url = $mini_image->get_path(); 987 982 } 988 983 989 984 } // for 990 985 //================================================ … … 993 988 $imgSizeWH = $img_select->src_image->get_size(); 994 989 $liste_type["Original"]="Original".",".$img_url.",".$imgSizeWH[0] .",".$imgSizeWH[1] ; 995 990 996 991 997 992 $retour=(object)'' ; … … 1063 1058 if(!file_exists(PHPWG_ROOT_PATH.$img_url)){ 1064 1059 $img_type = $img_select->get_type(); 1065 1060 1066 1061 $file_id=explode("?",$img_url); 1067 1062 if(count($file_id) ==1){ … … 1076 1071 array_push($nofiles,serialize($file_no)) ; 1077 1072 if( $img_type == $pictureDeriv){ 1078 1073 1079 1074 break ; 1080 1075 } … … 1120 1115 ****************************/ 1121 1116 static public function get_cookies(){ 1122 global $pictureDeriv,$pictureSelType,$pictureDeriv,$pictureMap ;1117 global $pictureDeriv,$pictureSelType,$pictureDeriv,$pictureMap,$DEBUG_autosize; 1123 1118 if(!isset($_COOKIE['picture_deriv'])){ 1124 1119 $pictureDeriv= pwg_get_session_var('picture_deriv'); … … 1133 1128 $_COOKIE['picture_deriv']=$pictureDeriv; 1134 1129 $_COOKIE['picture_map']=$pictureMap; 1135 //================================================================1136 global $DEBUG_autosize;1137 if( isset($_GET['cl_debug']) && $_GET['cl_debug'] =='false') {1138 $DEBUG_autosize="";1139 }else{1140 $DEBUG_autosize = isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "" ;1141 $DEBUG_autosize = isset($_GET['cl_debug']) ? $_GET['cl_debug'] : $DEBUG_autosize ;1142 $DEBUG_autosize = isset($conf['cl_debug']) ? $conf['cl_debug']."," . $DEBUG_autosize : $DEBUG_autosize ;1143 //===============================================================1144 }1145 1130 if(!isset($_COOKIE['picture_deriv'] )){ 1146 1131 if(preg_match("|test_1|", $DEBUG_autosize, $val)) { 1147 1132 $infos_message .= "not COOKIE['picture_deriv'] -> reload(): <br>"; 1148 self::Fin_php("#11 48autosize_calcContent:" . $DEBUG_autosize );1133 self::Fin_php("#1133 autosize_calcContent:" . $DEBUG_autosize ); 1149 1134 } 1150 1135 unset($_COOKIE['autosize_reload']); … … 1153 1138 if(preg_match("|test_2|", $DEBUG_autosize, $val)) { 1154 1139 $infos_message .= "not COOKIE['autosize_reload'] -> reload(): <br>"; 1155 self::Fin_php("#11 55autosize_calcContent:" . $DEBUG_autosize);1156 } 1157 self::reload("#11 57");1140 self::Fin_php("#1140 autosize_calcContent:" . $DEBUG_autosize); 1141 } 1142 self::reload("#1142"); 1158 1143 } 1159 1144 } -
extensions/Autosize/js/Affiche_script.js
r22133 r22191 3 3 //============================================================== 4 4 jQuery.Affiche_script = { version: '2.0.0' }; 5 /******************************************** 6 *document ready7 5 /*************************************************************************** 6 * document ready 7 **************************************************************************/ 8 8 jQuery(document).ready(function (jQuery) { 9 var Type_Img; 10 var theImg; 11 var Zone_image; 12 13 /****************************************** 9 var Type_Img = ""; 10 var theImg = ""; 11 var Zone_image = ""; 12 var OptionsCookie = jQuery.extend({}, { path: '/', expires: 1 }); 13 14 /*************************************************************************** 14 15 * test_theme("mont,pur") ... 15 ******************************************/ 16 16 **************************************************************************/ 17 17 test_theme = function (param) { 18 18 if (!param) return 19 19 if (!options.theme) return; 20 21 20 regx = new RegExp(param, "gi"); 22 return (options.theme.match(regx)) 23 24 } 25 /****************************************** 21 return (options.theme.match(regx)); 22 }; 23 /*************************************************************************** 26 24 * Save_cookies 27 ****************************************** /25 **************************************************************************/ 28 26 Save_cookies = function (parametres) { 29 27 parametres.windowHeight = jQuery(window).height(); 30 28 parametres.windowWidth = jQuery(window).width(); 31 29 try { 32 if (parametres.pictureDeriv) jQuery.cookie('picture_deriv', parametres.pictureDeriv, { path: COOKIE_PATH });33 if (parametres.pictureSelType) jQuery.cookie('picture_sel_type', parametres.pictureSelType, { path: COOKIE_PATH });34 if (parametres.pictureMap) jQuery.cookie('picture_map', parametres.pictureMap, { path: COOKIE_PATH });35 if (parametres.imgSrc) jQuery.cookie('img_src', parametres.imgSrc, { path: COOKIE_PATH });36 if (parametres.theMainImageHeight) jQuery.cookie('theMainImageHeight', parametres.theMainImageHeight, { path: COOKIE_PATH });37 if (parametres.theMainImageWidth) jQuery.cookie('theMainImageWidth', parametres.theMainImageWidth, { path: COOKIE_PATH });38 if (parametres.theImageHeight) jQuery.cookie('theImageHeight', parametres.theImageHeight, { path: COOKIE_PATH });39 if (parametres.theImageWidth) jQuery.cookie('theImageWidth', parametres.theImageWidth, { path: COOKIE_PATH });40 if (parametres.windowHeight) jQuery.cookie('windowHeight', parametres.windowHeight, { path: COOKIE_PATH });41 if (parametres.windowWidth) jQuery.cookie('windowWidth', parametres.windowWidth, { path: COOKIE_PATH });42 if (parametres.theImageTop) jQuery.cookie('theImageTop', parametres.theImageTop, { path: COOKIE_PATH });43 if (parametres.theImageLeft) jQuery.cookie('theImageLeft', parametres.theImageLeft, { path: COOKIE_PATH });44 if (parametres.theImageRight) jQuery.cookie('theImageRight', parametres.theImageRight, { path: COOKIE_PATH });45 if (parametres.theImageBottom) jQuery.cookie('theImageBottom', parametres.theImageBottom, { path: COOKIE_PATH });30 if (parametres.pictureDeriv) jQuery.cookie('picture_deriv', parametres.pictureDeriv, OptionsCookie); 31 if (parametres.pictureSelType) jQuery.cookie('picture_sel_type', parametres.pictureSelType, OptionsCookie); 32 if (parametres.pictureMap) jQuery.cookie('picture_map', parametres.pictureMap, OptionsCookie); 33 if (parametres.imgSrc) jQuery.cookie('img_src', parametres.imgSrc, OptionsCookie); 34 if (parametres.theMainImageHeight) jQuery.cookie('theMainImageHeight', parametres.theMainImageHeight, OptionsCookie); 35 if (parametres.theMainImageWidth) jQuery.cookie('theMainImageWidth', parametres.theMainImageWidth, OptionsCookie); 36 if (parametres.theImageHeight) jQuery.cookie('theImageHeight', parametres.theImageHeight, OptionsCookie); 37 if (parametres.theImageWidth) jQuery.cookie('theImageWidth', parametres.theImageWidth, OptionsCookie); 38 if (parametres.windowHeight) jQuery.cookie('windowHeight', parametres.windowHeight, OptionsCookie); 39 if (parametres.windowWidth) jQuery.cookie('windowWidth', parametres.windowWidth, OptionsCookie); 40 if (parametres.theImageTop) jQuery.cookie('theImageTop', parametres.theImageTop, OptionsCookie); 41 if (parametres.theImageLeft) jQuery.cookie('theImageLeft', parametres.theImageLeft, OptionsCookie); 42 if (parametres.theImageRight) jQuery.cookie('theImageRight', parametres.theImageRight, OptionsCookie); 43 if (parametres.theImageBottom) jQuery.cookie('theImageBottom', parametres.theImageBottom, OptionsCookie); 46 44 if (parametres.theImageMargeZone) { 47 jQuery.cookie('theImageMargeWidth', parametres.theImageMargeZone.width, { path: COOKIE_PATH });48 jQuery.cookie('theImageMargeHeight', parametres.theImageMargeZone.height, { path: COOKIE_PATH });45 jQuery.cookie('theImageMargeWidth', parametres.theImageMargeZone.width, OptionsCookie); 46 jQuery.cookie('theImageMargeHeight', parametres.theImageMargeZone.height, OptionsCookie); 49 47 } 50 48 } catch (e) { 51 49 n = 1; 52 } 53 54 55 } 56 //____________________ Save_cookies _____________________________ 57 /************************************************ 58 * Get COOKIE 59 *************************************************/ 50 }; 51 }; 52 // ____________________ Save_cookies _____________________________ 53 /*************************************************************************** 54 * Get COOKIE 55 **************************************************************************/ 60 56 Get_cookies = function () { 61 57 parametres = { … … 82 78 83 79 84 } 80 }; 85 81 return parametres; 86 } 87 //____________________ Get_cookies _____________________________ 88 89 90 91 /************************************************* 82 }; 83 // ____________________ Get_cookies _____________________________ 84 /*************************************************************************** 92 85 * Recupère le Type d'mage 93 ************************************************* /86 **************************************************************************/ 94 87 Get_type_img = function (e) { 95 //====== détection du type d'images ====== 96 88 // ====== détection du type d'images ====== 97 89 if (jQuery("#charlie").length > 0) { 98 90 Type_Img = "charlie"; … … 103 95 Type_Img = "pamoorama"; 104 96 options.valide = true; 105 106 97 infos_pamoorama = jQuery("#pamoorama").infos({ absolute: true }); 107 98 … … 127 118 frm1 = jQuery("#theImage" + " " + type_src).get(0); 128 119 Type_Img = "iframe"; 129 // 'fb - xfbml - like - button120 // 'fb - xfbml - like - button 130 121 objs = jQuery("#theImage" + " div").get(0); 131 122 if (jQuery(objs).length > 0) { … … 137 128 jQuery(frm1).attr("id", "charlie"); 138 129 } else { 139 // 130 // Type_Img = "img"; 140 131 } 141 132 } … … 156 147 } else { 157 148 return; 158 } 159 } 160 // ____________________ Get_type_img _____________________________161 162 // ====================================163 // 164 // ====================================149 }; 150 }; 151 // ____________________ Get_type_img _____________________________ 152 153 // ==================================== 154 // set_cl 155 // ==================================== 165 156 set_cl = function (Valid) { 166 167 157 if (typeof Valid == "undefined") Valid = options.pictureSelType.match(RegExp("Autosize", "gi")) || false; 168 158 if (typeof options.cl_visible == "undefined") return; … … 170 160 if (options.cl_visible) src = src1; 171 161 else src = src2; 172 173 162 if (typeof options.pictureSelType != "undefined" && (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi")) { 174 163 if (options.pictureSelType == "SelMaxi") src = src6; … … 207 196 src_info = ""; 208 197 src = src2; 209 } 198 }; 210 199 211 200 jQuery('#bp_cla').attr('alt', src_info); … … 216 205 rap: jQuery("#theMainImage").width() / jQuery("#theMainImage").height(), 217 206 rap_init: Zone_image.image_init.rapport 218 } 207 }; 219 208 jQuery('#bp_cla span').text(zoom_cl); 220 209 color_back = jQuery('#imageToolBar').css("backgroundColor"); … … 249 238 jQuery('.auto_details').text(" (" + Zone_image.image.width + " x " + Zone_image.image.height + ") " + options.pictureDeriv); 250 239 } 251 // ===============================================240 // =============================================== 252 241 } else { 253 242 src = src6; … … 263 252 jQuery('#bp_img_cla').attr('title', src_info); 264 253 } 265 } 254 }; 266 255 Affiche_limite(pictureSelType_user); 267 } 268 // ____________________ set_cl _____________________________269 270 /******************************** 256 }; 257 // ____________________ set_cl _____________________________ 258 259 /*************************************************************************** 271 260 * Set__llbgo 272 ********************************* /261 **************************************************************************/ 273 262 Set_llbgo = function (Force) { 274 263 … … 315 304 316 305 return; 317 } 318 // __________Set_llbgo _______________306 }; 307 // __________ Set_llbgo _______________ 319 308 var wpng = 0; 320 /******************************************** 321 * 322 ******************************************** /309 /*************************************************************************** 310 * window LOAD 311 **************************************************************************/ 323 312 jQuery(window).load(function () { 324 313 location_href = location.href; 325 var aff_ok = false; 326 //======================================================================= 314 // ======================================================================= 327 315 infos_theImage = jQuery(theImage_id).infos({ absolute: true }); 328 316 infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true }); 329 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 317 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre 318 // general 330 319 the_mainImage_obj = "theMainImage_obj"; 331 320 infos_theMainImage_obj = jQuery("#" + the_mainImage_obj).infos({ absolute: true }); … … 374 363 jQuery(theMainImage_id).css({ maxWidth: "none" }); 375 364 theImageAndInfos_id = "#content"; 376 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 365 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre 366 // general 377 367 infos_theImage.height = infos_window.height - infos_theImage.top; 378 // 368 // jQuery(theImage_id).height(infos_theImage.height); 379 369 380 370 } else { 381 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 371 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre 372 // general 382 373 if (infos_theImageAndInfos.visible == false) 383 374 theImageAndInfos_id = "#imageContainer"; … … 391 382 infos_theImage = jQuery(theImage_id).infos(true); // conteneur 392 383 infos_imageInfos = jQuery(imageInfos_id).infos(true); // information 393 infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image 384 infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image 394 385 infos_copyright = jQuery("#copyright").infos(true); 395 386 … … 423 414 } 424 415 } 425 426 427 416 Zone_image = { image_init: { 428 417 width: infos_theMainImage.width, … … 443 432 width: 0 444 433 } 445 } 446 447 434 }; 448 435 Zone_image.zoom = (Zone_image.image.height / Zone_image.image_init.height); 449 436 450 451 452 453 /*********************************************************** 454 * RESIZE (une fois document chargé) 455 ***********************************************************/ 456 var new_dim; 437 /*********************************************************************** 438 * RESIZE (une fois document chargé) 439 **********************************************************************/ 440 457 441 jQuery(window).resize(function (event, ui) { 458 442 Autosize_resize(true, options); 459 443 }); 460 // _____________ widow.resize _______________444 // _____________ widow.resize _______________ 461 445 462 446 type_src = "div"; … … 470 454 infos_llgboh2 = jQuery("#llgboh2").infos(true); 471 455 marges_llgbo = 0; 472 // ==========================================================================================456 // ========================================================================================== 473 457 init_gen(); 474 458 }); 475 // __________________window.onload_________________476 477 /******************************************** 478 * 479 ******************************************** /459 // __________________window.onload_________________ 460 461 /*************************************************************************** 462 * window unLOAD 463 **************************************************************************/ 480 464 jQuery(window).unload(function () { 481 // 482 }); 483 // _________ unload ___________484 485 // ===================486 // VARIABLES 487 488 489 // ===================490 // options 491 // =========================================================465 // return; 466 }); 467 // _________ unload ___________ 468 469 // =================== 470 // VARIABLES 471 472 473 // =================== 474 // options 475 // ========================================================= 492 476 if (typeof (options) == "undefined") { 493 options = { imageAutosize: false } 477 options = { imageAutosize: false }; 494 478 } 495 479 options = jQuery.extend(Autosize_options, options); … … 508 492 jQuery("#the_page").append("<div id='form_autosize_picture' ></div>"); 509 493 jQuery("#form_autosize_picture").addClass("Autosize"); 510 // ===== marges suplémentaires en fonction theme ===494 // ===== marges suplémentaires en fonction theme === 511 495 options.valide = jQuery(".Autosize").css("display") != "none"; 512 496 options.marge_haute = jQuery(".Autosize").Get_Val_int(jQuery("#form_autosize_picture").css("top")); … … 522 506 DEBUG_autosize = options.DEBUG_autosize; 523 507 var COOKIE_PATH = options.COOKIE_PATH; 508 OptionsCookie = jQuery.extend({}, { path: options.COOKIE_PATH, expires: 1 }); 524 509 var cookies = Get_cookies(); 525 510 … … 530 515 } 531 516 if (test_theme("mont")) { 532 jQuery("#content").css({ marginLeft: 'auto' }); // monblanc517 jQuery("#content").css({ marginLeft: 'auto' }); // monblanc 533 518 } 534 535 536 519 Get_type_img(); 537 538 var infos_theMainImage_obj;539 520 var theMainImage_id = "#theMainImage"; 540 521 var theImage_id = "#theImage"; 541 522 var theImageAndInfos_id = "#theImageAndInfos"; 542 523 var infos_window = jQuery(window).infos(); 543 var infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 524 var infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre 525 // general 544 526 var infos_content; 545 var infos_body;546 527 var infos_the_page = jQuery("#the_page").infos(true); 547 var nopano ;528 var nopano = false; 548 529 var llgbo_id = "#llgbo0"; 549 var marges_llgbo = 0;550 530 551 531 var useMap = options.pictureMap; // #mapxxx … … 555 535 556 536 var pictureDeriv = options.pictureDeriv; // xxx 557 var pictureSelType_user = eval("options." + user_status + "_type"); //limite taille 537 var pictureSelType_user = eval("options." + user_status + "_type"); // limite 538 // taille 558 539 559 540 … … 583 564 } 584 565 new_liste = new Array(); 585 for ( i = 0; i < options.liste_type.length; i++) {566 for (var i = 0; i < options.liste_type.length; i++) { 586 567 liste_types = options.liste_type[i].split(","); 587 568 new_liste.push(options.liste_type[i].split(",")); … … 593 574 594 575 // auto_details 595 // ==== limite affichage selection = select_type ====576 // ==== limite affichage selection = select_type ==== 596 577 var path_names = new Array(); 597 578 … … 622 603 jQuery(this).remove(); 623 604 } 624 // --- recherche limite ---605 // --- recherche limite --- 625 606 626 607 if (!options.valide && (tsz == "Autosize" || tsz == "SelMaxi")) { … … 639 620 old_path = patname; 640 621 path_names.push(patname); 641 642 } 643 //--- type en cours --- 622 } 623 // --- type en cours --- 644 624 if (tsz.match(RegExp("^" + options.pictureDeriv, "gi"))) { 645 625 us = n; 646 626 } 647 648 627 n++; 649 628 }); 650 } 651 // =============================================================629 }; 630 // ============================================================= 652 631 // REPONSE ACTION 653 // =============================================================632 // ============================================================= 654 633 theMainImage_st = false; 655 634 jQuery("#reset").click(function () { … … 658 637 659 638 660 // ===========================================================661 // REPONSE TRIGGER662 // ===========================================================639 // =========================================================== 640 // REPONSE TRIGGER 641 // =========================================================== 663 642 jQuery('#ret_autosize').live('ON', function (e) { 664 643 if (nu_img == "") nu_img = 8; … … 667 646 }); 668 647 669 // ==========================================================648 // ========================================================== 670 649 jQuery("map area").mouseover(function (e) { 671 650 try { … … 678 657 }); 679 658 680 // ==================================659 // ================================== 681 660 // jQuery("#llgbo").trigger("ON"); 682 // ==================================661 // ================================== 683 662 jQuery(llgbo_id).live('ON', function (e) { 684 663 n_id = this; … … 690 669 infos_llgboframe1 = jQuery(llgbo_id + " div:last").infos(); 691 670 infos_llgboframe31 = jQuery(llgbo_id + " div:first").infos(); 692 // =============================================671 // ============================================= 693 672 ll2 = infos_llgboframe1.width; // llgboframe1 interieur 694 ll1 = infos_llgboframe31.exterieur.width; // llgboframe31 avec border width 673 ll1 = infos_llgboframe31.exterieur.width; // llgboframe31 avec border 674 // width 695 675 options.marges_llgbo = (ll1 - ll2); 696 676 infos_llgboh2 = jQuery("#llgboh2").infos(); 697 677 } 698 678 }); 699 // ==============================679 // ============================== 700 680 // jQuery("#mapPicture").trigger("ON"); 701 // ==============================681 // ============================== 702 682 jQuery("#mapPicture").live('ON', function (e) { 703 683 p2 = jQuery("#infoSwitcher").infos(); 704 684 }); 705 // ==============================685 // ============================== 706 686 // jQuery("#map").trigger("ON"); 707 // ==============================687 // ============================== 708 688 jQuery("#map").live('ON', function (e) { 709 689 p2 = jQuery("#map").infos(); 710 690 }); 711 // ===================================691 // =================================== 712 692 // jQuery("#theImage").trigger("ON"); 713 // ===================================693 // =================================== 714 694 jQuery("#imageInfos").live('on', function (e) { 715 695 target = e.target.id; 716 696 }); 717 697 718 // ===================================698 // =================================== 719 699 // jQuery("#theImage").trigger("ON"); 720 // ===================================700 // =================================== 721 701 jQuery("#theImage").live('ON', function (e) { 722 702 target = e.target.id; 723 703 724 704 id = this.id; 725 Select_Image(); // +calcul726 }); 727 728 729 730 731 // =================================================================705 Select_Image(); // +calcul 706 }); 707 708 709 710 711 // ================================================================= 732 712 jQuery(document).live('gallyInterfaceReady', function (e) { 733 713 i = jQuery(this).text(); … … 738 718 739 719 740 /********************************* 741 * 742 ********************************/ 743 var old_width; 744 720 /*************************************************************************** 721 * 722 **************************************************************************/ 745 723 jQuery("#theImage").resize(function (e) { 746 724 nu_img = 0; 747 725 }); 748 749 750 751 726 jQuery("#menuSwitcher,#infoSwitcher").click(function (e) { 752 727 options.set_sw = this.id; 753 setTimeout(function () { div_resize() }, 10);728 setTimeout(function () { div_resize(); }, 10); 754 729 nu_img = 0; 755 730 }); … … 758 733 759 734 jQuery("#theImage").trigger("resize"); 760 /* 761 if (jQuery("#theImage").width() != old_width) { 762 setTimeout(function () { div_resize() }, 10); 763 } 735 /* 736 * if (jQuery("#theImage").width() != old_width) { setTimeout(function () { 737 * div_resize() }, 10); } 764 738 */ 765 } 766 // ===========================================739 }; 740 // =========================================== 767 741 // jQuery("#theImageAndInfos").trigger("ON"); 768 // ===========================================742 // =========================================== 769 743 jQuery("#theImageAndInfos").live('ON', function (e) { 770 744 infos_theImageAndInfos = jQuery("#theImageAndInfos").infos(); 771 // 745 // setTimeout(function () { Autosize_resize(true) }, 100); 772 746 nu_img = 0; 773 747 }); // fin click #theImageAndInfos ON … … 782 756 nu_img = 0; 783 757 }); 784 // ==================================758 // ================================== 785 759 // 786 // ===================================760 // =================================== 787 761 jQuery('#derivativeCheckedAutosize').click(function () { 788 762 try { 789 763 pathnames = jQuery(this).attr("href").split(":"); 790 764 791 // 765 // eval(pathnames[1]); 792 766 } catch (e) { 793 767 n = false; 794 768 } 795 769 }); // fin click derivativeCheckedAutosize 796 // ====================================================770 // ==================================================== 797 771 if (typeof decode_href != 'function') { 798 772 function decode_href(myObj) { … … 819 793 pictureMap: pictureMap, 820 794 pictureSelType: pictureSelType 821 } 795 }; 822 796 } 823 797 } … … 828 802 theImg = document.getElementById(theMainImage_id.replace("#", "")); 829 803 if (theImg) { 830 // options.pictureDeriv = retour.pictureDeriv; 804 // options.pictureDeriv = retour.pictureDeriv; 831 805 if (this.name) { 832 806 options.pictureSelType = this.name; … … 843 817 } 844 818 }); 845 // __________ fin click #derivativeSwitchBox a ____________819 // __________ fin click #derivativeSwitchBox a ____________ 846 820 847 821 jQuery("input").click(function () { … … 860 834 861 835 862 // ====================================836 // ==================================== 863 837 Autosize_init = function (name, value) { 864 838 img_defaut = { height: options.scaled_height, width: options.scaled_width }; 865 839 img_reelle = { height: options.theImageHeight, width: options.theImageWidth }; 866 img_init = { height: options.theImageHeight, width: options.theImageWidth }; // taille initiale 840 img_init = { height: options.theImageHeight, width: options.theImageWidth }; // taille 841 // initiale 867 842 868 843 img_finale = img_init; … … 871 846 872 847 useMap = options.pictureMap; // #mapxxx 873 pictureDeriv = options.pictureDeriv; // picturederiv xxx848 pictureDeriv = options.pictureDeriv; // picturederiv xxx 874 849 875 850 … … 885 860 fade_in = parseInt(options.fade_in || 0); 886 861 887 } 888 // ____________________ Autosize_init _____________________889 890 /*************************** 862 }; 863 // ____________________ Autosize_init _____________________ 864 865 /*************************************************************************** 891 866 * Autosize_resize 892 *************************** /867 **************************************************************************/ 893 868 Autosize_resize = function (force, parametres) { 894 869 if (!force) { … … 898 873 } 899 874 } 900 nAuto = Get_dimensions(true, options); 901 875 nauto = Get_dimensions(true, options); 876 if (nauto == "Wait") { 877 setTimeout(function (force, parametres) { Autosize_resize(force, parametres); }, 100); 878 return; 879 } 902 880 Save_cookies(options); 903 if (!options.valide || nAuto == false|| (options.pictureSelType != "Autosize" && options.pictureSelType != "SelMaxi")) {881 if (!options.valide || !nauto || (options.pictureSelType != "Autosize" && options.pictureSelType != "SelMaxi")) { 904 882 if (options.imageAutosize == true) { 905 883 options.pictureSelType = options.pictureDeriv; … … 910 888 return; 911 889 } 912 // 890 // jQuery(theImg).width(Zone_image.image_init.width); 913 891 jQuery(theImg).height(Zone_image.image_init.height); 914 892 set_cl("no"); … … 924 902 } 925 903 926 // ======================================================904 // ====================================================== 927 905 928 906 affiche_debug({ … … 949 927 } 950 928 951 // jQuery(theMainImage_id).height(Zone_image.image.height);929 // jQuery(theMainImage_id).height(Zone_image.image.height); 952 930 } else if (Type_Img == "panorama") { 953 931 // jQuery("#pamoorama").width(img_finale.width); … … 956 934 957 935 958 // 936 // jQuery("#theImage img.simple_panorama").panorama(asp_options); 959 937 } else { 960 938 if (options.imageAutosize == false) … … 996 974 } else 997 975 h01 = Math.ceil(w01 / Zone_image.image.rapport); 998 // ==== Zone Affichage =====976 // ==== Zone Affichage ===== 999 977 jQuery("#theMainImage").height(png_h); 1000 978 jQuery("#theMainImage").width(w01 + wpng); … … 1004 982 jQuery("#" + the_mainImage_obj).attr("height", h01); 1005 983 1006 jQuery("#theMainImage_emb").attr("width", w01); // firefox opera984 jQuery("#theMainImage_emb").attr("width", w01); // firefox opera 1007 985 jQuery("#theMainImage_emb").attr("height", h01); 1008 986 … … 1034 1012 return true; 1035 1013 }; 1036 // _________________Autosize ____________________________________1037 1038 /***************** 1039 * changeImgSrc 1040 ****************** /1014 // _________________Autosize ____________________________________ 1015 1016 /*************************************************************************** 1017 * changeImgSrc 1018 **************************************************************************/ 1041 1019 changeImgSrc = function (url, typeSave, typeMap, type) { 1042 1020 if (type == "Autosize" || type == "SelMaxi") { … … 1055 1033 options.pictureMap = typeMap; 1056 1034 options.pictureDeriv = typeSave; 1057 jQuery.cookie('picture_deriv', typeSave, { path: COOKIE_PATH });1035 jQuery.cookie('picture_deriv', typeSave, { path: COOKIE_PATH, expires: 1 }); 1058 1036 1059 1037 url_old = jQuery("#theMainImage").attr("src"); … … 1062 1040 if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) { 1063 1041 jQuery('#derivativeChecked' + type).css('visibility', 'visible'); 1064 jQuery.cookie('picture_sel_type', type, { path: COOKIE_PATH });1042 jQuery.cookie('picture_sel_type', type, OptionsCookie); 1065 1043 } else { 1066 1044 1067 1045 jQuery('#derivativeChecked' + typeSave).css('visibility', 'visible'); 1068 jQuery.cookie('picture_sel_type', typeSave, { path: COOKIE_PATH });1046 jQuery.cookie('picture_sel_type', typeSave, OptionsCookie); 1069 1047 } 1070 1048 if (url != url_old) { 1071 jQuery("#theMainImage").attr("src",url);1072 }1073 // jQuery("#theMainImage," + theMainImage_id + ",.preload, .next1 , ")1049 file_exists(url); 1050 url_old = url; 1051 } 1074 1052 jQuery("#theMainImage").removeAttr("width height") 1075 1053 .load(function (i) { … … 1077 1055 return; 1078 1056 } 1079 // =======================================================================1057 // ======================================================================= 1080 1058 1081 1059 }) … … 1083 1061 imgsrc = this.src; 1084 1062 if (!this.complete) { 1085 // le fichier n'est pas present 1063 // le fichier n'est pas present 1086 1064 imgsrc = jQuery(this).attr("src"); 1087 1065 return false; … … 1129 1107 if (data.src) { } 1130 1108 if (options.pictureDeriv == "Original" && data.src.match(RegExp("\-.." + ".jpg", "gi"))) { 1131 // 1109 // Autosize_resize(true, options); 1132 1110 } else if (data.src.match(RegExp(options.pictureDeriv.substr(0, 2) + ".jpg", "gi"))) { 1133 // 1111 // Autosize_resize(true, options); 1134 1112 } else { 1135 1113 … … 1137 1115 1138 1116 }); 1139 // _________ theMainImage___________1140 1141 } 1142 1143 // __________________ changeImgSrc ______________________1144 1145 /***************************** 1146 * 1147 ****************************** /1117 // _________ theMainImage ___________ 1118 1119 }; 1120 1121 // __________________ changeImgSrc ______________________ 1122 1123 /*************************************************************************** 1124 * pamoorama 1125 **************************************************************************/ 1148 1126 1149 1127 … … 1160 1138 }); 1161 1139 1162 // ===============================================1140 // =============================================== 1163 1141 // jQuery("#theImage").trigger("Start_right"); 1164 // ===============================================1142 // =============================================== 1165 1143 jQuery("#theImage").live('Start_right', function (e) { 1166 1144 if (typeof Zone_image == "undefined") return … … 1170 1148 jQuery("#pamoorama_thumb img").width(200); 1171 1149 jQuery("#pamoorama_thumb img").height(nf); 1172 // 200=window.myPamoorama.imageWidth 1150 // 200=window.myPamoorama.imageWidth 1173 1151 // frame = Zone_image.container.width 1174 1152 nw = (200 * Zone_image.image.width) / window.myPamoorama.imageWidth; 1175 1153 jQuery("#pamoorama_frame").width(nw); 1176 1154 }); 1177 // ===============================================1155 // =============================================== 1178 1156 // jQuery("#theImage").trigger("Start_left"); 1179 // ===============================================1157 // =============================================== 1180 1158 jQuery("#theImage").live('Start_left', function (e) { 1181 1159 if (typeof Zone_image == "undefined") return … … 1189 1167 }); 1190 1168 1191 /************************************ 1169 /*************************************************************************** 1192 1170 * Wait_pamoorama 1193 ************************************ /1171 **************************************************************************/ 1194 1172 Wait_pamoorama = function () { 1195 1173 if (Type_Img != "pamoorama") return; … … 1213 1191 } 1214 1192 1215 } 1216 // __________________ Wait_pamoorama ______________________1193 }; 1194 // __________________ Wait_pamoorama ______________________ 1217 1195 jQuery(".pwg-icon-clock-minus, .pwg-icon-clock-plus").click(function (i) { 1218 1196 … … 1239 1217 return false; 1240 1218 } 1241 // =============================================================1219 // ============================================================= 1242 1220 if (Math.abs(mypanorama.imageHeight) < 100) { 1243 1221 setTimeout("Wait_pamoorama_time()", 500); … … 1255 1233 height: mypanorama.imageHeight 1256 1234 } 1257 } 1235 }; 1258 1236 jQuery("#pamoorama").trigger("ON"); 1259 1237 return true; 1260 1238 1261 1239 } 1262 } 1263 // __________________ Wait_pamoorama time______________________1264 1265 /********************** 1266 * 1267 *********************** /1240 }; 1241 // __________________ Wait_pamoorama time______________________ 1242 1243 /*************************************************************************** 1244 * 1245 **************************************************************************/ 1268 1246 Wait_Affichage = function () { 1269 1247 Wait_Affichage_st = false; … … 1272 1250 Wait_Affichage_st = Wait_Affichage_time(); 1273 1251 } 1274 } 1275 // __________________ Wait_Affichage ______________________1252 }; 1253 // __________________ Wait_Affichage ______________________ 1276 1254 1277 1255 … … 1280 1258 fade_in = parseInt(fade_in); 1281 1259 /* 1282 if (!Autosize_resize()) { 1283 setTimeout("Wait_Affichage()", 500); 1284 return 1285 } 1286 nu_img++; 1260 * if (!Autosize_resize()) { setTimeout("Wait_Affichage()", 500); return } 1261 * nu_img++; 1287 1262 */ 1288 1263 if (typeof fade_in == "undefined") fade_in = 0; 1289 1264 1290 // 1265 // if (nu_img > 1) return; 1291 1266 if (typeof stb != "undefined") 1292 1267 stb.stop().fadeTo(3500, 0); … … 1302 1277 return true; 1303 1278 } 1304 // === attente Image chargée ===1279 // === attente Image chargée === 1305 1280 if (tempo > 100) return true; 1306 1281 tempo++; … … 1324 1299 } 1325 1300 return true; 1326 } 1327 // ______________ Wait_affichage ______1328 1329 1330 /*********************** 1331 * 1332 ********************** /1301 }; 1302 // ______________ Wait_affichage ______ 1303 1304 1305 /*************************************************************************** 1306 * 1307 **************************************************************************/ 1333 1308 init_img = function (theImg) { 1334 1309 if (theImg.complete == false) { … … 1340 1315 return false; 1341 1316 } 1342 img_init = { width: jQuery(theImg).width(), height: jQuery(theImg).height() } 1317 img_init = { width: jQuery(theImg).width(), height: jQuery(theImg).height() }; 1343 1318 1344 1319 if (typeof theImg.naturalWidth != "undefined") … … 1350 1325 if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.image_init.height, width: Zone_image.image_init.width }; 1351 1326 // theImg.height = img_init.height; 1352 // 1327 // theImg.width = img_init.width; 1353 1328 1354 1329 Zone_image.image_init = { height: img_init.height, width: img_init.width, rapport: img_init.rapport }; … … 1361 1336 stx = name_src.match(RegExp(Zone_image.src, "gi")); 1362 1337 return stx; 1363 } 1364 // ___________ init_img _______1365 1366 1367 1368 // ===========================================1338 }; 1339 // ___________ init_img _______ 1340 1341 1342 1343 // =========================================== 1369 1344 // 1370 // ===========================================1345 // =========================================== 1371 1346 Set_Map = function (nds) { 1372 1347 p0 = jQuery("#map").offset(); … … 1379 1354 jQuery("#map").height(jQuery(window).height() - infos_theImage.top - infos_theImage.general.marges.height); 1380 1355 return true; 1381 } 1356 }; 1382 1357 1383 1358 jQuery("map [name='#Autosize'] area").mouseover(function (e) { 1384 1359 return; 1385 1360 }); 1386 // ___ Set_Map ___1387 1388 // =====================================1361 // ___ Set_Map ___ 1362 1363 // ===================================== 1389 1364 // 1390 // =====================================1365 // ===================================== 1391 1366 Get_Maxi = function (Maxi_image) { 1392 1367 var pt = options.liste_type; … … 1399 1374 size_derive = { w: 0, h: 0 }; 1400 1375 size_encours = { w: tw, h: th }; 1401 // =================================1376 // ================================= 1402 1377 jQuery(pt).each(function (i) { 1403 1378 vn = this; … … 1407 1382 maxi_size = size_derive; 1408 1383 maxi_size.idx = n; 1409 return false 1384 return false; 1410 1385 } 1411 1386 … … 1416 1391 maxi_size.idx = n; 1417 1392 if (options.pictureSelType == "SelMaxi" || options.pictureSelType == "Autosize") 1418 return false 1393 return false; 1419 1394 } 1420 1395 } … … 1459 1434 } 1460 1435 return { imgSrc: "", pictureDeriv: "", width: "", height: "" }; 1461 } 1462 // _______________ Get_Maxi ______1463 1464 /******************** 1465 * 1466 ******************** /1436 }; 1437 // _______________ Get_Maxi ______ 1438 1439 /*********************** 1440 * Selection de l'image 1441 ************************/ 1467 1442 Select_Image = function () { 1468 1443 var pt = options.liste_type; 1469 1470 1471 1444 if (pt.length > 0) { 1472 // ===== calcul Image ===1445 // ===== calcul Image === 1473 1446 if (typeof imageInfos_id == "undefined") return; 1474 Calcul_Image(); // image en cours 1447 if (Calcul_Image()=="Wait") { // image en cours 1448 return "Wait"; 1449 } 1450 //================================================== 1475 1451 options.theImageMargeZone = Zone_image.marges; 1476 1452 if (Type_Img != 'charlie') { … … 1479 1455 if (options.imgSrc.match(RegExp(imgSrc, "gi"))) 1480 1456 options.imgSrc = imgSrc; 1481 // dimension image 1457 // dimension image 1482 1458 img_width = IMg.width; 1483 1459 img_height = IMg.height; 1484 1485 1460 Zone_image.image_init = { height: IMg.height, 1486 1461 width: IMg.width, 1487 1462 rapport: IMg.width / IMg.height 1488 1489 1463 }; 1490 1464 if (typeof Zone_image.image == "undefined") … … 1492 1466 width: IMg.width, 1493 1467 rapport: IMg.width / IMg.height 1494 1495 1468 }; 1496 1469 } else { 1497 return ;1470 return true; 1498 1471 } 1499 1472 Zone_image.zoom = Zone_image.image.height / Zone_image.image_init.height; 1500 if (typeof Zone_image.src == "undefined") Zone_image.src = " "; 1473 if (typeof Zone_image.src == "undefined") 1474 Zone_image.src = " "; 1475 if (typeof Zone_image.name == "undefined") 1476 Zone_image.name = " "; 1477 if (typeof Zone_image.path == "undefined") 1478 Zone_image.path = " "; 1501 1479 1502 1480 identique = Zone_image.src.match(RegExp(imgSrc.replace("./", ""), "gi")); 1503 if (identique) return ;1481 if (identique) return true; 1504 1482 href_path = get_href(IMg.pictureDeriv); 1505 1483 if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") { … … 1508 1486 } 1509 1487 theImg = document.getElementById(theMainImage_id.replace("#", "")); 1510 1511 1488 if ((theImg == null) || theImg.tagName != "IMG") { 1512 1489 imgSrc_i = jQuery(theImg).css("backgroundImage"); 1513 1490 imgSrc_j = jQuery(theImg).css("background-image"); 1514 return ;1491 return true; 1515 1492 } else { 1516 1493 last_id = IMg.pictureDeriv; 1517 // 1494 // eval(href_path); 1518 1495 changeImgSrc(imgSrc.replace("./", ""), last_id, IMg.pictureMap, options.pictureSelType); 1519 1496 } 1520 1521 1497 theImg.useMap = "#map" + IMg.pictureMap; 1522 1498 return true; 1523 1524 1525 1499 theImg = document.getElementById(theMainImage_id.replace("#", "")); 1526 1500 if (init_img(theImg)) { 1527 1528 1501 return true; 1529 1502 } 1530 1503 return false; 1531 1532 1504 } else { 1533 1534 1535 1505 return false; 1536 1506 } 1537 1507 1538 1539 }; //_______________ Select_Image ______ 1508 }; // _______________ Select_Image ______ 1540 1509 1541 1510 get_href = function (NewpictureDeriv) { … … 1561 1530 }; 1562 1531 1563 /************************************************* 1532 /*************************************************************************** 1564 1533 * correction pamoorama 1565 *************************************************/ 1566 1534 **************************************************************************/ 1567 1535 Set_Pamoorama = function (Format) { 1568 1536 myPamoorama = window.myPamoorama; … … 1574 1542 Wait_pamoorama(); 1575 1543 infos_theMainImage = jQuery(theMainImage_Id).infos(); 1576 // theMainImage_Id = "#pamoorama";1544 // theMainImage_Id = "#pamoorama"; 1577 1545 } 1578 1546 … … 1581 1549 return; 1582 1550 } 1583 // =========================================================1551 // ========================================================= 1584 1552 if (!nopano) { 1585 // theMainImage_Id = "#pamoorama";1553 // theMainImage_Id = "#pamoorama"; 1586 1554 nopano = false; 1587 1555 Wait_pamoorama(); 1588 1556 infos_theMainImage = jQuery(theMainImage_Id).infos(); 1589 // theMainImage_Id = "#pamoorama";1557 // theMainImage_Id = "#pamoorama"; 1590 1558 } 1591 1559 … … 1597 1565 1598 1566 1599 // ====================================================1567 // ==================================================== 1600 1568 marges_w = infos_pamoorama.general.marges.width; 1601 1569 marges_h = infos_pamoorama.general.marges.height; … … 1611 1579 new_image = { height: Math.ceil(Zone_image.image_init.height * Zoom_pano), 1612 1580 width: Math.ceil(Zone_image.image_init.width * Zoom_pano) 1613 } 1581 }; 1614 1582 1615 1583 jQuery("#pamoorama_inner").css({ 1616 1584 width: new_image.width + "px", height: new_image.height + "px", "background-size": "100%" 1617 1585 }); 1618 // ---------- test largeur image1586 // ---------- test largeur image 1619 1587 new_width = Format.width - (options.marge_right + options.marge_left); 1620 1588 … … 1635 1603 height: Format.height - marges_h + "px" 1636 1604 }); 1637 // ============= Mise à l'echelle ==================1605 // ============= Mise à l'echelle ================== 1638 1606 window.myPamoorama.options.width = Math.ceil(Format.width); 1639 // ==================================================================1607 // ================================================================== 1640 1608 new_max_left = new_image.width - outter_width; 1641 1609 if (!window.myPamoorama.outter) return; … … 1651 1619 1652 1620 jQuery("#pamoorama_thumb").css({ 1653 /* 1621 /* position: "absolute", */ 1654 1622 left: (Format.width - 215) + "px" 1655 1623 … … 1658 1626 1659 1627 }); 1660 // 200=window.myPamoorama.width 1628 // 200=window.myPamoorama.width 1661 1629 // frame = Zone_image.container.width 1662 1630 … … 1666 1634 1667 1635 } // 1668 } // Set_Pamoorama1669 1670 /** *******************************************************/1636 }; // Set_Pamoorama 1637 1638 /** ****************************************************** */ 1671 1639 1672 1640 Toggle_bp = function () { … … 1675 1643 Wait_Affichage(); 1676 1644 1677 } 1678 1679 // ====================================1645 }; 1646 1647 // ==================================== 1680 1648 // 1681 // ====================================1649 // ==================================== 1682 1650 Calcul_Image = function () { 1683 1651 1684 /** **************************************/1652 /** ************************************* */ 1685 1653 if (typeof imageInfos_id == "undefined") return; 1686 1654 infos_imageInfos = jQuery(imageInfos_id).infos({ absolute: true }); // information 1687 infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true }); // Image 1655 infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true }); // Image 1688 1656 // commentContent 1689 // copyright 1657 // copyright 1690 1658 1691 1659 if (options.slideshow) { … … 1695 1663 1696 1664 } 1697 1698 1665 if (typeof Zone_image.name == "undefined") { 1666 var names = Array(); 1667 names = options.imgSrc.toString().split("/"); 1668 names = names[names.length - 1].split("-"); 1669 names = names[0].split("."); 1670 Zone_image.name = names[0]; 1671 } 1672 1673 if (Type_Img == "img") { 1674 Zone_image.src = jQuery(theMainImage_id).attr("src"); 1675 if (Zone_image.src.match(RegExp(Zone_image.name, "gi"))) { 1676 Zone_image.path = infos_theMainImage.src; 1677 } else 1678 return "Wait"; 1679 1680 } else { 1681 Zone_image.src = jQuery(theMainImage_id).attr("src"); 1682 Zone_image.path = infos_theMainImage.src; 1683 } 1699 1684 pos_top = options.pos_top; 1700 // 1685 // pos_top = infos_theImage.top; 1701 1686 1702 1687 pos = jQuery(theImage_id).offset(); 1703 infos_theImage = jQuery(theImage_id).infos(true); // container 1688 infos_theImage = jQuery(theImage_id).infos(true); // container 1704 1689 infos_window = jQuery(window).infos(true); // window 1705 w = infos_theImage.general.marges.width 1690 w = infos_theImage.general.marges.width; 1706 1691 1707 1692 container = { 1708 1693 height: infos_window.height - options.theImageTop, 1709 1694 width: infos_window.width - options.theImageLeft - options.theImageRight 1710 } 1695 }; 1711 1696 marge_left = options.marge_left | 0; 1712 1697 marge_right = options.marge_right | 0; … … 1714 1699 1715 1700 1716 // ==========================================================1701 // ========================================================== 1717 1702 if (test_theme("stripped")) { 1718 infos_the_page.margin.left = 20; // taille fleche1703 infos_the_page.margin.left = 20; // taille fleche 1719 1704 infos_the_page.margin.right = 20; 1720 1705 … … 1724 1709 1725 1710 if (infos_imageInfos.visible == true) { 1726 // 1711 // marge_right += infos_imageInfos.general.width; ; 1727 1712 1728 1713 } else { … … 1764 1749 1765 1750 retrait_img = {}; 1766 // ========== Format Image ==============1751 // ========== Format Image ============== 1767 1752 retrait_img.height = Math.ceil(options.marges_llgbo || 0) 1768 1753 + Math.ceil(infos_theMainImage.general.marges.height) + … … 1771 1756 1772 1757 1773 // ===============================================================1758 // =============================================================== 1774 1759 retrait_img.width = Math.ceil(infos_theMainImage.general.marges.width); // borderwidth+padding 1775 1760 retrait_img.width = Math.ceil(infos_theImage.general.marges.width); // borderwidth+padding … … 1781 1766 1782 1767 marge_bottom = options.marge_bottom_2 + options.marge_bottom; 1783 // ================== Limite Format Image =====================1768 // ================== Limite Format Image ===================== 1784 1769 container.height_interne = container.height - marge_top - marge_bottom; 1785 1770 container.width_interne = container.width - marge_left - marge_right; 1786 1771 1787 container.height_interne = Math.max(container.height_interne, Math.ceil(options.mini_height) + retrait_img.height), 1788 container.width_interne = Math.max(container.width_interne, Math.ceil(options.mini_width) + retrait_img.width) 1789 1790 1772 container.height_interne = Math.max( 1773 container.height_interne, 1774 Math.ceil(options.mini_height) + retrait_img.height); 1775 container.width_interne = Math.max(container.width_interne, 1776 Math.ceil(options.mini_width) + retrait_img.width); 1791 1777 image_max = { 1792 1778 height: (container.height_interne - retrait_img.height), 1793 1779 width: (container.width_interne - retrait_img.width) 1794 } 1795 // =========================1780 }; 1781 // ========================= 1796 1782 // test débordement 1797 // =========================1783 // ========================= 1798 1784 height_theMainImage = Math.ceil(image_max.height); 1799 1785 width_theMainImage = Math.ceil(image_max.width); … … 1834 1820 } 1835 1821 } 1836 // =================================================================1822 // ======== Initilisation Zone_image =============== 1837 1823 Zone_image.image = { 1838 1824 width: width_theMainImage, … … 1843 1829 height: marge_top + marge_bottom + retrait_img.height 1844 1830 } 1845 Zone_image.src = jQuery(theMainImage_id).attr("src");1831 return true; 1846 1832 } 1847 1833 1848 /********************************************* 1834 /*************************************************************************** 1849 1835 * Calcul les dimensions. 1850 ********************************************* /1836 **************************************************************************/ 1851 1837 Get_dimensions = function (force, parametres) { 1852 1838 new_img = jQuery(theMainImage_id).infos({ absolute: true }); 1853 1839 new_dim = jQuery(theImage_id).infos({ absolute: true }); 1854 new_win = jQuery(window).infos({ absolute: true }); // avec ascenseur 1840 new_win = jQuery(window).infos({ absolute: true }); // avec ascenseur 1855 1841 options.theImageTop = new_dim.top; 1856 1842 options.theImageLeft = new_dim.left; … … 1876 1862 1877 1863 if (Type_Img != "map" && Type_Img != "iframe") 1878 Select_Image();1879 infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true });1880 Zone_image.src = infos_theMainImage.src;1864 if (Select_Image() == "Wait") { 1865 return "Wait"; 1866 } 1881 1867 useMap = options.pictureSelType; 1882 // =================================================================1868 // ================================================================= 1883 1869 switch (Type_Img) { 1884 1870 case "map": 1885 1871 if (Set_Map(true)) return false; 1886 break 1872 break; 1887 1873 case "panorama": 1888 1874 if (!theMainImage_id) { … … 1894 1880 1895 1881 img_finale.height = infos_theImage.height; 1896 break 1882 break; 1897 1883 case "img": 1898 1899 1900 1901 1902 1903 break 1884 break; 1904 1885 case "img_autre": 1905 1886 if (!theMainImage_id) { … … 1912 1893 1913 1894 1914 break 1895 break; 1915 1896 case "embed": 1916 1897 // … … 1919 1900 if (infos_theMainImage.width == 0) 1920 1901 infos_theMainImage = jQuery("#the_page").infos(); 1921 1922 1923 1902 iph1 = jQuery("#theImage div").infos(); 1924 1925 break 1903 break; 1926 1904 case "charlie": 1927 1928 1905 Zone_image.zoom = 1; 1929 1930 break 1931 1906 break; 1932 1907 case "iframe": 1933 1908 wpng = 0; … … 1935 1910 Zone_image.image.height = options.theImageHeight; 1936 1911 Zone_image.zoom = 1; 1937 break 1912 break; 1938 1913 case "pamoorama": 1939 1914 Wait_pamoorama(); 1940 break 1941 } 1942 1943 1944 1945 // =================================================1915 break; 1916 } 1917 1918 1919 1920 // ================================================= 1946 1921 if (Zone_image.image.height < options.mini_height2) { 1947 1922 Zone_image.image.height = parseInt(options.mini_height2); … … 1952 1927 Zone_image.image.height = Math.ceil(Zone_image.image.width / Zone_image.image_init.rapport); 1953 1928 } 1954 // ==================================================1955 // 1956 // 1929 // ================================================== 1930 // ImageWidthidth largeur à atteindre 1931 // Calcul du rapport d'agrandissement 1957 1932 1958 1933 echelle_max = parseFloat(options.echelle_max, '3'); … … 1973 1948 1974 1949 return true; 1975 } 1976 // ________________ Get_dimensions ___________________1977 1978 1979 /***************************** 1980 * 1981 ***************************** /1950 }; 1951 // ________________ Get_dimensions ___________________ 1952 1953 1954 /*************************************************************************** 1955 * init_gen 1956 **************************************************************************/ 1982 1957 init_gen = function (e) { 1983 1958 theImg = document.getElementById(theMainImage_id.replace("#", "")); 1984 // ==================================================1959 // ================================================== 1985 1960 marges_llgbo = 0; 1986 1961 options.marges_llgbo = 0; … … 1991 1966 infos_llgboframe1 = jQuery(llgbo_id + " div:last").infos(); 1992 1967 infos_llgboframe31 = jQuery(llgbo_id + " div:first").infos(); 1993 // =============================================1968 // ============================================= 1994 1969 ll2 = infos_llgboframe1.width; // llgboframe1 1995 1970 ll1 = infos_llgboframe31.general.width; // llgboframe31 … … 2002 1977 } 2003 1978 2004 // ========= Récupération des informations =============1979 // ========= Récupération des informations ============= 2005 1980 2006 1981 options.marge_top = 0; … … 2026 2001 options.marge_left = infos_theImage.general.marges.left + Math.ceil(options.marge_gauche); 2027 2002 options.marge_right = infos_theImage.general.marges.right + Math.ceil(options.marge_droite); 2028 options.marge_top += infos_theImage.general.marges.top + infos_content.general.marges.top + Math.ceil(options.marge_haute); 2003 options.marge_top += infos_theImage.general.marges.top + 2004 infos_content.general.marges.top + 2005 Math.ceil(options.marge_haute); 2029 2006 2030 2007 if (options.pictureDeriv == null) … … 2032 2009 else 2033 2010 options.first = false; 2034 //=================== Gestion liste photos size ============================ 2011 // =================== Gestion liste photos size 2012 // ============================ 2035 2013 us = 0; 2036 2014 if (!options.theMainImageWidth) options.theMainImageWidth = options.scaledWidth; … … 2055 2033 if (pictureSelType_user != options.pictureSelType) { 2056 2034 /* 2057 user_status = options.user_status;2058 pictureSelType_user =eval("options." + user_status + "_type"); //limite taille2035 * user_status = options.user_status; pictureSelType_user = 2036 * eval("options." + user_status + "_type"); //limite taille 2059 2037 */ 2060 2038 pictureDeriv_user = options.pictureDeriv; … … 2064 2042 Affiche_limite(pictureSelType_user); 2065 2043 2066 // =================== 2==================================2044 // =================== 2================================== 2067 2045 sav_p = options.pictureSelType; 2068 2046 options.pictureSelType = "SelMaxi"; … … 2074 2052 spans.attr("name", "SelMaxi"); 2075 2053 spans.text("(" + options.theMainImageWidth + " x " + options.theMainImageHeight + ")"); 2076 // ==========================================================2054 // ========================================================== 2077 2055 options.pictureSelType = "Autosize"; 2078 2056 href_path = get_href(options.pictureDeriv); … … 2083 2061 spans.attr("name", "Autosize"); 2084 2062 spans.text("(" + options.theMainImageWidth + " x " + options.theMainImageHeight + ")"); 2085 // ==========================================================2063 // ========================================================== 2086 2064 options.pictureSelType = sav_p; 2087 2065 jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden'); 2088 2066 if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") { 2089 //jQuery('#derivativeChecked' + options.pictureSelType).css('visibility', 'visible');2067 jQuery('#derivativeChecked' + options.pictureSelType).css('visibility', 'visible'); 2090 2068 spans = jQuery("#derivativeChecked" + options.pictureSelType).next(); 2091 2069 spans.addClass("linkAutosize"); 2092 2070 spans.find("span").addClass("auto_details"); 2093 2071 } else { 2094 //jQuery('#derivativeChecked' + options.pictureDeriv).css('visibility', 'visible');2072 jQuery('#derivativeChecked' + options.pictureDeriv).css('visibility', 'visible'); 2095 2073 } 2096 2074 pictureDeriv = options.pictureDeriv; … … 2099 2077 jQuery("#" + Type_Img).show(options.fade_in); 2100 2078 }; 2101 // _______________________ init_gen _______________________2102 2103 2104 /********************************************* 2079 // _______________________ init_gen _______________________ 2080 2081 2082 /*************************************************************************** 2105 2083 * DEBUG .... 2106 ********************************************* /2084 **************************************************************************/ 2107 2085 /* 2108 if (DEBUG_autosize.match("true",gi)) { 2109 for (var i = 0; i < 10; i++) { 2110 jQuery('#adddebugs').click(); 2111 } 2112 jQuery(jQuery('.debug').get(i - 1)).click(); 2113 } 2086 * if (DEBUG_autosize.match("true",gi)) { for (var i = 0; i < 10; i++) { 2087 * jQuery('#adddebugs').click(); } jQuery(jQuery('.debug').get(i - 2088 * 1)).click(); } 2114 2089 */ 2115 2090 … … 2136 2111 // on Double Click, remove the debug from the DOM 2137 2112 jQuery('.debug').live('dblclick', function () { 2138 jQuery(this).fadeOut(function () { jQuery(this).remove() });2113 jQuery(this).fadeOut(function () { jQuery(this).remove(); }); 2139 2114 }); 2140 2115 … … 2159 2134 mouse_x = 0; 2160 2135 mouse_y = 0; 2161 // 2136 // document.onmousemove = position; 2162 2137 2163 2138 } … … 2202 2177 2203 2178 2204 // =======================================================================================2179 // ======================================================================================= 2205 2180 Debug_info = function (index, infos, Nom_str) { 2206 2181 if (typeof infos == "undefined") return; … … 2226 2201 top: infos.top + "px" 2227 2202 } 2228 } 2203 }; 2229 2204 return myDebug; 2230 2205 … … 2256 2231 top: 0 + "px" 2257 2232 } 2258 } 2233 }; 2259 2234 return myDebug; 2260 2235 } … … 2262 2237 2263 2238 2264 } //Debug_info2265 // ====================================================2239 }; // Debug_info 2240 // ==================================================== 2266 2241 affiche_debug = function (aff_infos) { 2267 2242 jQuery(jQuery("[id ^='Debug']")).each(function (i) { … … 2274 2249 }); 2275 2250 return; 2276 } 2277 // ___________ affiche_debug ____2278 // ====================================================2251 }; 2252 // ___________ affiche_debug ____ 2253 // ==================================================== 2279 2254 function Debug_pos() { 2280 2255 return; … … 2283 2258 jQuery("[id ^='Debug']").show(); 2284 2259 /* 2285 Debug2 background-color:yellow 2286 Debug3 background-color:blue 2287 Debug4 background-color:green 2288 Debug5 background-color:red 2289 2260 * Debug2 background-color:yellow Debug3 background-color:blue Debug4 2261 * background-color:green Debug5 background-color:red 2262 * 2290 2263 */ 2291 2264 … … 2295 2268 } 2296 2269 } // Debug_pos 2297 // ==========================================================2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 }); // ready2270 // ========================================================== 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 }); // ready 2308 2281 2309 2282 … … 2312 2285 k1 = 0; 2313 2286 }); 2287 //========================================================== 2288 function file_exists(filename){ 2289 var params = { filename: filename, types: [], src: [] }; 2290 url = "plugins/PersonalPlugin/fileok.php?filename=" + filename; 2291 jQuery.ajax({ 2292 type: "POST", 2293 url: url, 2294 data: params, 2295 dataType: "json", 2296 success: function (data) { 2297 if (!data.stat || data.stat != "ok") { 2298 return; 2299 } 2300 if(data.result[1]=="ok"){ 2301 jQuery("#theMainImage").attr("src", data.result[0]); 2302 } 2303 /* 2304 retour = "<ul>" ; 2305 jQuery(".infos").text(data.stat); 2306 for (var i = 0; i < data.result.length; i++) { 2307 retour = retour + "<li >" + data.result[i] + "</li>"; 2308 2309 } 2310 retour += "</ul>"; 2311 jQuery(".infos").html(retour); 2312 */ 2313 }, 2314 error: function (data) { 2315 jQuery(".infos").html(data.responseText); 2316 } 2317 }); 2318 }; -
extensions/Autosize/js/autosizeDetect.js
r22133 r22191 51 51 retval2 = jQuery.cookie('picture_deriv'); 52 52 53 if ( retval == "ok" &&retval2)54 return;53 if (!retval2) 54 jQuery.cookie('picture_deriv','medium'); 55 55 // 56 jQuery.cookie('autosize_reload', "ok", { 57 path : COOKIE_PATH 58 }); 56 jQuery.cookie('autosize_reload', "ok", {path : COOKIE_PATH,expires:1}); 59 57 60 58 if (reload == "true") { -
extensions/Autosize/js/autosize_ajax.js
r19936 r22191 105 105 106 106 } 107 } 107 }; -
extensions/Autosize/main.inc.php
r22133 r22191 1 1 <?php 2 2 /* 3 Plugin Name: AutoSize3 Plugin Name: AutoSize 4 4 Version: 3.1.1 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation … … 7 7 Author: cljosse 8 8 Author URI:http://cljosse.free.fr 9 */ 9 */ 10 10 /***************************************** 11 *Ajouter .contentWithMenu{ margin-left:0 } dans themes montblanc11 *Ajouter .contentWithMenu{ margin-left:0 } dans themes montblanc 12 12 * 13 13 *****************************************/ 14 14 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 15 if (!defined('AUTOSIZE_PATH')) 16 define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' );17 if (!defined('ROOT_URL')) 18 define( 'ROOT_URL', get_root_url().'/' );19 20 if (!defined('AUTOSIZE_PATH_ABS')) 21 define(22 23 );15 if (!defined('AUTOSIZE_PATH')) 16 define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); 17 if (!defined('ROOT_URL')) 18 define( 'ROOT_URL', get_root_url().'/' ); 19 20 if (!defined('AUTOSIZE_PATH_ABS')) 21 define( 22 'AUTOSIZE_PATH_ABS', realpath(AUTOSIZE_PATH)."/" 23 ); 24 24 25 25 global $conf ; 26 if( isset($_GET['cl_debug']) && $_GET['cl_debug'] =='false') { 27 $DEBUG_autosize=""; 28 }else{ 29 $DEBUG_autosize = isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "" ; 30 $DEBUG_autosize = isset($_GET['cl_debug']) ? $_GET['cl_debug'] : $DEBUG_autosize ; 31 $DEBUG_autosize = isset($conf['cl_debug']) ? $conf['cl_debug']."," . $DEBUG_autosize : $DEBUG_autosize ; 32 } 33 34 if(preg_match("|NO|", $DEBUG_autosize, $val)) { 26 //================================================================ 27 global $DEBUG_autosize; 28 if( isset($_GET['cl_debug']) && $_GET['cl_debug'] =='false') { 29 $DEBUG_autosize=""; 30 }else{ 31 $DEBUG_autosize = isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "" ; 32 $DEBUG_autosize = isset($_GET['cl_debug']) ? $_GET['cl_debug'] : $DEBUG_autosize ; 33 $DEBUG_autosize = isset($conf['cl_debug']) ? $conf['cl_debug']."," . $DEBUG_autosize : $DEBUG_autosize ; 34 //=============================================================== 35 } 36 if(preg_match("|NO|", $DEBUG_autosize, $val)) { 35 37 36 38 }else{ 37 //==================================================================38 include(AUTOSIZE_PATH."include/constants.php"); 39 //================================================================== 40 include(AUTOSIZE_PATH."include/constants.php"); 39 41 include_once(AUTOSIZE_PATH.'autosize.inc.php'); 40 //==================================================================41 global $page,$autosize_ctrl;42 if (!isset( $page['start'])) {43 44 45 $autosize_ctrl = new autosize_ctrl();46 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_ctrl,'cl_autosize_admin') );47 48 //=============================================================== 49 if(!preg_match("|NO|", $DEBUG_autosize, $val)) { 50 // EVENT_HANDLER_PRIORITY_NEUTRAL=80 51 add_event_handler('render_element_content', array(&$autosize_ctrl, 'autosize_calcContent'),EVENT_HANDLER_PRIORITY_NEUTRAL-11,2); 52 add_event_handler('render_element_content', array(&$autosize_ctrl, 'init_1'),EVENT_HANDLER_PRIORITY_NEUTRAL-9,2); 53 add_event_handler('render_element_content', array(&$autosize_ctrl,'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2 );54 add_event_handler('render_element_content', array(&$autosize_ctrl,'init2'),EVENT_HANDLER_PRIORITY_NEUTRAL+1,2 );55 add_event_handler('loc_after_page_header',array(&$autosize_ctrl, 'cl_autosize_script_1') );56 add_event_handler('loc_after_page_header',array(&$autosize_ctrl, 'cl_autosize_script_2') );57 add_event_handler('loc_after_page_header',array(&$autosize_ctrl, 'cl_autosize_script_3') );58 add_event_handler('loc_after_page_header',array(&$autosize_ctrl, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL +21 );59 60 42 //================================================================== 43 global $page,$autosize_ctrl; 44 if (!isset( $page['start'])) { 45 $page['start']=0; 46 } 47 $autosize_ctrl = new autosize_ctrl(); 48 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_ctrl,'cl_autosize_admin') ); 49 //=============================================================== 50 if(!preg_match("|NO|", $DEBUG_autosize, $val)) { 51 // EVENT_HANDLER_PRIORITY_NEUTRAL=80 52 global $autosize_ctrl; 53 add_event_handler('render_element_content', array(&$autosize_ctrl, 'autosize_calcContent'),EVENT_HANDLER_PRIORITY_NEUTRAL-11,2); 54 add_event_handler('render_element_content', array(&$autosize_ctrl, 'init_1'),EVENT_HANDLER_PRIORITY_NEUTRAL-9,2); 55 add_event_handler('render_element_content', array(&$autosize_ctrl, 'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2 ); 56 add_event_handler('render_element_content', array(&$autosize_ctrl, 'init2'),EVENT_HANDLER_PRIORITY_NEUTRAL+1,2 ); 57 add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_script_1') ); 58 add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_script_2') ); 59 add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_script_3') ); 60 add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL +21 ); 61 if(!isset($_GET['slideshow'])) add_event_handler('loc_begin_picture', array(&$autosize_ctrl, 'init_3'), EVENT_HANDLER_PRIORITY_NEUTRAL+6); 62 } 61 63 } ; 62 64 63 65 64 66 65 67 -
extensions/Autosize/template/picture_1.tpl
r18949 r22191 14 14 {/literal}{/footer_script} 15 15 {else } 16 {combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.dimensions' } 17 {if $theme != "elegant"} 18 {combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery" }{/if} 19 {combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"} 16 {combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.dimensions' } 17 {if $theme != "elegant"} 18 {combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery" } 19 {/if} 20 {combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"} 20 21 {/if} 21 22 22 23 {if $gmaps_function=="true" } 23 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false" require="jquery" }24 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false" require="jquery" } 24 25 {/if}
Note: See TracChangeset
for help on using the changeset viewer.