Changeset 19764
- Timestamp:
- Jan 3, 2013, 7:38:40 PM (11 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r19746 r19764 92 92 } 93 93 self::reload("#93"); 94 94 self::Fin_php("#94 autosize_calcContent:" + $DEBUG_autosize); 95 95 96 96 } … … 120 120 * INIT 121 121 *********************/ 122 123 static public function init_1($content, $image) 124 { 125 global $conf, $template, $page; 126 if(!isset($conf['AS_panorama'])) return $content; 127 $asp = & $conf['AS_panorama']; 128 if ( !stristr($image['name'], $asp['in_mode_360']) and !stristr($image['name'], $asp['in_mode_180']) ) return $content; 129 130 $windowWidth=$_COOKIE['windowWidth'] -$_COOKIE['theImageLeft']-$_COOKIE['theImageRight']; 131 $windowHeight=$_COOKIE['windowHeight']-130 ; 132 133 $asp['start_position']= 10; 134 $asp['min_viewport_width']= $windowWidth; 135 $asp['viewport_height']= $windowHeight; 136 } 137 122 138 static public function init($content,$element_info){ 123 139 global $template,$version,$icon_path,$page,$picture,$conf; … … 408 424 echo $set_var ; 409 425 echo $autoscript; 410 self::Fin_php("#411: ".$DEBUG_autosize);426 // self::Fin_php("#411: ".$DEBUG_autosize); 411 427 412 428 } -
extensions/Autosize/js/Affiche_script.js
r19166 r19764 472 472 //========================================================================================== 473 473 init_gen(); 474 475 476 474 }); 477 475 //__________________window.onload_________________ … … 513 511 options.valide = jQuery(".Autosize").css("display") != "none"; 514 512 options.marge_haute = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("top")); 515 options.marge_basse = Math.max(513 options.marge_basse = Math.max( 516 514 jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("bottom")), 517 515 options.marge_basse … … 945 943 946 944 //jQuery(theMainImage_id).height(Zone_image.image.height); 945 } else if (Type_Img == "panorama") { 946 // jQuery("#pamoorama").width(img_finale.width); 947 // jQuery("#pamoorama").height(img_finale.height); 948 949 950 951 // jQuery("#theImage img.simple_panorama").panorama(asp_options); 947 952 } else { 948 953 if (options.imageAutosize == false) 949 954 if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") { 950 jQuery(theMainImage_id).height(Zone_image.image.height 955 jQuery(theMainImage_id).height(Zone_image.image.height); 951 956 jQuery(theMainImage_id).width(Zone_image.image.width); 952 953 jQuery(theMainImage_id).css("margin-top", options.marge_haute 957 958 jQuery(theMainImage_id).css("margin-top", options.marge_haute); 954 959 955 960 } else { … … 1131 1136 * pamoorama 1132 1137 ******************************/ 1133 1138 1139 1134 1140 jQuery("#pamoorama").bind("on", function () { alert($(this).text()); }); 1135 1141 jQuery("#pamoorama").bind("on", function (e) { … … 1753 1759 if (!options.check_desc_v) 1754 1760 options.marge_bottom_2 = 0; 1755 1761 1756 1762 1757 1763 marge_bottom = options.marge_bottom_2 + options.marge_bottom; … … 1866 1872 infos_theImage = jQuery(theMainImage_id).infos(); 1867 1873 infos_the_page = jQuery("#the_page").infos(); 1874 if (typeof img_finale == "undefined") img_finale = { width: Zone_image.image.width, height: Zone_image.image.height }; 1875 1868 1876 img_finale.height = infos_theImage.height; 1869 1877 break … … 1939 1947 mxi = Math.ceil(Zone_image.image.height + Zone_image.marges.height); 1940 1948 Zone_image.container.height = Math.max(Zone_image.container.height, mxi); 1949 } else { 1950 1951 1941 1952 } 1942 1953 img_finale = { width: Zone_image.image.width, height: Zone_image.image.height }; 1954 1943 1955 return true; 1944 1956 } … … 2274 2286 2275 2287 2276 }); // ready2288 }); // ready 2277 2289 2278 2290 -
extensions/Autosize/main.inc.php
r19744 r19764 48 48 //=============================================================== 49 49 if(!preg_match("|NO|", $DEBUG_autosize, $val)) { 50 // EVENT_HANDLER_PRIORITY_NEUTRAL=80 50 51 add_event_handler('render_element_content', array(&$autosize_ctrl, 'autosize_calcContent'),EVENT_HANDLER_PRIORITY_NEUTRAL-11,2); 52 add_event_handler('render_element_content', array(&$autosize_ctrl, 'init_1'),EVENT_HANDLER_PRIORITY_NEUTRAL-9,2); 51 53 add_event_handler('render_element_content', array(&$autosize_ctrl,'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2 ); 52 54 add_event_handler('render_element_content', array(&$autosize_ctrl,'init2'),EVENT_HANDLER_PRIORITY_NEUTRAL+1,2 ); -
extensions/Autosize/template/picture.tpl
r17192 r19764 26 26 var src5 = "{'cl_autosize_info_1'|@translate}"; 27 27 var src6 = "{$cl_autosize_button.ICON1}"; 28 var asp_options = null; 28 29 29 30 {if $ASP.width} 30 31 jQuery(window).load(function () {ldelim} 31 varasp_options ={ldelim} };32 asp_options ={ldelim} }; 32 33 if(typeof $("#imageToolBar") !="undefined" ) 33 34 var w = $("#imageToolBar").width(); … … 51 52 loop_180 : {$ASP.loop_180} 52 53 }; 53 //$("#theImage img.simple_panorama").panorama(asp_options); 54 55 // $("#theImage img.simple_panorama").panorama(asp_options); 54 56 }; 55 57 });
Note: See TracChangeset
for help on using the changeset viewer.