Changeset 19030 for extensions
- Timestamp:
- Nov 15, 2012, 11:21:22 AM (12 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r19003 r19030 619 619 $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); 620 620 } 621 622 621 623 622 $template->set_filenames( … … 853 852 $derivative=$current['derivatives'][$last_derivative] ; 854 853 $img_all= $derivative->get_all($derivative->src_image); 855 856 854 857 855 $retour = (object) ''; … … 983 981 } 984 982 985 if(preg_match("|get_infos|", $DEBUG_autosize, $val)) $infos_message .= $retour->type . " " . $retour->url ;986 983 if (!isset( $retour->type)){ 987 984 $retour=$last_image; … … 996 993 997 994 } 998 999 1000 1001 995 if($nofile > 0){ 1002 996 $set_miniature=$No_files ; 1003 997 } 1004 1005 998 1006 999 if(preg_match("|get_infos|", $DEBUG_autosize, $val)) -
extensions/Autosize/include/affiche.php
r19003 r19030 59 59 global $DEBUG_autosize; 60 60 61 $user_type= get_user_status($user_status)."_type"; 62 $user_type= $autosize_parametres->$user_type ; 63 $select_type=ImageStdParams::get_by_type($user_type); 64 $ideal_size = $select_type->sizing->ideal_size ; 65 if($user_type=="Autosize" || $user_type=="SelMaxi"){ 66 $ideal_size[0]=$imgSizeWH[0]; 67 $ideal_size[1]=$imgSizeWH[1]; 68 } 69 61 70 $slide_show = isset($page['slideshow'])?$page['slideshow']:false; 62 71 63 72 $template->assign( 64 73 array( 74 'ideal_size_width' => $ideal_size[0] , 75 'ideal_size_height' => $ideal_size[1] , 65 76 'has_pamoorama' => $has_pamoorama, 66 77 'pictureMap' => $pictureDeriv , -
extensions/Autosize/js/Affiche_script.js
r19021 r19030 164 164 //==================================== 165 165 set_cl = function (Valid) { 166 166 167 if (typeof Valid == "undefined") Valid = options.pictureSelType.match(RegExp("Autosize", "gi")) || false; 167 168 if (typeof options.cl_visible == "undefined") return; … … 190 191 191 192 } 193 192 194 if ((typeof Zone_image != "undefined") && typeof Zone_image.image != "undefined") { 193 195 Zone_image.zoom = (Zone_image.image.height / Zone_image.image_init.height); … … 201 203 } 202 204 } 205 if (Type_Img == "pamoorama" || Type_Img == "iframe" || Type_Img == "charlie") { 206 zoom_cl = ""; 207 src_info = ""; 208 src = src2; 209 } 210 203 211 jQuery('#bp_cla').attr('alt', src_info); 204 212 jQuery('#bp_cla').attr('title', src_info); … … 573 581 options.pictureDeriv = pictureDeriv; 574 582 } 575 if (Type_Img == "pamoorama" )583 if (Type_Img == "pamoorama" || Type_Img == "iframe" || Type_Img == "charlie") { 576 584 options.pictureSelType = "Autosize"; 585 } 577 586 for (i = 0; i < options.liste_type.length; i++) { 578 587 options.liste_type[i] = options.liste_type[i].split(","); … … 600 609 601 610 patname = href_path.replace("javascript\:", ""); 611 if(typeof old_path == "undefined") old_path = patname; 602 612 pt = pt.split(","); 603 613 tsz = pt[pt.length - 1]; … … 934 944 935 945 if (Type_Img == "charlie" || Type_Img == "iframe") { 946 init_w1 = Zone_image.image.width; 947 init_h1 = Zone_image.image.height; 948 949 if (pictureSelType_user != "Autosize" && pictureSelType_user != "SelMaxi") { 950 init_w1 = Autosize_options.ideal_size_width; 951 init_h1 = Autosize_options.ideal_size_height; 952 } 936 953 if (Type_Img == "charlie") { 937 954 dp1 = jQuery("#charlie").offset(); … … 941 958 wpng = Math.abs(dp.left - dp1.left) * 2; 942 959 } 943 png_h = jQuery("#" + Type_Img + " div").height(); 944 w01 = Math.ceil(jQuery("#" + "theImage").width() - wpng); 960 png_h = init_h1; 961 w01 = init_w1 - wpng; 962 945 963 jQuery("#" + "theImage").css({ padding: 0 }); 946 964 if (!png_h) { … … 969 987 } 970 988 jQuery("#" + Type_Img).height(png_h); 971 972 973 989 jQuery("#" + Type_Img + " div").width(w01); 974 975 976 990 jQuery("#theImage").css({ height: "auto" }); 977 991 } else { 978 992 jQuery("#theImage").css({ height: "auto" }); 979 993 jQuery("#theMainImage").css({ width: "auto", height: "auto" }); 980 jQuery("#" + Type_Img).attr("width", Zone_image.image.width- (infos_theMainImage.borderwidth.left + infos_theMainImage.borderwidth.right));981 jQuery("#" + Type_Img).attr("height", Zone_image.image.height- (infos_theMainImage.borderwidth.top + infos_theMainImage.borderwidth.bottom));994 jQuery("#" + Type_Img).attr("width", init_w1 - (infos_theMainImage.borderwidth.left + infos_theMainImage.borderwidth.right)); 995 jQuery("#" + Type_Img).attr("height", init_h1 - (infos_theMainImage.borderwidth.top + infos_theMainImage.borderwidth.bottom)); 982 996 } 983 997 jQuery("#" + Type_Img).show(options.fade_in); … … 2244 2258 2245 2259 2246 }); // ready2260 }); // ready 2247 2261 2248 2262 -
extensions/Autosize/template/autosize.tpl
r19003 r19030 3 3 <script type="text/javascript"> 4 4 var Autosize_options={ldelim} 5 ideal_size_width:'{$ideal_size_width}' , 6 ideal_size_height:'{$ideal_size_height}' , 7 5 8 cl_version :'{$cl_version}', 6 9 Version_pwg:'{$Version_pwg}',
Note: See TracChangeset
for help on using the changeset viewer.