Changeset 17308
- Timestamp:
- Aug 2, 2012, 3:12:47 PM (12 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r17192 r17308 28 28 { 29 29 global $user,$page,$template,$cl_plugin; 30 31 32 30 // header ('X-UA-Compatible: n=7') ; 33 31 // header ('X-UA-Compatible: IE=Edge') ; 34 if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; 35 36 if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ; 37 32 if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; 38 33 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 39 34 if ($ma_page=='thePiwiShackControllerPage') return ; 40 $file =AUTOSIZE_PATH_ABS.'template/header.tpl' ; 35 if (!isset($template->files['pamooramics_content'])) return ; 36 if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ; 37 $has_pamoorama=isset($template->files['pamooramics_content']); 38 39 $file =AUTOSIZE_PATH_ABS.'template/header.tpl' ; 41 40 $template->set_filenames(array('autosize_init_header'=> $file )); 42 41 $template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) ); … … 50 49 $template->assign( 51 50 array( 52 'autosize_parametres' => $autosize_parametres , 53 'cl_plugins' => $cl_plugin , 54 'cl_version' => $cl_plugin['version'] , 55 'name' => $cl_plugin['name'] , 56 'pamoorama' => isset($PAMOORAMICS_PATH)?"true":"false", 57 'theme' => $theme , 58 'DEBUG_autosize' => $DEBUG_autosize , 59 'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH) , 60 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS, 61 'Version_pwg' => PHPWG_VERSION , 62 'loading' => AUTOSIZE_PATH . 'images/loading.gif' 63 ) 51 'autosize_parametres' => $autosize_parametres , 52 'cl_plugins' => $cl_plugin , 53 'cl_version' => $cl_plugin['version'] , 54 'name' => $cl_plugin['name'] , 55 'pamoorama' => $has_pamoorama, 56 'theme' => $theme , 57 'DEBUG_autosize' => $DEBUG_autosize , 58 'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH) , 59 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS, 60 'Version_pwg' => PHPWG_VERSION ) 64 61 ); 65 62 $template->concat('cl_conflit_init', $template->parse('autosize_init_header', true)); … … 73 70 { 74 71 global $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ; 75 76 72 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 77 78 73 if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ; 79 74 if (!isset($PAMOORAMICS_PATH)) return ; … … 84 79 $DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ; 85 80 //===================================================================== 86 87 88 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 89 $theme=$user['theme']; 90 if ($ma_page=='thePiwiShackControllerPage') return ; 91 92 93 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480; 94 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320; 95 96 $img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480; 97 $img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320; 98 99 100 101 102 $src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width ; 103 $src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height ; 81 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 82 $theme=$user['theme']; 83 if ($ma_page=='thePiwiShackControllerPage') return ; 84 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480; 85 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320; 86 $img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480; 87 $img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320; 88 $src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width ; 89 $src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height ; 104 90 if(isset($_COOKIE['img_w'])){ 105 $src_img_w=$_COOKIE['img_w'];106 $src_img_h=$_COOKIE['img_h'];91 $src_img_w=$_COOKIE['img_w']; 92 $src_img_h=$_COOKIE['img_h']; 107 93 } 108 94 … … 139 125 var cookie_path ='". cookie_path() ."' 140 126 </script>"; 141 142 143 127 $template->append('footer_elements',$autoscript); 144 128 return ; 145 129 }// function cl_autosize_script_2 130 /************************************* 131 * cl_autosize_script_3() 132 **************************************/ 133 static public function cl_autosize_script_3() 134 { 135 global $template; 136 137 138 $has_pamoorama=isset($template->files['pamooramics_content']); 139 if (!$has_pamoorama) return ; 140 141 $autoscript="<div id='debug' >TEST</div> 142 <script type='text/javascript'> 143 if (typeof (Ajout_Ajax) == 'function') 144 Ajout_Ajax(); 145 </script>"; 146 $template->append('footer_elements',$autoscript); 147 return ; 148 }// function cl_autosize_script_3 146 149 147 150 //================================================================ … … 227 230 $template->set_filenames(array('autosize_init_header'=> $file )); 228 231 $theme=$user['theme']; 229 $deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE); 232 $deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE); 233 $defined_types = array_keys(ImageStdParams::get_defined_type_map()); 234 230 235 if($autosize_parametres->check_icon_v == 'on'){ 231 236 $template->assign('cl_autosize_button', -
extensions/Autosize/css/autosize.css
r17192 r17308 1 1 #bp_img_cla,#icon_gmaps,#bp_cla{ 2 3 height:26px} 4 .actionButtons{ 5 overflow:hidden; 6 height:30px} 2 7 #theImage { 3 /* opacity: 0.1; 4 filter: alpha(opacity:10); 5 */ 6 8 7 9 } 8 10 body { 9 11 10 12 } 13 #bp_cla { 14 vertical-align: middle; 15 text-align: center; 16 } 11 17 #the_page { 12 /* background-color: #FF0000; 13 margin-top: -4px; 14 position:static ;*/ 18 15 19 16 20 } … … 24 28 } 25 29 26 #imageHeaderBar {background-color: transparent; 27 /* 28 margin-top: -4px; 29 position:static ;*/ 30 #imageHeaderBar { 31 30 32 31 33 } 32 #navThumbNext, #navThumbPrev{ /*height:200px;*/34 #navThumbNext, #navThumbPrev{ 33 35 34 36 35 37 } 36 /**/ 38 37 39 #theImageAndInfos, #theImageAndTitle { 38 /* background-color: #FF0000; */ 40 39 41 40 42 } 41 43 #content { 42 /* background-color: transparent;*/ 43 44 44 45 } 45 #theImage { /* 46 background-image: url('../images/quadrille_100.gif'); 47 margin: 5px; 48 border: 10px solid #0000F0; 49 padding: 20px; 50 */ 51 /* background-color: transparent;*/ 46 #theImage { 47 52 48 } 53 54 .licencetag,.imageComment{ 49 .imageComment{ 55 50 56 51 } 52 .licencetag { 53 54 } 57 55 58 56 #theMainImage { 59 /* 60 margin: 15px; 61 border: 15px solid #f0f0ff; 62 padding:15px; 63 64 background-color: #0000FF; */ 57 65 58 } 66 59 #imageInfos{ 67 60 overflow:hidden ; 68 /* 69 margin : 0px; 70 border: 0px solid #00f0f0; 71 padding: 10px;*/ 61 72 62 73 63 } 74 64 75 65 #imageInfoBar { 76 /*77 margin : 20px;78 border: 20px solid #00f0f0;79 padding: 20px;80 66 81 background-color: #00FF00;82 opacity:0.3 ;*/83 67 } 84 68 #thePicturePage{ 85 /* background-color: #FF0000; 86 border: 5px solid #FFfF00;*/ 69 70 } 71 #menubar{ 72 73 87 74 } 88 75 89 76 #debug { 77 background-color: #FFFFCC; 78 color: #003300; 79 } 90 80 #Debug0 { 91 81 align: center; -
extensions/Autosize/include/affiche.php
r17192 r17308 18 18 if (isset($_COOKIE['picture_deriv'])) 19 19 { 20 if (isset($_COOKIE[' img_w']))21 $cookies = '"'.$_COOKIE[' img_w']." x ". $_COOKIE['img_h'] .'"';20 if (isset($_COOKIE['theImageWidth'])) 21 $cookies = '"'.$_COOKIE['theImageWidth']." x ". $_COOKIE['theImageHeight'] .'"'; 22 22 23 23 if ( array_key_exists($_COOKIE['picture_deriv'], ImageStdParams::get_defined_type_map()) ) … … 53 53 $src= $derivative->src_image ; 54 54 55 } 56 57 55 } 58 56 59 57 $img_width=isset($imgScaledWH)?$imgSizeWH[0]:"480"; … … 98 96 $options[$value] = $type_size; 99 97 } 100 //====================================================== 98 //=================== 99 $value=0; 100 $liste_type=""; 101 foreach ($img_all as $img_select){ 102 $imgSizeWH = $img_select->get_size(); 103 $img_type = $img_select->get_type(); 104 $img_url = $img_select->get_url(); 105 106 $liste_type .= $img_type.",".$img_url.",".$imgSizeWH[0] .",".$imgSizeWH[1]."|" ; 107 if(strtolower($img_type)=="original") break ; 108 109 110 } 111 112 //=================================== 101 113 102 114 $template->assign( … … 105 117 'cookies' => $cookies , 106 118 'deriv_type' =>$deriv_type , 119 'liste_type' => $liste_type , 107 120 'webmaster_type' => array( 108 121 'OPTIONS' => $options, -
extensions/Autosize/js/Affiche_script.js
r17192 r17308 2 2 // problème avec GMaps+diaporama: 3 3 // corriger gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow'])) 4 //============================================================== 5 6 (function (jQuery) { 4 //============================================================== 7 5 jQuery.Affiche_script = { version: '1.0' }; 8 9 var theMainImage_Id = "#theMainImage";10 var Zone_image;11 6 /******************************************** 12 7 * document ready 13 8 ********************************************/ 14 9 jQuery(document).ready(function (jQuery) { 10 var Type_Img; 11 var theImg; 12 /****************************************** 13 * Save_cookies 14 ******************************************/ 15 Save_cookies = function (parametres) { 16 if (parametres.typeSave) document.cookie = 'picture_deriv=' + parametres.typeSave + ';path="' + "/" + '" '; 17 if (parametres.typeSave) jQuery.cookie('picture_deriv', parametres.typeSave, { path: "/" }); 18 if (parametres.pictureMap) jQuery.cookie('picture_map', parametres.pictureMap, { path: "/" }); 19 if (parametres.imgSrc) jQuery.cookie('imgSrc', parametres.imgSrc, { path: "/" }); 20 if (parametres.theMainImageHeight) jQuery.cookie('theMainImageHeight', parametres.theMainImageHeight, { path: "/" }); 21 if (parametres.theMainImageWidth) jQuery.cookie('theMainImageWidth', parametres.theMainImageWidth, { path: "/" }); 22 if (parametres.theImageHeight) jQuery.cookie('theImageHeight', parametres.theImageHeight, { path: "/" }); 23 if (parametres.theImageWidth) jQuery.cookie('theImageWidth', parametres.theImageWidth, { path: "/" }); 24 if (parametres.windowHeight) jQuery.cookie('windowHeight', parametres.windowHeight, { path: "/" }); 25 if (parametres.windowWidth) jQuery.cookie('windowWidth', parametres.WindowWidth, { path: "/" }); 26 } 27 //____________________ Save_cookies _____________________________ 28 Get_cookies = function () { 29 parametres = { 30 typeSave: jQuery.cookie('picture_deriv'), 31 pictureMap: jQuery.cookie('picture_map'), 32 imgSrc: jQuery.cookie('imgSrc'), 33 34 theMainImageHeight: jQuery.cookie('theMainImageHeight'), 35 theMainImageWidth: jQuery.cookie('theMainImageWidth'), 36 37 theImageHeight: jQuery.cookie('theImageHeight'), 38 theImageWidth: jQuery.cookie('theImageWidth'), 39 windowHeight: jQuery.cookie('windowHeight'), 40 windowWidth: jQuery.cookie('windowWidth') 41 } 42 return parametres; 43 } 44 //____________________ Get_cookies _____________________________ 45 46 47 48 /************************************************* 49 * Recupère le Type d'mage 50 *************************************************/ 51 Get_type_img = function (e) { 52 //====== détection du type d'images ====== 53 if (jQuery("#charlie").length > 0) { 54 Type_Img = "charlie"; 55 } else if (jQuery("#Panorama").length) { 56 Type_Img = "panorama"; 57 } else if (jQuery("#pamoorama").length) { 58 Type_Img = "pamoorama"; 59 } else if (jQuery("#map").length) { 60 Type_Img = "map"; 61 } else if (jQuery("#Panorama").length) { 62 Type_Img = "panorama"; 63 } else if ((jQuery("#theImage" + " iframe").length + jQuery("#theImage" + " object").length + jQuery("#theImage" + " embed").length) > 0) { 64 65 if (jQuery("#theImage" + " object").length > 0) { 66 67 type_src = "object"; 68 69 } else if (jQuery("#theImage" + " embed").length > 0) { 70 71 type_src = "embed"; 72 73 } else { 74 75 type_src = "iframe"; 76 } 77 nbf = jQuery("#theImage" + " " + type_src).length; 78 frm1 = jQuery("#theImage" + " " + type_src).get(0); 79 Type_Img = "charlie"; 80 81 //'fb - xfbml - like - button 82 83 objs = jQuery("#theImage" + " div").get(0); 84 if (jQuery(objs).length > 0) { 85 id_0 = jQuery(objs).attr("id"); 86 if (id_0 == "") { 87 jQuery(objs).attr("id", "charlie"); 88 } else { 89 if (nbf > 1) { 90 jQuery(frm1).attr("id", "charlie"); 91 } else { 92 Type_Img = "img"; 93 } 94 } 95 } else { 96 jQuery(frm1).attr("id", "charlie"); 97 } 98 99 100 } else if (jQuery("#theImage").find("img").length > 0) { 101 Type_Img = "img"; 102 } else if (jQuery("#theImage" + "Box").find("img").length > 0) { 103 Type_Img = "img"; 104 Parent = Parent + "Box"; 105 } else if (jQuery("img").length > 0) { 106 Type_Img = "img_autre"; 107 return; 108 } else { 109 return; 110 } 111 } 112 //____________________ Get_type_img _____________________________ 113 114 //==================================== 115 // set_cl 116 //==================================== 117 set_cl = function (Valid) { 118 if (typeof Valid == "undefined") Valid = options.useMap.match(RegExp("Autosize", "gi")) || false; 119 if (typeof options.cl_visible == "undefined") return; 120 if (typeof src1 == "undefined") return; 121 122 if (options.cl_visible) src = src1; 123 else src = src2; 124 125 if (options.cl_visible) { 126 src_info = src3; 127 src_infos_1 = src3; 128 } else { 129 src_info = src4; 130 src_infos_1 = src5; 131 } 132 133 if ((typeof Zone_image != "undefined") && typeof Zone_image.image != "undefined" && Valid) { 134 Zone_image.zoom = (Zone_image.image.height / Zone_image.image_init.height); 135 zoom_cl = parseInt(100 * Zone_image.zoom); 136 jQuery('#zoom ').val(zoom_cl); 137 138 zoom_cl = jQuery('#zoom ').val(); 139 140 jQuery('#bp_cla').attr('alt', src_info); 141 jQuery('#bp_cla').attr('title', src_info); 142 jQuery('#bp_cla').attr('Stitle', src_info); 143 jQuery('#bp_cla').attr('Stip', zoom_cl + "%"); 144 r = { width: jQuery("#theMainImage").width(), height: jQuery("#theMainImage").height(), 145 rap: jQuery("#theMainImage").width() / jQuery("#theMainImage").height(), 146 rap_init: Zone_image.image_init.rapport 147 } 148 149 150 jQuery('#bp_cla span').text(zoom_cl + "% "); 151 color_back = jQuery('#imageToolBar').css("backgroundColor"); 152 if (color_back.match(new RegExp("rgb", "gi"))) { 153 color_back = color_back.split("(")[1].split(")")[0].split(","); 154 color_back = "rgb(" + Math.abs(255 - color_back[0]) + "," 155 + Math.abs(255 - color_back[1]) + "," 156 + Math.abs(255 - color_back[2]) + ")"; 157 } 158 else if (color_back.match(new RegExp("#", "gi"))) 159 color_back = Math.abs("#65536" - color_back); 160 else 161 color_back = jQuery('body').css("color"); 162 jQuery('#bp_cla span').css({ color: color_back, aling: "center" }); 163 jQuery('#auto_details').text(" (" + Zone_image.image.width + " x " + Zone_image.image.height + ")"); 164 165 //=============================================== 166 } else { 167 src = src6; 168 jQuery('#auto_details').text(""); 169 } 170 bp_scr = jQuery('#bp_img_cla'); 171 if (bp_scr.length > 0) { 172 src_enc = bp_scr.attr("src"); 173 if (!src_enc.match(src)) { 174 bp_scr.get(0).src = src; 175 jQuery('#bp_img_cla').attr('alt', src_info); 176 jQuery('#bp_img_cla').attr('title', src_info); 177 } 178 } 179 180 } 181 //____________________ set_cl _____________________________ 182 183 /******************************** 184 * Set__bgo 185 *********************************/ 186 Set_llbgo = function (Force) { 187 if (Type_Img == "pamoorama") { 188 189 } 190 if (Force) 191 if (typeof LlgboFr_Resize == "function") { 192 LlgboFr_Resize(); 193 } 194 if (Type_Img == "pamoorama") { 195 return; 196 } 197 nom_map = theImg.useMap.replace("#", ""); 198 maps = jQuery("map[name='" + nom_map + "']"); 199 if (maps.length == 0) return; 200 // nom_map = maps[0].name; 201 maps = jQuery("map[name='" + nom_map + "'] area"); 202 nb_zone = maps.length; 203 Largeur_zone = (Zone_image.image.width / nb_zone); 204 Hauteur_zone = (Zone_image.image.height); 205 init_zone = 0; 206 j = 0; 207 maps.each(function (e) { 208 init_zone = Largeur_zone * j; 209 rel = jQuery(this).attr("rel"); 210 title = jQuery(this).attr("title"); 211 alt = jQuery(this).attr("alt"); 212 H = Hauteur_zone; 213 if (rel == "up") { 214 H = Hauteur_zone / 4; 215 } 216 coord = { x0: init_zone, y0: 0, x1: Math.ceil(init_zone + Largeur_zone), y1: Hauteur_zone }; 217 jQuery(this).attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); 218 j++; 219 }); 220 221 return; 222 } 223 //__________ Set_llbgo _______________ 224 225 /******************************************** 226 * window LOAD 227 ********************************************/ 228 jQuery(window).load(function () { 229 href = location.href; 230 var aff_ok = false; 231 if (DEBUG_autosize == "true") { 232 for (var i = 0; i < 10; i++) { 233 jQuery('#adddebugs').click(); 234 } 235 jQuery(jQuery('.debug').get(i - 1)).click(); 236 } 237 //======================================================================= 238 infos_theMainImage = jQuery(theMainImage_id).infos(true); 239 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 240 241 if (infos_theMainImage.width == 0) { 242 if (Type_Img == "pamoorama") { 243 infos_theMainImage = jQuery("#pamoorama").infos(true); 244 theMainImage_id = "#pamoorama"; 245 246 } else { 247 infos_theMainImage = jQuery("#theImage img").infos(); 248 } 249 if (infos_theMainImage.id == "") 250 jQuery("#theImage img").attr("id", "theMainImage"); 251 infos_theMainImage = jQuery(theMainImage_id).infos(); 252 } 253 254 255 if (options.theme.match(RegExp("simple", "gi"))) { 256 jQuery(theMainImage_id).css({ maxWidth: "none" }); 257 258 theImageAndInfos_id = "#content"; 259 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 260 infos_theImage = jQuery(theImage_id).infos(true); // conteneur 261 infos_theImage.height = infos_window.height - infos_theImage.top; 262 jQuery(theImage_id).height(infos_theImage.height); 263 264 } else { 265 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 266 if (infos_theImageAndInfos.visible == false) 267 theImageAndInfos_id = "#imageContainer"; 268 } 269 270 271 imageInfos_id = "#imageInfos"; 272 content_id = "#content"; 273 infos_content = jQuery(content_id).infos(true); // conteneur 274 infos_theImage = jQuery(theImage_id).infos(true); // conteneur 275 infos_imageInfos = jQuery(imageInfos_id).infos(true); // information 276 infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image 277 if (infos_theMainImage.visible == false) { 278 279 } 280 jQuery("#loading").show(0); 281 282 if (options.check_desc_v) { 283 infos_Licence = jQuery(".licencetag").infos(true); 284 infos_imageComment = jQuery(imageComment_id).infos(true); 285 h01 = (infos_Licence.general.height); 286 h02 = (infos_imageComment.general.height); 287 options.marge_basse += Math.max(h01, h02); 288 } 289 290 infos_theMainImage = jQuery(theMainImage_id).infos(true); 291 infos_theImage = jQuery(theImage_id).infos(true); 292 293 Zone_image = { image_init: { 294 width: infos_theMainImage.width, 295 height: infos_theMainImage.height, 296 rapport: infos_theMainImage.width / infos_theMainImage.height 297 }, 298 image: { 299 width: infos_theImage.general.width, 300 height: infos_window.height - infos_theImage.top - options.marge_basse, 301 rapport: infos_theMainImage.width / infos_theMainImage.height 302 }, 303 container: { 304 width: infos_theImage.general.width, 305 height: infos_window.height - (infos_theImage.top) 306 } 307 } 308 if (Type_Img == "pamoorama") { 309 jQuery(theMainImage_id).width(Zone_image.container.width); 310 } 311 312 /*********************************************************** 313 * RESIZE (une fois document chargé) 314 ***********************************************************/ 315 jQuery(window).resize(function (event, ui) { 316 infos_theImage = jQuery(theImage_id).infos(true); 317 infos_window = jQuery(window).infos(); 318 infos_body = jQuery("body").infos(); 319 infos_content = jQuery(content_id).infos(); 320 321 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 322 Zone_image.container = { height: infos_window.height - (infos_theImage.top), 323 width: infos_theImage.width 324 }; 325 326 if (options.theme.match(RegExp("simple", "gi"))) { 327 jQuery(theMainImage_id).css({ maxWidth: "none" }); 328 Zone_image.container.height = infos_window.height - infos_theImage.top - infos_content.general.marges.height - (infos_theImage.general.marges.height); 329 //jQuery("#menubar").css("margin-right", "0"); 330 infos_menubar = jQuery("#menubar").infos(true); 331 if (infos_menubar.visible == true) { 332 Zone_image.container.width -= infos_menubar.right; 333 } 334 } 335 336 jQuery(theImage_id).height(Zone_image.container.height + 2); 337 jQuery("#loading").hide(fade_in); 338 if (DEBUG_autosize == "no") return; 339 Autosize_resize(true, options); 340 341 }); 342 //_____________ widow.resize _______________ 343 344 type_src = "div"; 345 old_window = { width: 0, height: 0 }; 346 List_autosize = new Array(); 347 nu_img = 0; 348 tempo = 0; 349 350 351 infos_llgbo = jQuery(llgbo_id).infos(); 352 infos_llgboh2 = jQuery("#llgboh2").infos(); 353 marges_llgbo = 0; 354 //========================================================================================== 355 jQuery("#loading").show(0); 356 if (DEBUG_autosize != "no") 357 init_gen(); 358 jQuery(window).resize(); 359 jQuery(window).resize(); 360 }); 361 //__________________window.onload_________________ 362 15 363 /******************************************** 16 364 * window unLOAD … … 20 368 try { 21 369 22 if (typeof theMainImage_Id != "undefined") { 23 370 if (typeof theMainImage_id != "undefined") { 371 infos_window = jQuery(window).infos(true); 372 infos_theImage = jQuery("#" + infos_theImage.id).infos(true); 373 infos_theMainImage = jQuery("#" + theMainImage.id).infos(true); 24 374 useMap = options.useMap; 25 pictureMap = jQuery.cookie('picture_map'); 26 typeSave = jQuery.cookie('picture_deriv'); 27 28 old_img = jQuery.cookie('img'); 29 old_window_height = jQuery.cookie('window_height'); 30 old_window_width = jQuery.cookie('window_width'); 31 old_img_h = jQuery.cookie('img_h'); 32 old_img_w = jQuery.cookie('img_w'); 33 34 set_cookies({ 35 window_height: infos_window.height, 36 window_width: infos_window.width, 37 img_h: infos_theMainImage.height, 38 img_w: infos_theMainImage.width 375 376 Save_cookies({ 377 pictureMap: cookies.pictureMap, 378 typeSave: cookies.typeSave, 379 windowHeight: infos_window.height, 380 windowWidth: infos_window.width, 381 theImageHeight: infos_theImage.height, 382 theImageWidth: infos_theImage.width, 383 theMainImageHeight: infos_theMainImage.height, 384 theMainImageWidth: infos_theMainImage.width 39 385 }); 40 386 … … 44 390 } 45 391 46 }); //unload 47 392 }); 393 //_________ unload ___________ 394 395 396 397 //=================== 398 // options 399 //=================== 48 400 49 401 //========================================================= 50 messages = "This frame uses the W3C box model: <span>" + jQuery.support.boxModel + "</span>";51 messages += "This frame uses the html5Clone: <span>" + jQuery.support.html5Clone + "</span>"; 402 /*messages = "This frame uses the W3C box model: <span>" + jQuery.support.boxModel + "</span>"; 403 messages += "This frame uses the html5Clone: <span>" + jQuery.support.html5Clone + "</span>";*/ 52 404 // jQuery("p").html(messages); 53 405 if (typeof (options) == "undefined") { … … 64 416 65 417 options = jQuery.extend(defaults, options); 418 419 options.liste_type = options.liste_type.split("|"); 420 options.liste_type.pop(); 421 for (i = 0; i < options.liste_type.length; i++) { 422 options.liste_type[i] = options.liste_type[i].split(","); 423 } 424 66 425 jQuery("#form_autosize_picture").addClass("Autosize_margin"); 67 426 //===== marges suplémentaires en fonction theme === … … 71 430 options.marge_droite = jQuery(".Autosize_margin").Get_Val_int(jQuery(".Autosize_margin").css("right")); 72 431 fade_in = options.fade_in || 0; 73 74 75 76 if (options.check_desc_v) { 77 infos_Licence = jQuery(".licencetag").infos({ pos_absolute: true }); 78 infos_imageComment = jQuery(".imageComment").infos({ pos_absolute: true }); 79 options.marge_basse += infos_imageComment.general.height; 80 } 81 82 432 imageComment_id = ".imageComment"; 433 if (options.theme.match(RegExp("simple", "gi"))) { 434 jQuery("#theImage p").addClass("imageComment"); 435 } 436 if (options.theme.match(RegExp("mont", "gi"))) { 437 jQuery("#content").css({ marginLeft: 'auto' }); //monblanc 438 } 83 439 84 440 DEBUG_autosize = options.DEBUG_autosize; 441 442 85 443 Get_type_img(); 86 444 … … 88 446 // VARIABLES 89 447 //=================== 90 91 type_src = "div"; 92 old_window = { width: 0, height: 0 }; 93 List_autosize = new Array(); 94 nu_img = 0; 95 tempo = 0; 448 var cookies = Get_cookies(); 449 var Zone_image; 450 var theMainImage_id = "#theMainImage"; 451 var theImage_id = "#theImage"; 452 var theImageAndInfos_id = "#theImageAndInfos"; 453 var infos_window = jQuery(window).infos(); 454 var infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 455 var infos_content; 456 var infos_body; 457 var infos_the_page = jQuery("#the_page").infos(true); 96 458 var nopano; 97 var cookies = Get_cookies();98 var theme = options.theme;99 100 var Type_Img = "";101 102 459 var llgbo_id = "#llgbo0"; 103 var infos_llgbo = jQuery(llgbo_id).infos();104 var infos_llgboh2 = jQuery("#llgboh2").infos();105 460 var marges_llgbo = 0; 106 Zone_image = { 107 width_init: options.img_width, 108 height_init: options.img_height, 109 rapport_init: options.img_width / options.img_height 110 }; 111 112 var theImageAndInfos_id = "#theImageAndInfos"; 113 114 if (options.theme.match(RegExp("simple", "gi"))) { 115 theImageAndInfos_id = "#content"; 116 jQuery(theMainImage_Id).attr("position", "static"); 117 118 } else { 119 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 120 if (infos_theImageAndInfos.visible == false) 121 theImageAndInfos_id = "#imageContainer"; 122 } 123 124 theImage_id = "#theImage"; 125 imageInfos_id = "#imageInfos"; 126 theMainImage_Id = "#theMainImage"; 127 128 infos_theImage = jQuery(theImage_id).infos({ pos_absolute: true }); // conteneur 129 infos_imageInfos = jQuery(imageInfos_id).infos({ pos_absolute: true }); // information 130 infos_theMainImage = jQuery(theMainImage_Id).infos({ pos_absolute: true }); // Image 131 /************************************ 132 * 133 *************************************/ 134 135 infos_theImage = jQuery(theImage_id).infos({ pos_absolute: true }); // conteneur 136 infos_imageInfos = jQuery(imageInfos_id).infos({ pos_absolute: true }); // information 137 infos_theMainImage = jQuery(theMainImage_Id).infos({ pos_absolute: true }); // Image 138 139 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 140 var infos_theImage = jQuery("#theImage").infos(); // Container 141 var infos_imageInfos = jQuery("#imageInfos").infos(); // Informations 142 143 var infos_the_page = jQuery("#the_page").infos(); 144 var infos_content = jQuery("#content").infos(); 145 var infos_titrePage = jQuery("#titrePage").infos(); 146 var infos_imageInfoBar = jQuery("#imageInfoBar").infos(); 147 var infos_theHeader = jQuery("#theHeader").infos(); 148 var infos_imageToolBar = jQuery("#imageToolBar").infos(); 149 var infos_imageHeaderBar = jQuery("#imageHeaderBar").infos(); 150 var infos_body = jQuery("body").infos(); 151 152 153 var Type_Img = ""; 154 461 var type_size = cookies.typeSave; // xxx 462 var useMap = cookies.pictureMap; // #mapxxx 463 var user_status = options.user_status; 464 var type_size_maxi = eval("options." + user_status + "_type"); //limite taille 465 466 467 468 if (DEBUG_autosize == "no") return; 155 469 //============================================================= 156 470 // REPONSE ACTION 157 471 //============================================================= 472 jQuery("#theMainImage," + theMainImage_id + ",.preload, .next1 , ").load(function (e) { 473 if (this.complete) { 474 jQuery("#loading").hide(1000); 475 } 476 //_________ theMainImage ___________ 477 478 if (typeof theMainImage_id != "undefined") 479 if (init_img(this)) 480 nu_img = 0; 481 }); 482 483 158 484 jQuery("#reset").click(function () { 159 485 location.reload(); … … 184 510 mouseLocation.x = evt.clientX; 185 511 mouseLocation.y = evt.clientY; 186 affiche_debug({187 Debug1: Debug_info(1, "x:" + mouseLocation.x + " y: " + mouseLocation.y, "position:"),188 Debug2: Debug_info(2, "pos_top:" + options.pos_top + " marge_right: " + options.marge_right, "marges:"),189 190 Debug5: Debug_info(5, "X:" + infos_theMainImage.left +191 "Y:" + infos_theMainImage.top +192 "W:" + infos_theMainImage.exterieur.width +193 "H:" + infos_theMainImage.exterieur.height194 , infos_theMainImage.id)195 });196 197 198 512 } 199 513 … … 232 546 // REPONSE TRIGGER 233 547 //=========================================================== 234 235 236 548 jQuery('#ret_autosize').live('ON', function (e) { 237 549 if (nu_img == "") nu_img = 8; … … 242 554 //========================================================== 243 555 jQuery("map area").mouseover(function (e) { 556 nok = theImg.useMap; 244 557 hok = this; 245 246 558 }); 247 559 … … 291 603 292 604 id = this.id; 293 theImage_init();605 Select_Image(); //+calcul 294 606 }); 295 607 … … 301 613 }); 302 614 303 jQuery("#theMainImage,.preload, .next1 , ").load(function (e) {304 if (this.complete) {305 theMainImage_id = "#" + this.id;306 jQuery(theMainImage_id).show(1000);307 }308 309 if (typeof theMainImage_id != "undefined")310 if (init_img(this))311 setTimeout(function () { Autosize_resize(true) }, 5);312 nu_img = 0;313 });314 615 315 616 //================================================================= … … 325 626 jQuery(jQuery('.debug').get(1)).trigger('ON'); 326 627 if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) { 327 Bandeau_bas = infos_Description_f("#theImage"); 328 Bandeau = Bandeau_bas.top; 329 } 330 }); 331 // jQuery("#theImage").trigger("OK"); 628 629 } 630 }); 631 632 //=============================================== 633 // jQuery("#theImage").trigger("Start_right"); 634 //=============================================== 332 635 jQuery("#theImage").live('Start_right', function (e) { 333 636 if (typeof Zone_image == "undefined") return … … 341 644 // 200=window.myPamoorama.imageWidth 342 645 // frame = Zone_image.container.width 343 if (Zone_image.container) 344 nw = (200 * Zone_image.container.width) / window.myPamoorama.imageWidth; 345 else 346 nw = (200 * infos_content.width) / window.myPamoorama.imageWidth; 646 nw = (200 * Zone_image.container.width) / window.myPamoorama.imageWidth; 347 647 jQuery("#pamoorama_frame").width(nw); 348 648 … … 350 650 351 651 }); 352 652 //=============================================== 653 // jQuery("#theImage").trigger("Start_left"); 654 //=============================================== 353 655 jQuery("#theImage").live('Start_left', function (e) { 354 656 if (typeof Zone_image == "undefined") return 355 if (nu_img == "") nu_img = 7;356 jQuery(jQuery('.debug').get(nu_img)).trigger('ON');657 jQuery("#theImage").show(0); 658 window.myPamoorama.autoSlideFx.to = 0; 357 659 test_w = window.myPamoorama.autoSlideFx.to; 358 660 test_w = window.myPamoorama.autoScrollFx.to; … … 360 662 jQuery("#pamoorama_thumb img").width(200); 361 663 jQuery("#pamoorama_thumb img").height(nf); 362 if (typeof Zone_image.container != "undefined") return;363 try {364 nw = (200 * Zone_image.container.width) / window.myPamoorama.imageWidth;365 jQuery("#pamoorama_frame").width(nw);366 } catch (e) {367 368 }369 370 664 }); 371 665 … … 409 703 jQuery("#menuSwitcher,#infoSwitcher").click(function (e) { 410 704 411 setTimeout(function () { Autosize_resize(true) }, 10); 705 setTimeout(function () { jQuery(window).resize() }, 10); 706 setTimeout(function () { jQuery(window).resize() }, 12); 412 707 nu_img = 0; 413 708 }); … … 444 739 //==================================================== 445 740 jQuery("#derivativeSwitchBox a").click(function () { 446 var theImg = document.getElementById(theMainImage_Id.replace("#", ""));741 theImg = document.getElementById(theMainImage_id.replace("#", "")); 447 742 if (theImg) { 448 743 pathnames = jQuery(this).attr("href").split(":"); … … 455 750 } 456 751 457 infos_theMainImage = jQuery(theMainImage_ Id).infos();458 infos_theImage = jQuery("#theImage").infos(); 752 infos_theMainImage = jQuery(theMainImage_id).infos(); 753 459 754 theImg.removeAttribute("width"); 460 755 theImg.removeAttribute("height"); … … 466 761 init_img(theImg); 467 762 wx = parseInt(nw[0]); 468 wh = parseInt(wx / rapport);469 //jQuery("#theImage").css("height", wh + "px"); 763 wh = parseInt(wx / Zone_image.image_init.rapport); 764 470 765 jQuery(theImg).width(wx); 471 766 jQuery(theImg).height(wh); … … 499 794 500 795 }); 796 //____________________ set_llgbo _____________________________ 501 797 502 798 //==================================== … … 507 803 508 804 img_finale = img_init; 509 rapport = parseInt(img_init.width) / parseInt(img_init.height); 805 510 806 useMap = infos_theMainImage.useMap; // #mapmedium 511 807 … … 520 816 old_img_w = cookies.imgWidth; 521 817 if (infos_theMainImage.visible == true) { 522 var theImg = document.getElementById(theMainImage_Id.replace("#", ""));818 theImg = document.getElementById(theMainImage_id.replace("#", "")); 523 819 theImg.useMap = useMap; 524 820 } 525 526 } // Autosize_init 527 //=========================================================================== 821 fade_in = parseInt(options.fade_in || 0); 822 823 } 824 //____________________ Autosize_init _____________________ 825 826 /*************************** 827 * Autosize_resize 828 ***************************/ 528 829 Autosize_resize = function (force, parametres) { 529 fade_in = parseInt(fade_in || 1000); 530 830 theImg = document.getElementById(theMainImage_id.replace("#", "")); 831 if (theImg) { 832 theImg.removeAttribute("width"); 833 theImg.removeAttribute("height"); 834 } 531 835 if (Get_dimensions(force, parametres)) { 532 jQuery(theMainImage_Id).height(Zone_image.image.height); 533 jQuery(theMainImage_Id).width(Zone_image.image.width); 534 jQuery("#theImageAndInfos").css({ height: "auto" }); 836 837 jQuery(theImageAndInfos_id).css({ height: "auto" }); 535 838 if (Type_Img == "pamoorama") { 536 jQuery("#theImage").css({ height: "auto" }); 537 839 Set_Pamoorama({ width: Zone_image.container.width - 5, height: Zone_image.image.height }); 840 if (nopano) 841 if (window.myPamoorama.options.autoscrollOnLoad) { 842 window.myPamoorama.startAnimRight(); 843 } 538 844 } else { 539 jQuery("#theImage").css({ height: Zone_image.container.height }); 540 jQuery("#theImage").width(Zone_image.container.height); 541 } 542 jQuery("#theImage").width(Zone_image.container.width); 543 544 545 Set_Pamoorama(); 845 846 jQuery(theMainImage_id).height(Zone_image.image.height); 847 jQuery(theMainImage_id).width(Zone_image.image.width); 848 } 849 546 850 547 851 set_cl(true); 548 852 } else { 549 Set_Pamoorama(); 853 854 Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.image.height }); 550 855 set_cl(false); 551 856 } 552 857 553 jQuery(theMainImage_Id).show(fade_in); 858 554 859 Set_llbgo(true); 555 860 return true; 556 557 //_____________________________________________________ 558 }; // Autosize 559 560 561 562 563 564 /******************************************** 565 * window LOAD 566 ********************************************/ 567 jQuery(window).load(function () { 568 href = location.href; 569 var aff_ok = false; 570 if (DEBUG_autosize == "true") { 571 for (var i = 0; i < 10; i++) { 572 jQuery('#adddebugs').click(); 573 } 574 jQuery(jQuery('.debug').get(i - 1)).click(); 575 } 576 577 Autosize_init(); 578 579 580 /* 581 Bandeau_bas = infos_Description_f("#theImage"); 582 if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top; 583 else Bandeau = 0; 584 */ 585 586 Wait_pamoorama(); 587 588 if (!theImage_init()) { 589 Wait_Affichage(); 590 Autosize_resize(true, options); 591 Set_llbgo(true); 592 593 } else { 594 set_cl(options.useMap.match(RegExp("Autosize", "gi"))); 595 Set_llbgo(); 596 } 597 setTimeout(function () { Autosize_resize(true) }, 100); 598 599 600 601 //================================================================================= 602 }); // window.onload 603 /*********************************************************** 604 * RESIZE 605 ***********************************************************/ 606 jQuery(window).resize( 607 function (event, ui) { 608 Wait_Affichage(); 609 List_autosize_resize(event, ui); 610 Autosize_resize(true, options); 611 612 613 }); 861 }; 862 //_________________Autosize ____________________________________ 863 864 865 866 867 868 869 870 614 871 615 872 /***************** 616 * changeImgSrc 1873 * changeImgSrc 617 874 ******************/ 618 875 changeImgSrc = function (url, typeSave, useMap) { 619 var theImg = document.getElementById(theMainImage_Id.replace("#", ""));876 theImg = document.getElementById(theMainImage_id.replace("#", "")); 620 877 if (theImg) { 621 878 theImg.removeAttribute("width"); 622 879 theImg.removeAttribute("height"); 623 880 // theImg.useMap = "#map" + useMap; 624 625 881 jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden'); 626 882 jQuery('#derivativeChecked' + useMap.replace("#", "")).css('visibility', 'visible'); … … 631 887 pictureMap = "#map" + typeSave; 632 888 } 633 theImg.src = url; // charge Image634 889 theImg.useMap = pictureMap; 890 if (theImg.src.match(RegExp(url, "gi"))) { 891 jQuery("#loading").hide(0); 892 } else { 893 jQuery("#loading").show(0); 894 } 895 theImg.src = url; // charge Image 635 896 //=================================================== 636 637 638 infos_theMainImage = jQuery(theMainImage_Id).infos();639 Zone_image.width_init = infos_theMainImage.width;640 Zone_image.height_init = infos_theMainImage.height;641 Zone_image.zoom = (infos_theMainImage.width / infos_theMainImage.height);642 infos_theMainImage.useMap = theImg.useMap;643 644 897 Save_cookies({ 645 898 typeSave: typeSave, … … 648 901 }); 649 902 cookies = Get_cookies(); 650 651 } 652 653 654 } //changeImgSrc1 903 } 904 } 905 //__________________ changeImgSrc ______________________ 906 655 907 /************************************ 656 908 * … … 659 911 if (Type_Img != "pamoorama") return; 660 912 661 jQuery("#loading").attr("id", "theMainImage"); 913 // jQuery("#loading").attr("id", "theMainImage"); 914 tempo = 0; 662 915 663 916 Wait_pamoorama_st = false; 664 917 while (Wait_pamoorama_st == false) { 665 918 Wait_pamoorama_st = Wait_pamoorama_time(); 666 } 667 } 919 jQuery.noop(); 920 } 921 tempo = 0; 922 923 Wait_pamoorama_st = false; 924 while (Wait_pamoorama_st == false) { 925 Wait_pamoorama_st = Wait_pamoorama_time(); 926 jQuery.noop() 927 } 928 929 if (nopano) 930 if (window.myPamoorama.options.autoscrollOnLoad) { 931 window.myPamoorama.startAnimRight(); 932 jQuery.noop() 933 } 934 935 } 936 //__________________ Wait_pamoorama ______________________ 937 668 938 Wait_pamoorama_time = function () { 669 939 … … 673 943 mypanorama = window.myPamoorama; 674 944 if (!mypanorama) { 945 jQuery("#loading").show(5000); 675 946 tempo = tempo + 1; 676 if (tempo > 2000) return true;947 if (tempo > 5000) return true; 677 948 nopano = false; 678 949 setTimeout("Wait_pamoorama_time()", 500); … … 694 965 695 966 nopano = true; 696 967 jQuery("#pamoorama").show(1000); 697 968 return true; 698 969 699 970 } 700 } // Wait_pamoorama 701 //==================================================================================== 971 } 972 //__________________ Wait_pamoorama time______________________ 973 974 /********************** 975 * 976 ***********************/ 702 977 Wait_Affichage = function () { 703 978 Wait_Affichage_st = false; 704 979 while (Wait_Affichage_st == false) { 980 jQuery.noop(); 705 981 Wait_Affichage_st = Wait_Affichage_time(); 706 982 } 707 983 } 708 //========================================== 984 //__________________ Wait_Affichage ______________________ 985 986 709 987 Wait_Affichage_time = function () { 710 988 if (typeof fade_in == "undefined") fade_in = 1000; … … 722 1000 if (typeof stb != "undefined") 723 1001 stb.stop().fadeTo(3500, 0); 724 if (typeof theMainImage_ Id == "undefined") return true;725 726 if (theMainImage_ Id.selector) {727 theMainImage_ Id = theMainImage_Id.selector;728 } 729 if (theMainImage_ Id == null) return;730 731 if (jQuery(theMainImage_ Id).length == 0) {1002 if (typeof theMainImage_id == "undefined") return true; 1003 1004 if (theMainImage_id.selector) { 1005 theMainImage_id = theMainImage_id.selector; 1006 } 1007 if (theMainImage_id == null) return; 1008 1009 if (jQuery(theMainImage_id).length == 0) { 732 1010 if (jQuery("#pamoorama_inner").length > 0) { 733 1011 return true; … … 741 1019 } else { 742 1020 743 img_h = jQuery(theMainImage_ Id).height();744 img_w = jQuery(theMainImage_ Id).width();1021 img_h = jQuery(theMainImage_id).height(); 1022 img_w = jQuery(theMainImage_id).width(); 745 1023 746 1024 jQuery("#src_img_h").val(img_h); 747 1025 jQuery("#src_img_w").val(img_w); 748 1026 jQuery("#ret_autosize").val(infos_theMainImage.src); 749 if (typeof Window_Affichage == "undefined") return; 750 jQuery("#window_height").val(Window_Affichage.height); 751 jQuery("#window_width").val(Window_Affichage.width); 1027 if (typeof infos_theImage == "undefined") return; 1028 752 1029 jQuery("#ret_autosize").trigger('ON', { 753 1030 width: img_w, 754 1031 height: img_h, 755 theImage: theMainImage_ Id,1032 theImage: theMainImage_id, 756 1033 src_img: infos_theMainImage.src, 757 window_height: Window_Affichage.height,758 window_width: Window_Affichage.width1034 window_height: infos_theImage.height, 1035 window_width: infos_theImage.width 759 1036 }); 760 1037 } 761 1038 return true; 762 } // Wait_affichage 763 764 765 1039 } 1040 //______________ Wait_affichage ______ 766 1041 767 1042 … … 770 1045 **********************/ 771 1046 init_img = function (theImg) { 772 773 1047 name_src = theImg.src; 774 1048 img_init = { width: jQuery(theImg).width(), height: jQuery(theImg).height() } … … 780 1054 781 1055 img_init.rapport = img_init.width / img_init.height; 782 Zone_image.height_init = img_init.height; 783 Zone_image.width_init = img_init.width; 784 if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.height_init, width: Zone_image.width_init }; ; 785 Zone_image.zoom = Zone_image.image.height / Zone_image.height_init; 786 Zone_image.rapport = img_init.rapport; 1056 1057 if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.image_init.height, width: Zone_image.image_init.width }; ; 1058 1059 Zone_image.image_init.height = img_init.height; 1060 Zone_image.image_init.width = img_init.width; 1061 Zone_image.zoom = Zone_image.image_init.height / img_init.height; 1062 Zone_image.image_init.rapport = img_init.rapport; 787 1063 nu_img = 0; 788 if (typeof Zone_image.src == "undefined") return false; 1064 if (typeof Zone_image.src == "undefined") { 1065 Zone_image.src = name_src; 1066 return false; 1067 } 789 1068 stx = name_src.match(Zone_image.src); 790 1069 sty = infos_theMainImage.src; 791 1070 return stx; 792 1071 } 793 794 795 /***************************************************** 796 * recherche la plus grande image (hauteur ou largeur) 797 *****************************************************/ 798 Get_Img_Maxi = function (myobj) { 799 var w00 = 0; 800 var myImg = null; 801 802 img = jQuery(theMainImage_Id); 803 if (img != null) { 804 return; 805 806 } 807 img = jQuery(myobj); 808 809 img = jQuery('img[alt]'); 810 811 jQuery(myobj).each(function (i) { 812 w0 = img_reelle.width; 813 h0 = img_reelle.height; 814 if (h0 > w0) w0 = h0; 815 if (w0 > w00) { 816 if (!this.src.match(RegExp(".png", "gi"))) 817 if (!this.src.match(RegExp(thumbnail, "g"))) { 818 myImg = this; 819 jQuery(myImg).addClass("Image"); 820 w00 = w0; 821 } 822 823 } 824 }); 825 return myImg; 826 } // Get_Img_Maxi 827 828 829 /************************************************************* 830 * 831 **************************************************************/ 832 infos_entete = function () { 833 infos_imageToolBar = jQuery("#imageToolBar").infos(); 834 if (typeof (marge_top) != "undefined") return; 835 836 optiontop = 0; 837 infos_imageInfoBar = jQuery("#imageInfoBar").infos(); 838 839 infos_thePicturePage = jQuery("#thePicturePage").infos(); 840 infos_theImage = jQuery("#theImage").infos(); 841 if (theme.match(RegExp("stripped", "gi"))) { 842 infos_theImageAndTitle = jQuery("#theImageAndTitle").infos(); 843 infos_theImageBox = jQuery("#theImageBox").infos(); 844 optiontop = (marges_llgbo / 2) + infos_theImageAndTitle.margin.top; 845 } 846 847 848 849 marge_top = Math.ceil(infos_the_page.top + 850 infos_the_page.borderwidth.top + 851 infos_theImage.borderwidth.top + 852 infos_thePicturePage.margin.top 853 ); 854 855 img_top = Math.ceil(infos_theImage.top + 856 infos_theImage.padding.top + 857 infos_theImage.borderwidth.top + 858 infos_thePicturePage.margin.top + optiontop); 859 result = infos_imageToolBar; 860 // result.width = "20%"; 861 // result.left = "40%"; 862 result.marge_top = marge_top; 863 result.img_top = img_top; 864 //=== Afficher le titre de l'image sur le cadre === 865 866 867 if (infos_llgboh2.top > 0) { 868 result.img_top = infos_llgboh2.top; 869 870 } 871 else if (marges_llgbo > 0) { 872 result.img_top -= (8); 873 } 874 return result; 875 } // infos_entete 876 877 /************************************************* 878 * Récupère les informations sur la description. 879 * 880 *************************************************/ 881 infos_Description_f = function () { 882 // jQuery("#theImage").css({ display: "block" }); 883 884 //=============== CHARLIE ============================== 885 if (jQuery("#charlie").length > 0) { 886 jQuery("#charlie").css({ 887 paddingTop: "0px", 888 marginTop: "0px", 889 paddingBottom: "0px", 890 marginBottom: "0px" 891 }); 892 893 } 894 895 // Bandeau_t = infos_entete(); 896 // Bandeau = Bandeau_t.img_top; 897 infos_theImgContainer = jQuery("#" + "theImgContainer").infos(); 898 infos_description = jQuery("#" + "description").infos(); 899 //============================================================================= 900 901 902 903 if (theme.match(RegExp("luciano", "g"))) { 904 905 906 907 908 } else if (Type_Img == "map") { 909 910 infos_map = jQuery("#mapPicture").infos(); 911 marge_left = infos_map.width; 912 913 jQuery("#map").css({ left: marge_left + "px", padding: "0px", 914 marginLeft: "0px", 915 marginRight: "4px", 916 marginTop: "0px", 917 marginBottom: "0px", 918 position: "relative" 919 }); 920 921 theMainImage_Id = "#map"; 922 infos_theMainImage = jQuery(theMainImage_Id).infos(); 923 924 925 } else if (jQuery("#charlie").length > 0) { 926 infos_charlie = jQuery("#charlie").infos(); 927 obj_charlie = jQuery("object"); 928 try { 929 tp = obj_charlie.attr(); 930 } catch (e) { 931 tp = obj_charlie.prop(); 932 } 933 934 if (tp != undefined) { 935 if (obj_charlie.length > 0) 936 tp = jQuery("object").attr("type") || jQuery("object").prop("type"); 937 else 938 tp = jQuery("embed").attr("type") || jQuery("embed").prop("type"); 939 } 940 941 if (tp == 'application/x-shockwave-flash') { 942 jQuery("#charlie").css({ 943 paddingTop: "0px", 944 marginTop: "0px", 945 paddingBottom: "30px", 946 marginBottom: "0px" 947 }); 948 } else { 949 950 } 951 952 var MainImage = jQuery(theMainImage_Id); 953 954 if (MainImage.length == 0) { 955 theMainImage_Id = "#charlie"; 956 infos_theMainImage = jQuery(theMainImage_Id).infos(); 957 } else { 958 959 infos_theMainImage = jQuery(theMainImage_Id).infos(); 960 961 } 962 963 964 } else if (jQuery("#theImage" + " embed").length > 0) { 965 if (jQuery(theMainImage_Id).lenght == 0) { 966 theMainImage_Id = "#theImage" + " embed"; 967 infos_theMainImage = jQuery(theMainImage_Id).infos(); 968 jQuery("#theImage" + " embed").width({ width: infos_theMainImage.width + "px", height: infos_theMainImage.height + "px" }); 969 } else { 970 971 infos_theMainImage = jQuery(theMainImage_Id).infos(); 972 Type_Img == "charlie" 973 if (infos_theMainImage.width == 0) { 974 975 infos_theMainImage = jQuery(theMainImage_Id).infos(); 976 977 } 978 } 979 980 } else if (Type_Img == "pamoorama") { 981 if (!nopano) { 982 Wait_pamoorama(); 983 984 } 985 infos_theMainImage = jQuery(theMainImage_Id).infos(); 986 infos_footer = jQuery("#pamoorama_footer").infos(); 987 infos_theMainImage.height += parseInt(infos_theMainImage.height) + parseInt(infos_footer.height); 988 989 } else { 990 if (jQuery(theMainImage_Id).length == 0) { 991 theMainImage_Id = "#theImage" + " img[alt]"; 992 } else { 993 994 } 995 996 997 if (!theMainImage_Id) 998 theMainImage_Id = "#theImage"; // sans img ?? 999 1000 1001 } 1002 //===================================================================================== 1003 infos_theMainImage = jQuery(theMainImage_Id).infos(); 1004 1005 switch (infos_theMainImage.position) { 1006 case "relative": 1007 break; 1008 case "static": 1009 break; 1010 case "absolute": 1011 break; 1012 case "": 1013 break; 1014 default: 1015 break; 1016 } 1017 1018 infos_description.marge = { 1019 bottom: infos_theMainImage.padding.bottom + infos_theMainImage.margin.bottom + infos_theMainImage.borderwidth.bottom, 1020 top: infos_theMainImage.padding.top + infos_theMainImage.borderwidth.top + infos_theMainImage.margin.top 1021 } 1022 1023 if (infos_llgbo.height > 0) infos_theMainImage = infos_llgbo; // format de l'image+largeur du cadre 1024 1025 if (theme.match(RegExp("luciano", "g"))) { 1026 1027 infos_theImgContainer = jQuery(theImageAndInfos_id).infos(); 1028 infos_description.bottom = jQuery("#imageInfo").infos().top; 1029 infos_description.top = infos_theImgContainer.bottom; 1030 infos_slidshowToolBar = jQuery("#slidshowToolBar").infos(); 1031 1032 if (infos_slidshowToolBar.height > 0) { 1033 correction = (infos_slidshowToolBar.height); 1034 infos_description.top = infos_theMainImage.bottom; 1035 infos_description.bottom = jQuery("#copyright").infos().top; 1036 } 1037 1038 //========================================================= 1039 } else if (theme.match(RegExp("stripped", "gi"))) { 1040 //options.imageAutosize 1041 //options.imageMargin 1042 1043 infos_content = jQuery("#content").infos(); 1044 if (options.imageAutosizeTitle == false) { 1045 infos_description.top = infos_theImageBox.bottom; 1046 1047 infos_description.bottom = infos_HeaderBar.margin.top + infos_description.top + 1048 infos_description.borderwidth.top + 1049 infos_description.borderwidth.bottom + 1050 options.imageAutosizeMargin * 2 + 1051 (marges_llgbo / 2) + 4; 1052 1053 } else { 1054 1055 1056 infos_description.top = infos_theImageBox.bottom - 1057 infos_content.top + 1058 options.imageAutosizeMargin * 2 + 1059 (marges_llgbo / 2) 1060 ; 1061 infos_description.bottom = jQuery("#tabZone").infos().top + 1062 infos_theImageAndTitle.margin.top; 1063 if (msie == true) infos_description.bottom -= 4; 1064 }; 1065 check_desc_v = true; 1066 1067 } else { 1068 if (theme.match(RegExp("sobre", "gi"))) { 1069 infos_description.marge.top = -2; 1070 } 1071 infos_description.bottom = infos_theImage.bottom; //482 1072 infos_description.top = infos_theMainImage.height + infos_theImage.top; //410+62 1073 // infos_description.bottom -= infos_theMainImage.top; 1074 } 1075 // 1076 1077 infos_description.height = infos_description.bottom - infos_description.top; 1078 1079 if (options.check_desc_v == false) { 1080 infos_description.height = 0; 1081 } 1082 1083 Debug_pos(); 1084 1085 //options.cl_visible=false ; 1086 return infos_description; 1087 } //infos_Description_f 1072 //___________ init_img _______ 1088 1073 1089 1074 //======================================================================================= 1090 1075 Debug_info = function (index, infos, Nom_str) { 1076 1091 1077 if (DEBUG_autosize == "true") { 1092 1078 if (typeof infos == "undefined") return; … … 1115 1101 } 1116 1102 return myDebug; 1103 1117 1104 } else { 1118 1105 if (typeof old_messages == "undefined") { … … 1147 1134 } 1148 1135 } 1136 return myDebug; 1149 1137 } 1150 1151 return myDebug;1152 1138 } 1153 1139 } … … 1169 1155 1170 1156 affiche_debug({ 1171 Debug1: Debug_info(1, Bandeau_t, "Bandeau_t"),1172 Debug4: Debug_info(4, infos_description, "infos_description"),1173 1157 Debug5: Debug_info(5, infos_theMainImage, "infos_theMainImage") 1174 1158 }); … … 1187 1171 return; 1188 1172 } 1173 //___________ affiche_debug ____ 1174 1189 1175 //=========================================== 1190 1176 // … … 1201 1187 p0.left += 35; 1202 1188 } 1203 jQuery("#map").width(Zone_image.container.width - p0.left); 1204 jQuery("#map").css({ position: "absolute", height: Zone_image.container.height + "px" }); 1205 } 1206 1207 jQuery("map [name='mapAutosize'] area").mouseover(function (e) { 1189 jQuery("#map").width(Zone_image.image.width); 1190 jQuery("#map").css({ height: Zone_image.image.height + "px" }); 1191 1192 return true; 1193 } 1194 1195 jQuery("map [name='#Autosize'] area").mouseover(function (e) { 1208 1196 return; 1209 1197 }); 1198 //___ Set_Map ___ 1199 1210 1200 //===================================== 1211 1201 // 1212 1202 //===================================== 1213 theImage_init = function () { 1214 if (jQuery("#derivativeSwitchBox").length > 0) { 1215 var px = jQuery(".derivativeSizeDetails "); 1216 i = 0; 1217 n = 0; 1218 var pt = new Array(); 1219 jQuery("#derivativeSwitchBox a").each(function (i) { 1220 href_path = jQuery(this).attr("href"); 1221 if (href_path.match(RegExp("auto", "gi"))) return true; 1222 pt[i] = href_path.split("'"); 1223 }); 1203 Select_Image = function () { 1204 var pt = options.liste_type; 1205 if (pt.length > 0) { 1206 Save_container = Zone_image.container; 1224 1207 //===== calcul Image === 1225 1208 Calcul_Image(); 1226 tw = Zone_image.image.width; 1227 th = Zone_image.image.height; 1209 tw = Zone_image.image.width; // valeur maxi 1210 th = Zone_image.image.height; // valeur maxi 1228 1211 n = 0; 1229 1212 maxi_size = { w: tw, h: th, idx: -1 }; … … 1232 1215 size_encours = { w: tw, h: th }; 1233 1216 1234 jQuery( ".derivativeSizeDetails").each(function (i) {1235 vn = jQuery(this).text().replace("(", "").replace(")", "").split("x");1236 size_derive = { w: parseInt(vn[ 0]), h: parseInt(vn[1]) };1217 jQuery(pt).each(function (i) { 1218 vn = this; 1219 size_derive = { w: parseInt(vn[2]), h: parseInt(vn[3]) }; 1237 1220 if (size_derive.h > size_encours.h) { 1238 1221 if (maxi_size.idx < 0) { 1239 1222 maxi_size = size_derive; 1240 maxi_size.idx = n ;1223 maxi_size.idx = n + 1; 1241 1224 } 1242 1225 } … … 1248 1231 n++; 1249 1232 }); 1233 1234 1250 1235 // n = n - 1 ; 1251 1236 n = maxi_size.idx; … … 1253 1238 if (n > pt.length - 1) n = pt.length - 1; // format le plus grand 1254 1239 if (n < 0) n = pt.length - 1; // format le plus grand 1240 1255 1241 imgSrc = pt[n][1]; 1256 last_map = pt[n][5]; 1242 last_map = pt[n][0]; 1243 // if (Type_Img == "pamoorama") return; 1244 if (typeof Zone_image.src == "undefined") Zone_image.src = " "; 1257 1245 status = imgSrc.match(RegExp(Zone_image.src, "gi")); 1258 1246 status1 = (imgSrc.toString() == Zone_image.src.toString()); 1247 1259 1248 if (status1 == true) return; 1260 theImg = document.getElementById(theMainImage_ Id.replace("#", ""));1249 theImg = document.getElementById(theMainImage_id.replace("#", "")); 1261 1250 href_path = "javascript:changeImgSrc('" + imgSrc + "', '" + last_map + "', '" + "Autosize" + "')"; 1262 1251 jQuery("#linkAutosize").attr("href", href_path); 1263 if (theImg.useMap.match(RegExp("map", "gi"))) return true; 1264 if (theImg.src.match(RegExp(imgSrc, "gi"))) return true; 1265 changeImgSrc(imgSrc, last_map, "#Autosize"); 1266 Zone_image.zoom = Zone_image.image.height / Zone_image.height_init; 1252 if (theImg.tagName != "IMG") { 1253 theImg.useMap = "#Autosize"; 1254 imgSrc_i = jQuery(theImg).css("backgroundImage"); 1255 imgSrc_j = jQuery(theImg).css("background-image"); 1256 1257 } else { 1258 if (theImg.useMap.match(RegExp("map", "gi"))) return; 1259 if (theImg.src.match(RegExp(imgSrc, "gi"))) return; 1260 changeImgSrc(imgSrc, last_map, "#Autosize"); 1261 } 1267 1262 return true; 1268 1263 1269 1264 1270 var theImg = document.getElementById(theMainImage_Id.replace("#", ""));1265 theImg = document.getElementById(theMainImage_id.replace("#", "")); 1271 1266 if (init_img(theImg)) { 1272 1267 … … 1288 1283 * correction pamoorama 1289 1284 *************************************************/ 1290 Set_Pamoorama = function () { 1291 myPamoorama = window.myPamoorama; 1285 Set_Pamoorama = function (Format) { 1292 1286 if (Type_Img == "pamoorama") { 1293 1287 if (!Format) return; 1288 1289 myPamoorama = window.myPamoorama; 1294 1290 if (!nopano) { 1295 //theMainImage_Id = "#pamoorama";1296 1291 nopano = false; 1297 1292 Wait_pamoorama(); 1298 infos_theMainImage = jQuery(theMainImage_Id).infos(); 1299 //theMainImage_Id = "#pamoorama"; 1300 } 1301 1302 1293 } 1303 1294 if (typeof myPamoorama == "undefined") { 1304 1295 return; … … 1306 1297 //========================================================= 1307 1298 if (!nopano) { 1308 //theMainImage_Id = "#pamoorama";1309 1299 nopano = false; 1310 1300 Wait_pamoorama(); 1311 infos_theMainImage = jQuery(theMainImage_Id).infos(); 1312 //theMainImage_Id = "#pamoorama"; 1313 } 1314 1315 1316 1317 infos_pamoorama = jQuery("#pamoorama").infos(); 1318 infos_pamoorama_outter = jQuery("#pamoorama_outter").infos(); 1319 infos_pamoorama_inner = jQuery("#pamoorama_inner").infos(); 1320 infos_pamoorama_footer = jQuery("#pamoorama_footer").infos(); 1321 infos_pamoorama_frame = jQuery("#pamoorama_frame").infos(); 1322 infos_frame = jQuery(myPamoorama.frame).infos(); 1323 1324 1301 } 1302 1303 jQuery("#pamoorama").show(1000); 1304 jQuery("#loading").hide(1000); 1305 1306 Wait_pamoorama(); 1307 window.myPamoorama.stopAnim(); 1308 infos_theMainImage = jQuery("#pamoorama").infos(true); 1325 1309 //==================================================== 1326 1310 jQuery("#pamoorama").css({ … … 1329 1313 // height: Zone_Affichage.height + "px" , sinon déclenchement panorama sur la hauteur; 1330 1314 }); 1331 1315 //============================================================ 1316 infos_pamoorama = jQuery("#pamoorama").infos(true); 1317 infos_pamoorama_outter = jQuery("#pamoorama_outter").infos(); 1318 infos_pamoorama_inner = jQuery("#pamoorama_inner").infos(); 1319 infos_pamoorama_footer = jQuery("#pamoorama_footer").infos(); 1320 infos_pamoorama_frame = jQuery("#pamoorama_frame").infos(); 1321 1322 infos_frame = jQuery(myPamoorama.frame).infos(); 1332 1323 marges_w = infos_pamoorama.general.marges.width; 1333 1334 1324 marges_h = infos_pamoorama.general.marges.height; 1335 1325 marges_h += infos_pamoorama_footer.general.height; 1336 1337 1326 jQuery("#pamoorama").css({ 1338 1327 width: "" 1339 1328 }); 1340 1329 1341 outter_height = Zone_image.container.height - marges_h; 1342 Zoom_pano = outter_height / Zone_image.height_init; 1343 1344 new_image = { height: Math.ceil(Zone_image.height_init * Zoom_pano), 1345 width: Math.ceil(Zone_image.width_init * Zoom_pano) 1330 1331 outter_width = Format.width; 1332 pos = jQuery("#theImage").offset(); 1333 pos.top = infos_pamoorama.top; 1334 pos.left = infos_pamoorama.left; 1335 outter_height = Format.height - marges_h; 1336 /* 1337 jQuery("#theMainImage").width(outter_width); 1338 jQuery("#theMainImage").height(outter_height); 1339 jQuery("#theMainImage").css({ left: pos.left, top: pos.top, margin: "auto", border: "solid 1px red" 1340 1341 }); 1342 1343 */ 1344 1345 Zoom_pano = outter_height / Format.height; 1346 new_image = { height: Math.ceil(Format.height * Zoom_pano), 1347 width: Math.ceil(Format * Zoom_pano) 1346 1348 } 1347 1349 … … 1354 1356 1355 1357 //---------- test largeur image 1356 new_width = Zone_image.container.width;1358 new_width = Format.width; 1357 1359 if (new_width > new_image.width) { 1358 1360 new_width = new_image.width; … … 1377 1379 //============= Mise à l'echelle ================== 1378 1380 jQuery("#pamoorama_footer").css({ 1379 width: Zone_image.container.width + "px"1381 width: Format.width + "px" 1380 1382 }); 1381 1383 1382 window.myPamoorama.options.width = Math.ceil( Zone_image.container.width);1384 window.myPamoorama.options.width = Math.ceil(Format.width); 1383 1385 //================================================================== 1384 1386 new_max_left = new_image.width - outter_width; … … 1399 1401 // frame = Zone_image.container.width 1400 1402 1401 nw = (window.myPamoorama.image.width * Zone_image.container.width) / window.myPamoorama.imageWidth;1403 nw = (window.myPamoorama.image.width * Format.width) / window.myPamoorama.imageWidth; 1402 1404 jQuery("#pamoorama_frame").width(nw); 1403 1405 jQuery("#pamoorama").css({ 1404 1406 width: outter_width, height: "auto" 1405 1407 }); 1406 //infos_theMainImage.width; 1407 // infos_theMainImage.height; 1408 1409 jQuery("#theMainImage").width(infos_pamoorama_outter.width); 1410 jQuery("#theMainImage").height(infos_pamoorama_outter.height); 1411 jQuery("#theMainImage").css({ margin: "auto" 1412 1408 // jQuery("#theImage").trigger("Start_right"); 1409 jQuery("#theImage").height(Zone_image.container.height + 1); 1410 1411 jQuery("#theImage").css({ 1412 height: Zone_image.container.height 1413 1413 }); 1414 1414 1415 1416 return true 1415 1417 } // test img 1416 1418 } // Set_Pamoorama … … 1428 1430 //==================================== 1429 1431 Calcul_Image = function () { 1430 // theImageAndInfos(jaune) -> theImage(vert) -> [llgbo] -> theMainImage1431 // + infos_imageInfos(red)1432 infos_window = jQuery(window).infos();1433 infos_body = jQuery("body").infos(); // thePicturePage1434 infos_the_page = jQuery("#the_page").infos();1435 // theHeader1436 //1437 infos_menubar = jQuery("#menubar").infos();1438 infos_menubar_dl = jQuery("#menubar dl").infos();1439 infos_content = jQuery("#content").infos();1440 // imageHeaderBar1441 // imageToolBar imageInfoBar1442 infos_imageInfoBar = jQuery("#imageInfoBar").infos();1443 infos_imageToolBar = jQuery("#imageToolBar").infos();1444 //theImageAndTitle1445 infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();1446 if (infos_theImageAndInfos.width == 0)1447 infos_theImageAndInfos = jQuery("#theImageAndTitle").infos();1448 1432 1449 1433 /****************************************/ 1450 infos_theImage = jQuery(theImage_id).infos({ pos_absolute: true }); // conteneur 1451 infos_imageInfos = jQuery(imageInfos_id).infos({ pos_absolute: true }); // information 1452 infos_theMainImage = jQuery(theMainImage_Id).infos({ pos_absolute: true }); // Image 1434 infos_imageInfos = jQuery(imageInfos_id).infos(true); // information 1435 infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image 1453 1436 // commentContent 1454 1437 // copyright … … 1459 1442 1460 1443 container = { 1461 height: infos_window.height - pos_top,1462 width: infos_content.width1444 height: Zone_image.container.height, 1445 width: Zone_image.container.width 1463 1446 } 1464 1447 marge_left = options.marge_left; … … 1468 1451 1469 1452 //========================================================== 1470 if ( theme.match(RegExp("stripped", "gi"))) {1453 if (options.theme.match(RegExp("stripped", "gi"))) { 1471 1454 infos_the_page.margin.left = 20; //taille fleche 1472 1455 infos_the_page.margin.right = 20; … … 1474 1457 1475 1458 1476 if ( theme.match(RegExp("elegant", "gi"))) {1459 if (options.theme.match(RegExp("elegant", "gi"))) { 1477 1460 1478 1461 jQuery("#imageInfos").css({ position: "absolute", right: 0, top: 0 … … 1481 1464 // marge_right += infos_content.general.marges.right; 1482 1465 if (infos_imageInfos.visible == true) { 1483 marge_right += infos_imageInfos.general.width; ;1466 // marge_right += infos_imageInfos.general.width; ; 1484 1467 1485 1468 } else { … … 1487 1470 1488 1471 } 1489 1490 1491 } else if (theme.match(RegExp("stripped", "gi"))) { 1492 1493 } else if (theme.match(RegExp("simple", "gi"))) { 1494 if (infos_imageInfoBar.visible == true) { 1495 marge_right += infos_imageInfoBar.general.width; 1496 1497 } else { 1498 marge_right += 0; 1499 1500 } 1501 marge_left += 2; 1502 1503 } else if (theme.match(RegExp("OS", "gi"))) { 1504 1505 } else if (theme.match(RegExp("pur", "gi"))) { 1472 marge_right += 1; 1473 marge_left += 1; 1474 1475 } else if (options.theme.match(RegExp("stripped", "gi"))) { 1476 1477 } else if (options.theme.match(RegExp("simple", "gi"))) { 1478 1479 1480 1481 } else if (options.theme.match(RegExp("OS", "gi"))) { 1482 1483 } else if (options.theme.match(RegExp("pur", "gi"))) { 1506 1484 marge_right += 0; 1507 1485 // marge_right += 25; 1486 } else if (options.theme.match(RegExp("mont", "gi"))) { 1487 marge_right += 0; 1488 1489 // marge_right += 25; 1490 1508 1491 1509 1492 } else { 1510 // jQuery("#menuSwitcher").hide(); 1511 1512 margeLeft = infos_content.margin.left; 1513 if (infos_menubar_dl.visible == true) { 1514 margeLeft += infos_body.general.marges.width + infos_menubar.general.width; 1515 } 1516 else 1517 1518 margeLeft += infos_thePicturePage.general.marges.width; 1519 // container.width -= margeLeft; 1493 1520 1494 1521 1495 … … 1526 1500 //========== Format Image ============== 1527 1501 retrait_img.height = Math.ceil(options.marges_llgbo || 0) 1528 + Math.ceil(infos_theMainImage.exterieur.height - infos_theMainImage.height); 1502 + Math.ceil(infos_theMainImage.general.marges.height); 1503 retrait_img.height += 2; 1529 1504 //=============================================================== 1530 retrait_img.width = Math.ceil(infos_theMainImage. exterieur.width - infos_theMainImage.width); // borderwidth+padding1505 retrait_img.width = Math.ceil(infos_theMainImage.general.marges.width); // borderwidth+padding 1531 1506 retrait_img.width += Math.ceil(options.marges_llgbo || 0); 1532 retrait_img.width += 0;1507 retrait_img.width += 2; 1533 1508 1534 1509 //================== Limite Format Image ===================== 1535 1510 container.height_interne = container.height - marge_top - marge_bottom; 1536 1511 container.width_interne = container.width - marge_left - marge_right; 1537 1538 rapport = Zone_image.rapport_init;1539 if (Type_Img == "pamoorama") {1540 container.height_interne -= (marge_bottom + marge_top);1541 }1542 if (options.marges_llgbo > 0) {1543 // container.height_interne - = (marge_bottom);1544 }1545 1512 image_max = { 1546 1513 height: container.height_interne - retrait_img.height, … … 1552 1519 height_theMainImage = Math.ceil(image_max.height); 1553 1520 width_theMainImage = Math.ceil(image_max.width); 1521 1554 1522 if (Type_Img == "pamoorama") { 1555 1523 1556 1524 } else { 1557 height_theMainImage = Math.ceil(width_theMainImage / rapport); 1525 1526 height_theMainImage = Math.ceil(width_theMainImage / Zone_image.image_init.rapport); 1527 1558 1528 if (height_theMainImage > container.height_interne) { 1559 1529 image_max.height = container.height_interne; 1560 image_max.width = image_max.height * rapport;1530 image_max.width = image_max.height * Zone_image.image_init.rapport; 1561 1531 width_theMainImage = Math.ceil(image_max.width); 1562 1532 height_theMainImage = Math.ceil(image_max.height); … … 1564 1534 if (width_theMainImage > container.width_interne) { 1565 1535 image_max.width = container.width_interne; 1566 image_max.height = image_max. height /rapport;1536 image_max.height = image_max.width / Zone_image.image_init.rapport; 1567 1537 width_theMainImage = Math.ceil(image_max.width); 1568 1538 height_theMainImage = Math.ceil(image_max.height); … … 1573 1543 1574 1544 } 1575 height_theMainImage = Math.ceil(width_theMainImage / rapport); 1576 } 1577 //================================================= 1578 1579 1580 container.height = height_theMainImage + marge_bottom + marge_top; 1581 bottom = jQuery("#imageInfos").absoluteAll({ pos_absolute: true }).Bottom; 1582 ps = infos_imageInfos.left; 1583 ps1 = infos_theImage.left; 1584 if (ps > infos_theImage.right) 1585 container.height = Math.max(container.height, infos_imageInfos.general.bottom); 1586 1587 container.width = infos_content.width - marge_right - marge_left; 1588 1589 affiche_debug({ 1590 Debug3: Debug_info(3, "H:" + container.height + " img:" + height_theMainImage + " if " + infos_imageInfos.general.bottom, " ext:") 1591 }); 1592 1593 1545 1546 } 1594 1547 //================================================================ 1595 1548 Zone_image.image = { … … 1598 1551 }; 1599 1552 1600 Zone_image.container = { 1601 width: container.width, 1602 height: container.height 1603 1604 }; 1553 1605 1554 //================================================================= 1606 Zone_image.src = jQuery(theMainImage_Id).attr("src"); 1607 Zone_image.zoom = Zone_image.image.height / Zone_image.height_init; 1555 Zone_image.marges = { width: marge_left + marge_right + retrait_img.width, 1556 height: marge_top + marge_bottom + retrait_img.height 1557 1558 } 1559 Zone_image.src = jQuery(theMainImage_id).attr("src"); 1560 Zone_image.zoom = Zone_image.image.height / Zone_image.image_init.height; 1608 1561 } 1609 1562 1610 1563 /********************************************* 1611 * Calcul l 1564 * Calcul les dimensions. 1612 1565 *********************************************/ 1613 1566 Get_dimensions = function (force, parametres) { 1614 if ( theImage_init()) {1615 infos_theMainImage = jQuery(theMainImage_ Id).infos();1567 if (Select_Image()) { //+calcul 1568 infos_theMainImage = jQuery(theMainImage_id).infos(); 1616 1569 Zone_image.src = infos_theMainImage.src; 1617 1570 } 1618 infos_widow = jQuery(window).infos(); 1619 infos_body = jQuery("body").infos(); 1620 var winwidth = infos_body.width; 1621 var winheight = infos_body.height; 1622 1623 1624 if (typeof rapport == "undefined") return; 1571 1572 1573 if (typeof Zone_image.image_init.rapport == "undefined") return; 1625 1574 if (force && force == true) old_window.width = 0; 1626 1575 … … 1632 1581 1633 1582 1634 if (typeof useMap == "") useMap = " #Autosize";1583 if (typeof useMap == "") useMap = "Autosize"; 1635 1584 if (options.useMap) { 1636 1585 // useMap = options.useMap; … … 1658 1607 } 1659 1608 1660 //=================================================================1661 1609 Calcul_Image(); 1610 jQuery("#loading").hide(); 1662 1611 img_finale = { width: Zone_image.image.width, height: Zone_image.image.height }; 1663 //================================================================= 1664 old_window = jQuery(window).infos(); 1665 1612 r1 = Zone_image.image.width / Zone_image.image.height; 1666 1613 //================================================================= 1667 1614 switch (Type_Img) { 1668 1615 case "map": 1669 Set_Map(true);1616 if (Set_Map(true)) return false; 1670 1617 break 1671 1618 case "panorama": 1672 if (!theMainImage_Id) { 1673 theMainImage_Id = theMainImage_id; 1674 if (theMainImage_Id.length > 0) 1675 return; 1676 theMainImage_Id = jQuery().Get_Img_Maxi("#Panorama img[alt]"); 1677 1678 if (theMainImage_Id.length > 0) 1679 theMainImage_Id = theMainImage_Id[0]; 1680 else 1681 theMainImage_Id = jQuery().Get_Img_Maxi("#Panorama img[alt]"); 1619 if (!theMainImage_id) { 1620 1682 1621 } 1683 infos_theImage = jQuery(theMainImage_ Id).infos();1622 infos_theImage = jQuery(theMainImage_id).infos(); 1684 1623 infos_the_page = jQuery("#the_page").infos(); 1685 jQuery("#theImage").height(infos_theImage.height);1686 1624 img_finale.height = infos_theImage.height; 1687 1625 break 1688 1626 case "img": 1689 1627 1690 if (!theMainImage_Id) return; 1691 if (theme.match(RegExp("luciano", "g"))) { 1692 1693 } 1694 1695 infos_the_page = jQuery("#the_page").infos(); 1628 1629 1696 1630 1697 1631 1698 1632 break 1699 1633 case "img_autre": 1700 if (!theMainImage_ Id) {1634 if (!theMainImage_id) { 1701 1635 if (DEBUG_autosize == "true") alert("The_MainImage=null"); 1702 1636 return; 1703 1637 1704 1638 } 1705 infos_theImage = jQuery(theMainImage_Id).infos(); 1639 1706 1640 infos_the_page = jQuery("#the_page").infos(); 1707 1641 … … 1714 1648 if (infos_theMainImage.width == 0) 1715 1649 infos_theMainImage = jQuery("#the_page").infos(); 1716 infos_theImage = infos_theMainImage; 1650 1717 1651 infos_the_page = jQuery("#the_page").infos(); 1718 1652 Bandeau_bas.height = Bandeau_bas.top; … … 1735 1669 case "charlie": 1736 1670 img_reelle = { height: img_height, width: img_width }; 1737 infos_theMainImage = jQuery(theMainImage_ Id).infos(); ;1671 infos_theMainImage = jQuery(theMainImage_id).infos(); ; 1738 1672 infos_the_page = jQuery("#the_page").infos(); 1739 1673 if (rapport < 0) { … … 1749 1683 1750 1684 /* 1751 infos_theImage = jQuery("#pamoorama_outter").infos(); 1752 infos_theImage.height = infos_theImage.height; 1685 1753 1686 infos_the_page = jQuery("#the_page").infos(); 1754 1687 */ … … 1760 1693 1761 1694 //================= Vérification Taille image minimun autorisée ======== 1762 MinWidth = jQuery(theMainImage_Id).css("minWidth"); 1763 if (MinWidth == "0px") 1764 MinWidth = options.mini_width; 1765 MinHeight = jQuery(theMainImage_Id).css("minHeight"); 1766 if (MinHeight == "0px") 1767 MinHeight = options.mini_height; 1768 1769 MaxWidth = jQuery(theMainImage_Id).css("maxWidth"); 1770 if (MaxWidth == "0px") 1771 MaxWidth = winwidth; 1772 MaxHeight = jQuery(theMainImage_Id).css("maxHeight"); 1773 if (MaxHeight == "0px") 1774 MaxHeight = winheight; 1775 1776 //=============== Vérification taille minimale autorizée ====================== 1777 var miniWidth = jQuery(theMainImage_Id).Get_Val_int(MinWidth, options.mini_width); 1778 var miniHeight = jQuery(theMainImage_Id).Get_Val_int(MinHeight, options.mini_height); 1779 if (winwidth < options.mini_width2) mini_width2 = winwidth; 1780 1781 var miniWidth2 = jQuery(theMainImage_Id).Get_Val_int(MinWidth, options.mini_width2); 1782 var miniHeight2 = jQuery(theMainImage_Id).Get_Val_int(MinHeight, options.mini_height2); 1783 1784 1785 var maxWidth = jQuery(theMainImage_Id).Get_Val_int(MaxWidth, winwidth, "0"); 1786 maxHeight = jQuery(theMainImage_Id).Get_Val_int(MaxHeight, winheight, "0"); 1787 1788 mini_width = parseInt(miniWidth); 1789 mini_height = parseInt(miniHeight); 1790 img_reelle.width = parseInt(img_reelle.width); 1791 if (img_reelle.width < mini_width) 1792 return; 1793 img_reelle.height = parseInt(img_reelle.height); 1794 if (img_reelle.height < parseInt(mini_height)) 1795 return; 1796 1797 1798 1695 if ((Zone_image.image.height < options.mini_height) || (Zone_image.image.width < options.mini_width)) { 1696 Zone_image.image.width = Math.ceil(Zone_image.width_init); 1697 Zone_image.image.height = Math.ceil(Zone_image.image.width / Zone_image.image_init.rapport); 1698 } 1799 1699 1800 1700 //================================================= 1801 if (Zone_image.image.height < options.mini_height2) 1802 Zone_image.image.height = options.mini_height2; 1803 if (Zone_image.image.width < options.mini_width2) 1804 Zone_image.image.width = options.mini_width2; 1701 if (Zone_image.image.height < options.mini_height2) { 1702 Zone_image.image.height = parseInt(options.mini_height2); 1703 Zone_image.image.width = Math.ceil(Zone_image.image.height * Zone_image.image_init.rapport); 1704 } 1705 if (Zone_image.image.width < options.mini_width2) { 1706 Zone_image.image.width = parseInt(options.mini_width2); 1707 Zone_image.image.height = Math.ceil(Zone_image.image.width / Zone_image.image_init.rapport); 1708 } 1805 1709 //================================================== 1806 // Image _width largeur à atteindre1710 // ImageWidthidth largeur à atteindre 1807 1711 // Calcul du rapport d'agrandissement 1808 1712 if (Type_Img != "pamoorama") { 1809 1713 echelle_max = parseFloat(options.echelle_max, '3'); 1810 1714 if (Zone_image.zoom > 1) { 1811 theImage_init();1715 Select_Image(); //+calcul 1812 1716 } 1813 1717 if (Zone_image.zoom > echelle_max) { 1814 1718 Zone_image.zoom = echelle_max; 1815 1719 Zone_image.image.width = parseInt(Zone_image.width_init * Zone_image.zoom); 1816 if (rapport > 0) 1817 Zone_image.image.height = parseInt(Zone_image.width_init / rapport); 1818 } 1819 } 1720 if (Zone_image.image_init.rapport > 0) 1721 Zone_image.image.height = parseInt(Zone_image.width_init / Zone_image.image_init.rapport); 1722 } 1723 } 1724 mxi = Math.ceil(Zone_image.image.height + Zone_image.marges.height); 1725 1726 Zone_image.container.height = Math.max(Zone_image.container.height, mxi); 1820 1727 img_finale = { width: Zone_image.image.width, height: Zone_image.image.height }; 1821 1728 return true; 1822 1823 1824 1825 1826 1827 1828 1829 //=================================================== 1830 1831 img_finale.height = Image_height; 1832 img_finale.width = Image_width; 1833 if (theme.match(RegExp("stripped", "gi"))) { 1834 img_finale.width -= (llgboframe.top * 2); 1835 if (rapport > 0) img_finale.height = (img_finale.width / rapport); 1836 else img_finale.height -= (llgboframe.top * 2); 1837 1838 } 1839 zoom = echelle; 1840 if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) { 1841 //=============LLGBO2 =========================== 1842 t1 = llgboframe; 1843 if (!theMainImage_Id.src) { 1844 theMainImage_Id = jQuery(llgbo_id).find("img").get(0) 1845 if (!theMainImage_Id.src) { 1846 theMainImage_Id = jQuery("#theImage").find("div").get(0) 1847 } 1848 } 1849 if (theMainImage_Id.src) { 1850 wingbo = img_finale.width; 1851 heightgbo = img_finale.height; 1852 if (Type_Img == "panorama") { 1853 heightgbo = infos_theImage.height; 1854 img_finale.height = infos_theImage.height; 1855 } 1856 1857 1858 1859 1860 // jQuery("#theImage").height(heightgbo + marges_llgbo / 2); 1861 } 1862 } 1863 1864 //================ Zone affichage ========================= 1865 1866 // jQuery("#theImage").css("top", "0px"); 1867 jQuery("#standard").css("top", 0 + "px"); 1868 jQuery("#comments").css("top", 0 + "px"); 1869 //========== Image Remise à l'échelle ======================= 1870 1871 img_finale.height = parseInt(img_finale.height); 1872 img_finale.width = parseInt(img_finale.width); 1873 //========================================================================= 1874 //=== cadre = theImage 1875 if (theme.match(RegExp("simple", "gi"))) { 1876 jQuery("#theImage").width(Zone_Affichage.width); //centrer simple black 1877 jQuery("#theImage").css({ width: Zone_Affichage.width + "px", 1878 marginLeft: "auto" 1879 }); 1880 1881 } else if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) { 1882 jQuery("#theImage").css({ width: "auto", marginLeft: "auto" }); 1883 } else if (theme.match(RegExp("saruka", "gi"))) { 1884 1885 jQuery("#theImage").css({ width: Zone_Affichage.width + "px" }); 1886 } else if (theme.match(RegExp("elegant", "gi"))) { 1887 1888 // jQuery("#theImage").css("width", "auto"); 1889 jQuery("#theImage").css({ height: Zone_Affichage.height + "px", width: "auto" }); //conteneur 1890 1891 } else { 1892 jQuery("#theImage").css("width", "auto"); 1893 1894 } 1895 // ; 1896 1897 if (Type_Img == "panorama" || Type_Img == "pamoorama") { 1898 img_finale.height = infos_theImage.height; 1899 Zone_Affichage.height = img_finale.height; 1900 1901 } 1902 1903 if (typeof (gmaps) != "undefined") { 1904 Gmap_ = gmaps.maps[0]; 1905 if (Gmap_.sizeMode == 'A') { 1906 jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" }); 1907 1908 } 1909 } 1910 //============= flv,mov,mpg ok 1911 /* wmv nok 1912 * avi nok 1913 //=========================================== 1914 */ 1915 if (Type_Img == "charlie") { 1916 t1 = jQuery("#charlie").infos(); 1917 1918 /**/ 1919 1920 pdf = 0; 1921 jQuery("#charlie div").each(function (i) { 1922 1923 1924 p1 = jQuery(this).infos(); 1925 pdf += p1.padding.right + p1.padding.left; 1926 }); 1927 img_finale.width -= pdf; 1928 1929 jQuery("#charlie").css({ 1930 width: img_finale.width + pdf + "px", 1931 height: img_finale.height + "px", 1932 marginLeft: "auto" 1933 }); 1934 1935 1936 if (MainImage.length > 0) { 1937 img_finale.height = parseInt(img_finale.width / rapport); 1938 img_finale.height -= 30; 1939 img_finale.width = rapport * img_finale.height; 1940 1941 1942 MainImage.width(img_finale.width); 1943 MainImage.height(img_finale.height); 1944 jQuery("#embedplayer").width(300); 1945 jQuery("#embedplayer").height(15); 1946 } else { 1947 jQuery("#player").css("width", img_finale.width + "px"); 1948 jQuery("#player").css("height", img_finale.height + "px"); 1949 1950 jQuery("#embedplayer").css("width", img_finale.width + "px"); 1951 jQuery("#embedplayer").css("height", img_finale.height + "px"); 1952 1953 jQuery("embed").css({ width: img_finale.width + "px", 1954 height: img_finale.height + "px" 1955 }); 1956 jQuery("object").css({ width: img_finale.width + "px", 1957 height: img_finale.height + "px" 1958 }); 1959 jQuery("video").css({ width: img_finale.width + "px", 1960 height: img_finale.height + "px" 1961 }); 1962 1963 1964 1965 jQuery("video").height(img_finale.height); 1966 jQuery("video").width(img_finale.width); 1967 1968 jQuery("object").width(img_finale.width); 1969 jQuery("object").height(img_finale.height); 1970 //jQuery("#theImage").height(img_finale.height + Bandeau_bas.height); //?? 1971 1972 jQuery(theMainImage_Id).height(img_finale.height); 1973 jQuery("#theImage").css("height", "auto"); 1974 } 1975 1976 1977 } else if (Type_Img == "embed") { 1978 1979 if (MainImage.length > 0) { 1980 img_finale.height = parseInt(img_finale.width / rapport); 1981 img_finale.height -= 30; 1982 img_finale.width = rapport * img_finale.height; 1983 1984 1985 MainImage.width(img_finale.width); 1986 MainImage.height(img_finale.height); 1987 jQuery("#embedplayer").width(300); 1988 jQuery("#embedplayer").height(15); 1989 } else { 1990 jQuery("#theImage").css("height", "auto"); 1991 jQuery("embed").css("height", img_finale.height); 1992 jQuery("object").css({ height: img_finale.height + "px" }); 1993 1994 jQuery("object").width(img_finale.width); 1995 jQuery("object").height(img_finale.height); 1996 } 1997 1998 } else if (Type_Img == "panorama") { 1999 if (typeof asp_options != "undefined") 2000 n = asp_options; 2001 n1 = jQuery("#Panorama div").width(); 2002 jQuery(".panorama-viewport").css("margin", "auto"); 2003 n = infos_imageToolBar; 2004 2005 2006 } else if (Type_Img == "pamoorama") { 2007 Set_Pamoorama(); 2008 2009 2010 2011 2012 } else if (theMainImage_Id != null && theMainImage_Id.src) { 2013 //--- background ?? --- 2014 jQuery(theMainImage_Id).height(img_finale.height); 2015 jQuery(theMainImage_Id).width(img_finale.width); 2016 jQuery(theMainImage_Id).css({ height: img_finale.height + "px ", 2017 width: img_finale.width + "px " 2018 }); 2019 2020 2021 } else { 2022 //===map ? luciano === 2023 // jQuery(theMainImage_Id).css({ height: img_finale.height + "px ", width: img_finale.width + "px }); 2024 // jQuery(theMainImage_Id).height(img_finale.height ); 2025 // jQuery(theMainImage_Id).width(img_finale.width ); 2026 // jQuery(theMainImage_Id).attr({ width: img_finale.width }); 2027 h = img_finale.height; 2028 h = Zone_Affichage.height - Zone_Affichage.borderwidth.top - Zone_Affichage.borderwidth.bottom; 2029 h -= (infos_theImage.borderwidth.bottom + infos_theImage.borderwidth.top); 2030 2031 jQuery(theMainImage_Id).attr({ height: h - 3 }); //image 2032 if (theme.match(RegExp("elegant", "gi"))) { 2033 return true; 2034 2035 } 2036 if (theme.match(RegExp("luciano", "g"))) { 2037 imgl = 180; 2038 l = Zone_Affichage.left; 2039 2040 jQuery(".imageNumber").css({ left: l + "px" 2041 2042 }); 2043 jQuery("#theImage" + " #theImg IMG").css({ height: img_finale.height + "px ", 2044 width: (img_finale.width - imgl) + "px ", marginTop: "0px" 2045 }) 2046 } 2047 2048 } 2049 2050 var theImg = document.getElementById(theMainImage_Id.replace("#", "")); 2051 if (theImg) { 2052 theImg.removeAttribute("width"); 2053 theImg.removeAttribute("height"); 2054 jQuery(theMainImage_Id).css("width", img_finale.width + "px"); 2055 } 2056 2057 jQuery("#navThumbPrev").css({ overflow: "hidden" }); 2058 jQuery("#navThumbNext").css({ overflow: "hidden" }); 2059 n = typeof inittoolbar; 2060 if (Type_Img == "map") { 2061 jQuery("#navThumbNext").css({ display: 'none' }); 2062 jQuery("#navThumbPrev").css({ display: 'none' }); 2063 jQuery("#theImage").css({ marginTop: infos_imageToolBar.height + "px", marginLeft: "0px", 2064 width: winwidth + "px", 2065 height: winheight + "px" 2066 }); 2067 //mapPicture 2068 } 2069 try { 2070 if (theme.match(RegExp("gally", "gi"))) { 2071 if (typeof inittoolbar == "function") { 2072 if (typeof (currentTab) == "undefined") inittoolbar(); 2073 else initializeImageMode("resize"); 2074 } else { 2075 tp = gallyPP.getImageProp(); 2076 if (typeof (GallyPP) == "function") 2077 gallyPP = new GallyPP(); 2078 2079 iph = jQuery("#imageHeaderBar").infos(); 2080 jQuery("#imageToolBar").css({ top: iph.bottom + "px", position: "absolute" }); 2081 jQuery("#theImage").width(winwidth); 2082 } 2083 //=========================================================================== 2084 if (jQuery("#navThumbPrev").length > 0) { 2085 jQuery("#navThumbPrevContainer").css({ left: "0px" 2086 }); 2087 } 2088 if (jQuery("#navThumbNext").length > 0) { 2089 jQuery("#navThumbNextContainer").css({ left: "0px" 2090 }); 2091 } 2092 //============================================================================= 2093 if (!theme.match(RegExp("lapis", "gi"))) { 2094 if (typeof initializeImageMode == "function") { 2095 initializeImageMode("resize"); 2096 } 2097 2098 } 2099 2100 } else if (theme.match(RegExp("simple", "g"))) { 2101 2102 jQuery("#imageToolBar").css({ position: "static" }); 2103 2104 infos_imageInfoBar = jQuery("#imageInfoBar").infos(); 2105 if (infos_imageInfoBar.bottom < infos_theMainImage.bottom) { 2106 // jQuery("#imageInfoBar").height(infos_theMainImage.bottom); 2107 } 2108 2109 } else { 2110 2111 // jQuery("#imageToolBar").css("position", "static"); 2112 } 2113 } catch (e) { 2114 2115 } 2116 zoom = img_finale.height / img_height; 2117 h0 = jQuery("#content").height(); 2118 if (h0 == null) { 2119 h0 = winheight - Zone_Affichage.top; 2120 } 2121 h1 = (h0 - img_finale.height) / 2; 2122 // jQuery("#theImage").css({ marginTop: h1 + "px" }); 2123 2124 zoom = parseInt(zoom * 100); 2125 jQuery('#zoom ').val(zoom); 2126 2127 2128 2129 // --- réglage de la hauteur de page en fonction du copyright----------- 2130 infos_copyright = jQuery("#copyright").infos(); 2131 2132 if (theme.match(RegExp("stripped", "gi"))) { 2133 var TitleBox = jQuery("#imageTitleContainer"); 2134 if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px"); 2135 } else { 2136 2137 } 2138 2139 2140 /* 2141 if (!theme.match(RegExp("luciano", "gi"))) { 2142 jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" }); 2143 jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" }); 2144 jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); 2145 } 2146 */ 2147 infos_frame = jQuery("#theImage").infos(); 2148 if (theme.match(RegExp("stripped", "gi"))) { 2149 /* 2150 infos_theImageBox = jQuery("#theImageAndTitle").infos(); 2151 p1 = jQuery(".randomButtons").infos(); 2152 p2 = jQuery("#imageHeaderBar").infos(); 2153 p3 = infos_content.top; 2154 p1 = options.imageAutosizeTitle; 2155 2156 jQuery("#theImage").width("width", infos_theImageBox.width + "px"); 2157 //jQuery("#theImageAndTitle").css("position", "relative"); 2158 jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px", 2159 paddingTop: "0px", textAalign: "center", marginLeft: "auto" 2160 }); 2161 2162 jQuery("#theImageAndTitle").css({ position: "relative", top: "0px", marginTop: "0px", 2163 paddingTop: "0px", marginLeft: "auto" 2164 }); */ 2165 t1 = infos_theImageBox.top; 2166 l1 = infos_theImageBox.left; 2167 // infos_theImageBox = jQuery("#theImage").infos(); 2168 2169 } else { 2170 2171 t1 = infos_frame.top; 2172 l1 = infos_frame.left; 2173 infos_theImageBox = jQuery("#theImage").infos(); //theImage 2174 } 2175 infos_theImageBox.margin.margin = infos_frame.margin.margin; 2176 infos_theImageBox.top = t1; 2177 infos_theImageBox.left = l1; 2178 // infos_theImageBox.position = "absolute"; 2179 2180 Window_Affichage = infos_theImageBox; 2181 if (DEBUG_autosize == "_true") { 2182 // jQuery("#theImage").css("border", "solid green"); 2183 2184 jQuery("#Debug5").css({ background: "red", 2185 position: "absolute", 2186 border: "green solid 2px", 2187 textAlign: align_auto, 2188 margin: "auto", 2189 top: Window_Affichage.top + "px", 2190 left: Window_Affichage.left + "px", 2191 width: Window_Affichage.width + "px", 2192 height: Window_Affichage.height + "px" 2193 }); //red 2194 jQuery("#Debug4").css({ top: infos_frame.bottom - infos_description.height + "px" }); //green 2195 } 2196 2197 //Wait_Affichage(); 2198 2199 return true; 2200 } // Get_dimensions 2201 2202 2203 var infos_theMainImage = jQuery(theMainImage_Id).infos(); // Image 2204 2205 if (infos_theMainImage.width == 0) { 2206 if (Type_Img == "pamoorama") { 2207 infos_theMainImage.id = "#theMainImage"; 2208 2209 } else { 2210 infos_theMainImage = jQuery("#theImage img").infos(); 2211 2212 } 2213 if (infos_theMainImage.id == "") 2214 jQuery("#theImage img").attr("id", "theMainImage"); 2215 infos_theMainImage = jQuery(theMainImage_Id).infos(); 2216 } 2217 2218 2219 2220 2221 var type_size = cookies.typeSave; // xxx 2222 var useMap = cookies.pictureMap; // #mapxxx 2223 2224 var user_status = options.user_status; 2225 var type_size_maxi = eval("options." + user_status + "_type"); //limite taille 2226 1729 } 1730 //________________ Get_dimensions ___________________ 1731 1732 1733 /***************************** 1734 * init_gen 1735 *****************************/ 2227 1736 2228 1737 init_gen = function (e) { 2229 2230 //============= Gestion Maps ================ 2231 nom_map = "Autosize"; 2232 a_up = jQuery("map[name='" + nom_map + "'] area[rel=up]"); 2233 a_prev = jQuery("map[name='" + nom_map + "'] area[rel=prev]"); 2234 a_next = jQuery("map[name='" + nom_map + "'] area[rel=next]"); 2235 2236 new_html = '<map name="Autosize" >'; 2237 2238 2239 nb_zone = jQuery("div .navigationButtons a").length; 2240 2241 Largeur_zone = (infos_theMainImage.width / nb_zone); 2242 Hauteur_zone = (infos_theMainImage.height); 2243 init_zone = 0; 2244 j = 0; 2245 jQuery("div .navigationButtons a").each(function (e) { 2246 Hauteur_zone = (infos_theMainImage.height); 2247 title = jQuery(this).attr("title"); 2248 h_ref = jQuery(this).attr("href"); 2249 init_zone = Largeur_zone * j; 2250 if (title.match(":")) { 2251 if (j == 0) 2252 rel = "prev"; 2253 else 2254 rel = "next"; 2255 } else { 2256 rel = "up"; 2257 Hauteur_zone = Hauteur_zone / 4; 2258 } 2259 coord = init_zone + "," + 0 + "," + Math.ceil(init_zone + Largeur_zone) + "," + Hauteur_zone; 2260 new_html += '<area rel="' + rel + '" title="' + title + '" href="' + h_ref + '" shape="rect" coords="' + coord + '" alt="' + title + '" />'; 2261 2262 j++; 2263 }); 2264 new_html += '</map>'; 2265 jQuery("#theImage map:last").after(new_html); 1738 theImg = document.getElementById(theMainImage_id.replace("#", "")); 2266 1739 //================================================== 2267 1740 marges_llgbo = 0; … … 2290 1763 infos_llgbo.top = pAll.Top; 2291 1764 infos_llgbo.bottom = pAll.Bottom; 2292 pAll = jQuery(theMainImage_ Id).absoluteAll({ pos_absolute: true });1765 pAll = jQuery(theMainImage_id).absoluteAll({ pos_absolute: true }); 2293 1766 pos_top = pAll.Top; ; 2294 1767 pos_bottom = pAll.Bottom; ; … … 2301 1774 pos_top = infos_theImageAndInfos.top; 2302 1775 2303 2304 1776 options.pos_top = pos_top; 2305 2306 1777 options.marge_left = infos_theImage.general.marges.left + Math.ceil(options.marge_gauche); 2307 1778 options.marge_right = infos_theImage.general.marges.right + Math.ceil(options.marge_droite); 2308 1779 options.marge_top += infos_theImage.general.marges.top + infos_content.general.marges.top + Math.ceil(options.marge_haute); 2309 1780 options.marge_bottom = Math.ceil(options.marge_basse); // +infos_content.general.marges.bottom; ; 2310 2311 old_window = { width: 0, height: 0 };2312 2313 1781 2314 1782 //=================== Gestion liste photos size ============================ … … 2353 1821 last_map = pt[us][5]; // taille selectionné. 2354 1822 href_path = "javascript:changeImgSrc('" + imgSrc + "', '" + last_map + "', '" + "Autosize" + "')"; 2355 2356 2357 2358 1823 new_html = '<br /><span class="switchCheck" id="derivativeCheckedAutosize" style="visibility:visible" >✔ </span>'; 2359 1824 new_html += '<a id="linkAutosize" href="' + href_path + '">'; … … 2369 1834 useMap = last_map; 2370 1835 } 2371 2372 2373 2374 1836 2375 1837 typeSave = cookies.typeSave; //picturederiv xxx … … 2387 1849 last_map = type_size_maxi; 2388 1850 href_path = ""; 2389 2390 } 2391 affiche_debug({ 2392 Debug1: Debug_info(1, href_path, "href_path:"), 2393 Debug4: Debug_info(4, "img:" + imgSrc + " last_map: " + last_map + " maxi:" + type_size_maxi, "Init:") 2394 }); 2395 2396 2397 }; //init_gen 2398 init_gen(); 2399 2400 2401 }); // ready 2402 2403 //=============================================================== 2404 // Fonctions générales 2405 //=============================================================== 2406 /****************************************** 2407 * 2408 ******************************************/ 2409 Save_cookies = function (parametres) { 2410 if (parametres.typeSave) document.cookie = 'picture_deriv=' + parametres.typeSave + ';path="' + "/" + '" '; 2411 if (parametres.typeSave) jQuery.cookie('picture_deriv', parametres.typeSave, { path: "/" }); 2412 if (parametres.pictureMap) jQuery.cookie('picture_map', parametres.pictureMap, { path: "/" }); 2413 if (parametres.imgSrc) jQuery.cookie('img', parametres.imgSrc, { path: "/" }); 2414 2415 if (parametres.imgHeight) jQuery.cookie('img_h', infos_theMainImage.height, { path: "/" }); 2416 if (parametres.imgWidth) jQuery.cookie('img_w', infos_theMainImage.width, { path: "/" }); 2417 if (parametres.windowHeight) jQuery.cookie('window_height', Window_Affichage.height, { path: "/" }); 2418 if (parametres.windowWidth) jQuery.cookie('window_width', Window_Affichage.width, { path: "/" }); 2419 } 2420 2421 Get_cookies = function () { 2422 parametres = { 2423 typeSave: jQuery.cookie('picture_deriv'), 2424 pictureMap: jQuery.cookie('picture_map'), 2425 imgSrc: jQuery.cookie('img'), 2426 2427 imgHeight: jQuery.cookie('img_h'), 2428 imgWidth: jQuery.cookie('img_w'), 2429 windowHeight: jQuery.cookie('window_height'), 2430 windowWidth: jQuery.cookie('window_width') 2431 } 2432 return parametres; 2433 } 2434 2435 2436 /************************************************* 2437 * Recuoère le Type d'mage 2438 *************************************************/ 2439 Get_type_img = function (e) { 2440 //====== détection du type d'images ====== 2441 if (jQuery("#charlie").length > 0) { 2442 Type_Img = "charlie"; 2443 } else if (jQuery("#Panorama").length) { 2444 Type_Img = "panorama"; 2445 } else if (jQuery("#pamoorama").length) { 2446 Type_Img = "pamoorama"; 2447 } else if (jQuery("#map").length) { 2448 Type_Img = "map"; 2449 } else if (jQuery("#Panorama").length) { 2450 Type_Img = "panorama"; 2451 } else if ((jQuery("#theImage" + " iframe").length + jQuery("#theImage" + " object").length + jQuery("#theImage" + " embed").length) > 0) { 2452 2453 if (jQuery("#theImage" + " object").length > 0) { 2454 2455 type_src = "object"; 2456 2457 } else if (jQuery("#theImage" + " embed").length > 0) { 2458 2459 type_src = "embed"; 2460 1851 } 1852 }; 1853 //_______________________ init_gen _______________________ 1854 1855 //============= Gestion Maps ================ 1856 nom_map = "Autosize"; 1857 a_up = jQuery("map[name='" + nom_map + "'] area[rel=up]"); 1858 a_prev = jQuery("map[name='" + nom_map + "'] area[rel=prev]"); 1859 a_next = jQuery("map[name='" + nom_map + "'] area[rel=next]"); 1860 new_html = '<map name="' + nom_map + '" >'; 1861 nb_zone = jQuery("div .navigationButtons a").length; 1862 Largeur_zone = (jQuery("#theMainImage").width() / nb_zone); 1863 Hauteur_zone = jQuery("#theMainImage").height(); 1864 init_zone = 0; 1865 j = 0; 1866 jQuery("div .navigationButtons a").each(function (e) { 1867 Hauteur_zone = jQuery("#theMainImage").height(); 1868 title = jQuery(this).attr("title"); 1869 h_ref = jQuery(this).attr("href"); 1870 init_zone = Largeur_zone * j; 1871 if (title.match(":")) { 1872 if (j == 0) 1873 rel = "prev"; 1874 else 1875 rel = "next"; 2461 1876 } else { 2462 2463 type_src = "iframe"; 2464 } 2465 nbf = jQuery("#theImage" + " " + type_src).length; 2466 frm1 = jQuery("#theImage" + " " + type_src).get(0); 2467 Type_Img = "charlie"; 2468 2469 //'fb - xfbml - like - button 2470 2471 objs = jQuery("#theImage" + " div").get(0); 2472 if (jQuery(objs).length > 0) { 2473 id_0 = jQuery(objs).attr("id"); 2474 if (id_0 == "") { 2475 jQuery(objs).attr("id", "charlie"); 2476 } else { 2477 if (nbf > 1) { 2478 jQuery(frm1).attr("id", "charlie"); 2479 } else { 2480 Type_Img = "img"; 2481 } 2482 } 2483 } else { 2484 jQuery(frm1).attr("id", "charlie"); 2485 } 2486 2487 2488 } else if (jQuery("#theImage").find("img").length > 0) { 2489 Type_Img = "img"; 2490 } else if (jQuery("#theImage" + "Box").find("img").length > 0) { 2491 Type_Img = "img"; 2492 Parent = Parent + "Box"; 2493 } else if (jQuery("img").length > 0) { 2494 Type_Img = "img_autre"; 2495 return; 2496 } else { 2497 return; 2498 } 2499 } 2500 2501 //==================================== 2502 // 2503 //==================================== 2504 set_cl = function (Valid) { 2505 if (typeof Valid == "undefined") Valid = options.useMap.match(RegExp("Autosize", "gi")) || false; 2506 if (typeof options.cl_visible == "undefined") return; 2507 if (typeof src1 == "undefined") return; 2508 2509 if (options.cl_visible) src = src1; 2510 else src = src2; 2511 2512 if (options.cl_visible) { 2513 src_info = src3; 2514 src_infos_1 = src3; 2515 } else { 2516 src_info = src4; 2517 src_infos_1 = src5; 2518 } 2519 2520 if ((typeof Zone_image != "undefined") && typeof Zone_image.image != "undefined" && Valid) { 2521 Zone_image.zoom = (Zone_image.image.height / Zone_image.height_init); 2522 zoom_cl = parseInt(100 * Zone_image.zoom); 2523 jQuery('#zoom ').val(zoom_cl); 2524 2525 zoom_cl = jQuery('#zoom ').val(); 2526 2527 jQuery('#bp_cla').attr('alt', src_info); 2528 jQuery('#bp_cla').attr('title', src_info); 2529 jQuery('#bp_cla').attr('Stitle', src_info); 2530 jQuery('#bp_cla').attr('Stip', zoom_cl + "%"); 2531 jQuery('#bp_cla span').text(zoom_cl + "%"); 2532 color_back = jQuery('#imageToolBar').css("backgroundColor"); 2533 if (color_back.match(new RegExp("rgb", "gi"))) { 2534 color_back = color_back.split("(")[1].split(")")[0].split(","); 2535 color_back = "rgb(" + Math.abs(255 - color_back[0]) + "," 2536 + Math.abs(255 - color_back[1]) + "," 2537 + Math.abs(255 - color_back[2]) + ")"; 2538 } 2539 else if (color_back.match(new RegExp("#", "gi"))) 2540 color_back = Math.abs("#65536" - color_back); 2541 else 2542 color_back = jQuery('body').css("color"); 2543 jQuery('#bp_cla span').css("color", color_back); 2544 jQuery('#auto_details').text(" (" + Zone_image.image.width + " x " + Zone_image.image.height + ")"); 2545 2546 //=============================================== 2547 } else { 2548 src = src6; 2549 jQuery('#auto_details').text(""); 2550 } 2551 bp_scr = jQuery('#bp_img_cla'); 2552 if (bp_scr.length > 0) { 2553 src_enc = bp_scr.attr("src"); 2554 if (!src_enc.match(src)) { 2555 bp_scr.get(0).src = src; 2556 jQuery('#bp_img_cla').attr('alt', src_info); 2557 jQuery('#bp_img_cla').attr('title', src_info); 2558 } 2559 } 2560 2561 } 2562 /******************************** 2563 * 2564 *********************************/ 2565 2566 Set_llbgo = function (Force) { 2567 if (Type_Img == "pamoorama") { 2568 2569 } 2570 if (Force) 2571 if (typeof LlgboFr_Resize == "function") { 2572 2573 LlgboFr_Resize(); 2574 } 2575 2576 2577 // if (typeof updateXY != "function") return; 2578 maps = jQuery("map[name^='map']"); 2579 maps = jQuery("map[name='Autosize']"); 2580 if (maps.length == 0) return; 2581 2582 nom_map = 'Autosize'; 2583 // nom_map = maps[0].name; 2584 maps = jQuery("map[name='" + nom_map + "'] area"); 2585 2586 2587 nb_zone = maps.length; 2588 2589 infos_theMainImage = jQuery(theMainImage_Id).infos(); // Image 2590 var Largeur_zone = (infos_theMainImage.width / nb_zone); 2591 var Hauteur_zone = (infos_theMainImage.height); 2592 var init_zone = 0; 2593 j = 0; 2594 maps.each(function (e) { 2595 init_zone = Largeur_zone * j; 2596 rel = jQuery(this).attr("rel"); 2597 title = jQuery(this).attr("title"); 2598 alt = jQuery(this).attr("alt"); 2599 H = Hauteur_zone; 2600 if (rel == "up") { 2601 H = Hauteur_zone / 4; 2602 } 2603 coord = { x0: init_zone, y0: 0, x1: Math.ceil(init_zone + Largeur_zone), y1: Hauteur_zone }; 2604 jQuery(this).attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); 1877 rel = "up"; 1878 Hauteur_zone = Hauteur_zone / 4; 1879 } 1880 coord = init_zone + "," + 0 + "," + Math.ceil(init_zone + Largeur_zone) + "," + Hauteur_zone; 1881 new_html += '<area rel="' + rel + '" title="' + title + '" href="' + h_ref + '" shape="rect" coords="' + coord + '" alt="' + title + '" />'; 1882 2605 1883 j++; 2606 1884 }); 2607 2608 return; 2609 } 2610 2611 2612 //===================================================================== 2613 // 2614 // Fonctions supplémentaires 2615 // 2616 //===================================================================== 2617 function Autosize_resize(Obj) { 2618 conf = jQuery(Obj).get(0).conf; 2619 Obj = jQuery(Obj).get(0).obj; 2620 myWindow = jQuery("#" + conf.parent).infos(); 2621 if (myWindow.width == 0) myWindow = jQuery(window).infos(); 2622 marge_basse = 0; 2623 if (conf.MargeBasse) 2624 marge_basse = jQuery(Obj).Get_Val_int(conf.MargeBasse); 2625 marge_top = 0; 2626 if (conf.MargeHaute) 2627 marge_top = jQuery(Obj).Get_Val_int(conf.MargeHaute); 2628 infos_Obj = jQuery(Obj).infos(); 2629 h1_left = jQuery(Obj).absoluteLeft(); 2630 h1_top = jQuery(Obj).absoluteTop(); 2631 2632 if (h1_top < infos_Obj.height) 2633 h1 = (myWindow.height - h1_top - marge_basse - marge_top); 2634 else 2635 h1 = (myWindow.height - marge_basse); 2636 rap = infos_Obj.height / infos_Obj.width; 2637 w2 = parseInt(h1 / rap); 2638 if (w2 < infos_Obj.width) 2639 marginLeft = infos_Obj.left + parseInt((infos_Obj.width - w2) / 2) + "px"; 2640 else 2641 marginLeft = "auto"; 2642 jQuery(Obj).css({ width: "auto", marginTop: marge_top, 2643 marginLeft: "auto", marginBottom: 0 + "px", 2644 verticalAlign: "middle", textAlign: "center" 2645 }); 2646 jQuery(Obj).height(h1); 2647 //============================================================= 2648 if (conf.ResizePicture == "true") 2649 imgs = jQuery(Obj).find("img"); 2650 else 2651 imgs = jQuery(Obj).find("img"); 2652 Parent = Obj; 2653 2654 Obj_w = jQuery(Obj).width(); 2655 Obj_h = jQuery(Obj).height(); 2656 if (imgs.length > 0) { 2657 jQuery(imgs).each(function (i) { 2658 img = jQuery(this); 2659 h1_top = jQuery(img).absoluteTop() - h1_top; 2660 h1_bottom = Obj_h - h1_top; 2661 infos_theMainImage = { width: conf.width[i], height: conf.height[i] }; //origine 2662 img_rap = conf.rap[i]; 2663 if (infos_theMainImage.width > Obj_w) h1 = parseInt(Obj_w / img_rap); 2664 h1 -= h1_top; 2665 if (h1 > Obj_h - h1_top) { 2666 h1 = Obj_h - h1_top; 2667 } 2668 w2 = parseInt(h1 * img_rap); 2669 if (w2 > 0 && h1 > 0 && img.length > 0) { 2670 img.height(h1); 2671 img.width(w2); 2672 } 2673 }); 2674 } else { 2675 imgs = jQuery(Obj).children(); 2676 jQuery(imgs).each(function (i) { 2677 if (this.height > 0) { 2678 h1_top = jQuery(this).absoluteTop() - h1_top; 2679 h1_bottom = Obj_h - h1_top; 2680 infos_theMainImage = { width: conf.width[i], height: conf.height[i] }; //origine 2681 img_rap = conf.rap[i]; 2682 if (infos_theMainImage.width > Obj_w) h1 = parseInt(Obj_w / img_rap); 2683 h1 -= h1_top; 2684 if (h1 > Obj_h - h1_top) { 2685 h1 = Obj_h - h1_top; 2686 } 2687 w2 = parseInt(h1 * img_rap); 2688 if (w2 > Obj_w) { 2689 w2 = Obj_w; 2690 } 2691 2692 if (w2 > 0 && h1 > 0) { 2693 this.height = (h1); 2694 this.width = (w2); 2695 } 2696 2697 } 2698 name = this.name; 2699 }); 2700 2701 2702 2703 } 2704 2705 } 2706 2707 /******************************************************** 2708 * List_autosize_resize 2709 ********************************************************/ 2710 function List_autosize_resize(event, ui) { 2711 if (typeof wait_resize == "undefined") wait_resize = false; 2712 if (wait_resize == true) return; 2713 wait_resize = true; 2714 if (List_autosize.length == 0) return; 2715 for (i = 0; i < List_autosize.length; i++) { 2716 Autosize_resize(jQuery(List_autosize[i])); 2717 } 2718 wait_resize = false; 2719 return true; 2720 } 2721 2722 2723 jQuery("#derivativeSwitchBox a").mouseover(function () { 2724 nu_img = 0; 2725 }); 2726 2727 2728 /**/ 2729 2730 })(jQuery); 1885 new_html += '</map>'; 1886 jQuery("#theImage map:last").after(new_html); 1887 1888 }); // ready 1889 -
extensions/Autosize/js/autosize.cookie.js
r16931 r17308 154 154 jQuery("document").ready(function (jQuery) { 155 155 156 return; 157 156 158 // side-menu show/hide 157 158 159 var sidemenu = jQuery.cookie('picture-menu') ;159 160 161 var sidemenu = jQuery.cookie('picture-menu') || jQuery.cookie('side-menu'); 160 162 var menubar = jQuery("#menubar"); 161 return;163 // return; 162 164 if (menubar.length == 1) { 163 165 … … 165 167 166 168 // if cookie says the menu is hiding, keep it hidden! 167 if (sidemenu == 'visible' ) {169 if (sidemenu == 'visible' || sidemenu == 'showing') { 168 170 showMenu(0); 169 171 } else { -
extensions/Autosize/js/autosize.dimensions.js
r17192 r17308 80 80 m[name]['Bottom'] = pos.top + size.height; 81 81 } else { 82 82 83 83 if (name == 'Left' || name == 'Top') { 84 84 m[name] = name == 'Left' ? pos.left : (pos.top); … … 102 102 103 103 infos: function (Arguments) { 104 if (!Arguments) { 105 Arguments = { pos_absolute: false, pos_externe: false }; 106 107 } 108 Args = { pos_absolute: Arguments.pos_absolute || false, pos_externe: Arguments.pos_externe || false }; 104 if (Arguments) { 105 if (Arguments == true) { 106 Args = { pos_absolute: true || false, pos_externe: Arguments.pos_externe || false }; 107 } else { 108 Args = { pos_absolute: Arguments.pos_absolute || false, pos_externe: Arguments.pos_externe || false }; 109 } 110 } else { 111 Args = { pos_absolute: false, pos_externe: false }; 112 } 113 109 114 110 115 var width = 0, height = 0; -
extensions/Autosize/js/conflit.js
r16931 r17308 263 263 return new_element; 264 264 } 265 //========================================================= 265 //========================================================= 266 266 267 }); // fin extend 267 268 … … 486 487 } 487 488 //==================================== 488 489 librairies = new Array; 490 489 function Ajout_Ajax() { 490 if (typeof $.ajax != "function") 491 $.ajax = function (args) { 492 return jQuery.ajax(args); 493 } 494 } 495 491 496 function save_framework(page) { 492 // theGategoryPage,theRegisterPage493 // thePicturePage494 // si admin.php page = "",theIdentificationPage495 497 try { 496 498 Conflit = { version: cl_version, name: cl_plugin }; … … 500 502 if (jQuery('#browser').length > 0) { 501 503 jQuery('#browser').val(browser.browser); 502 } 504 } 505 Ajout_Ajax(); 506 503 507 if (typeof (Parent) == "undefined") 504 508 Parent = "#theImage"; … … 546 550 })(jQuery); 547 551 548 552 549 553 //-------------------------------------------------------------- 550 //=== ajout des fonctions jQuery ===551 if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {552 // $ = jQuery.noConflict();553 // jQuery.extend($, jQuery);554 } else {555 556 557 /* */558 } -
extensions/Autosize/main.inc.php
r17192 r17308 33 33 $autosize_controler = new autosize_controler(); 34 34 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 35 36 35 37 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL+21);36 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL ); 38 37 39 38 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL+21 ); 40 39 41 add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_ 2'), EVENT_HANDLER_PRIORITY_NEUTRAL);40 add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_3'), EVENT_HANDLER_PRIORITY_NEUTRAL-1); 42 41 43 //add_event_handler('loc_after_page_header', array(&$autosize_controler, 'autosize_calcContent'), EVENT_HANDLER_PRIORITY_NEUTRAL-1, 20 ); 42 44 43 add_event_handler('render_element_content', array(&$autosize_controler, 'autosize_calcContent'),40,2); 45 44 -
extensions/Autosize/template/autosize.tpl
r17192 r17308 7 7 cookies :{$cookies} , 8 8 deriv_type :'{$deriv_type}' , 9 liste_type:'{$liste_type}' , 10 9 11 type_size:'{$deriv_type}' , 10 12 DEBUG_autosize:'{$DEBUG_autosize}', -
extensions/Autosize/template/conflit.tpl
r12527 r17308 1 1 {html_head} 2 <!-- << autosize/template/conflit.tpl --> 2 3 <script type="text/javascript"> 3 4 var DEBUG_autosize = '{$DEBUG_autosize}'; … … 6 7 var cl_plugin = '{$name}'; 7 8 var Version_pwg='{$Version_pwg}'; 8 9 var Cookie_width='{$COOKIE_WIDTH }';10 var Cookie_height = '{$COOKIE_HEIGHT }';11 12 9 {if $DEBUG_autosize == "true"} 13 10 var cl_query = '{$autosize_parametres->query}'; … … 21 18 {/if} 22 19 </script> 20 <!-- autosize/template/conflit.tpl >> --> 21 23 22 {/html_head} -
extensions/Autosize/template/header.tpl
r16931 r17308 1 1 {if not empty($pamoorama)} 2 <script id="pamoorama0.3" src="plugins/paMOOramics/js/pamoorama0.3.js" type="text/jscript"></script> 3 <script id="mootools" src="plugins/paMOOramics/js/mootools.js" type="text/jscript"></script> 4 {combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" } 5 {combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery" } 6 {combine_script id="conflit_script2" load="async" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" } 2 {combine_script id="conflit_script" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery" } 3 {combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" } 7 4 {combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"} 5 {combine_script id="conflit_script1" load="footer" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" } 8 6 9 7 {else} -
extensions/Autosize/template/picture_1.tpl
r16931 r17308 1 1 {combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.dimensions' } 2 2 {if $theme != "elegant"} 3 {combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery ,Affiche_script" }{/if}3 {combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery" }{/if} 4 4 {combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
Note: See TracChangeset
for help on using the changeset viewer.