Changeset 7602
- Timestamp:
- Nov 3, 2010, 4:41:12 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7574 r7602 46 46 $autosize_parametres = cl_autosize_Get_Options(); 47 47 include (AUTOSIZE_PATH."include/affiche.php"); 48 $debug = isset($conf['debug']) ? $conf['debug'] : false;48 $debug = isset($conf['debug']) ? $conf['debug'] : 'false' ; 49 49 $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ; 50 50 -
extensions/Autosize/js/Affiche_script.js
r7575 r7602 19 19 jQuery(window).resize(); 20 20 } 21 //========================================================= 22 23 function wait_Timer() { 24 old_w = 0 25 if (DEBUG == "true") { 26 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 27 jQuery("#Debug1").css({ 28 filter: 'alpha(opacity:50)', 29 position: "absolute", 30 border: "solid 1px green", 31 top: 100 + "px", 32 width: (200) + "px", 33 height: 200 + "px" 34 }); 35 jQuery("#Debug1").text("Debug1:info : " + info_pamoorama_outter.width + 36 " : " + info_pamoorama_outter.height 37 ); 38 } 39 jQuery(window).resize(); 40 41 42 } 43 44 /* 45 * 46 */ 47 jQuery("#pamoorama").bind('resize', function () { 48 wait_Timer(); 49 }) 50 51 jQuery("#pamoorama_iner").bind('resize', function () { 52 wait_Timer(); 53 }) 54 //============================================================//== 55 jQuery("#pamoorama_outter").bind('resize', function () { 56 wait_Timer(); 57 }) 58 21 59 22 60 jQuery(document).ready( … … 45 83 46 84 47 //========================================================= 48 49 function wait_Timer() { 50 old_w = 0 51 jQuery(window).resize(); 52 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 53 if (info_pamoorama_outter.width == 0) 54 setTimeout("wait_Timer()", 100); 55 56 } 85 57 86 58 87 … … 258 287 Bandeau_bas = info_description; 259 288 260 jQuery("#Debug").css({ 289 jQuery("#Debug").css({ opacity: "0.50", 261 290 filter: 'alpha(opacity:50)', 262 291 position: "absolute", … … 267 296 jQuery("#Debug").text("Debug:Bandeau : " + Bandeau); 268 297 269 jQuery("#Debug1").css({ 298 jQuery("#Debug1").css({ opacity: "0.50", 270 299 filter: 'alpha(opacity:50)', 271 300 position: "absolute", … … 277 306 jQuery("#Debug1").text("Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height); 278 307 279 jQuery("#Debug2").css({ 308 jQuery("#Debug2").css({ opacity: "0.50", 280 309 filter: 'alpha(opacity:50)', 281 310 position: "absolute", … … 296 325 } 297 326 298 /*299 *300 */301 jQuery("#pamoorama_iner").bind('resize', function () {302 wait_Timer();303 })304 //============================================================//==305 jQuery("#pamoorama_outter").bind('resize', function () {306 wait_Timer();307 })308 327 309 328 … … 343 362 * window .resize 344 363 */ 364 jQuery(window).resize(); 365 setTimeout('jQuery(window).resize()', 200); 366 345 367 jQuery(window).resize(function (event, ui) { 346 368 if (typeof (event) == 'undefined') return; … … 352 374 353 375 //========================================================================== 354 var winwidth = jQuery(window).width(); 355 var winheight = jQuery(window).height(); 376 var Window_width = jQuery(window).width(); 377 var Window_height = jQuery(window).height(); 378 var winwidth = Window_width; 379 var winheight = Window_height; 356 380 if (old_w == winwidth && old_h == winheight) return; 357 381 … … 429 453 winwidth -= (marge_right + marge_left); 430 454 431 432 433 434 455 if (Type_Img == "pamoorama") { 435 var info_pamoorama = jQuery("#pamoorama").info(); 436 var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 437 var info_pamoorama_inner = jQuery("#pamoorama_inner").info(); 438 var info_pamoorama_footer = jQuery("#pamoorama_footer").info(); 439 TheImg = jQuery("#pamoorama"); 456 var myPamoorama = this.myPamoorama; 457 440 458 if (typeof (myPamoorama) == "undefined") { 441 459 460 442 461 return 443 444 } 445 446 447 448 po = myPamoorama; 462 } 463 464 465 if (typeof (myPamoorama.imageHeight) == "undefined") { 466 old_w = 0; 467 old_h = 0; 468 469 470 return; 471 } 449 472 450 473 /* … … 574 597 //========================================================= 575 598 576 577 if (typeof (myPamoorama.imageHeight) == "undefined") {578 old_w = 0;579 return;580 }599 var info_pamoorama = jQuery("#pamoorama").info(); 600 var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 601 var info_pamoorama_inner = jQuery("#pamoorama_inner").info(); 602 var info_pamoorama_footer = jQuery("#pamoorama_footer").info(); 603 TheImg = jQuery("#pamoorama"); 581 604 582 605 img_reelle.height = myPamoorama.imageHeight; … … 705 728 var widthmin = winwidth; 706 729 707 if (check_auto_w == 'checked="checked"' ) {730 if (check_auto_w == 'checked="checked"' || Type_Img == "pamoorama") { 708 731 // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { 709 732 //==== largeur à atteindre === … … 726 749 if (echelle_w > echelle_max) { echelle_w = echelle_max; } 727 750 Image_width = parseInt(img_reelle.width * echelle_w); 728 if (rapport > 0) 729 Image_height = parseInt(Image_width / rapport); 751 if (Type_Img != "pamoorama") { 752 if (rapport > 0) 753 Image_height = parseInt(Image_width / rapport); 754 } 730 755 } 731 756 … … 871 896 Gmap_ = gmaps.maps[0]; 872 897 if (Gmap_.sizeMode == 'A') { 873 jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" }); 874 898 jQuery("#iGMapsIcon").css({ width: Window_width * gmaps.popupAutomaticSize + "px", height: Window_height * gmaps.popupAutomaticSize + "px" }); 875 899 } 876 900 } … … 912 936 img_height = myPamoorama.imageHeight 913 937 914 marge_left += 0; 915 new_width = Zone_Affichage.width - marge_right - marge_left;938 939 new_width = Zone_Affichage.width; 916 940 new_width -= 4; 917 941 jQuery("#pamoorama").css({ marginLeft: "auto", … … 943 967 jQuery("#linkPrev").css({ width: "200px", overflow: "hidden" }); 944 968 zoom = Image_height / img_height; 945 969 946 970 947 971 … … 1009 1033 jQuery("#imageToolBar").css("position", "static"); 1010 1034 info_imageInfoBar = jQuery("#imageInfoBar").info(); 1011 if (info_imageInfoBar.bottom < info_img.bottom) { 1012 jQuery("#imageInfoBar").height(info_img.bottom); 1035 info_theImage = jQuery("#theImage").info(); 1036 Maxi_b = info_theImage.bottom - info_imageInfoBar.top 1037 if (info_imageInfoBar.bottom < info_theImage.bottom) { 1038 jQuery("#imageInfoBar").height(info_theImage.height); 1039 jQuery("#imageInfoBar").css("height", info_theImage.height + "px"); 1013 1040 } 1014 1041 … … 1026 1053 if (pos.top > 100) jQuery("#the_page").height(pos.top); 1027 1054 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; 1028 jQuery(window).resize();1055 //jQuery(window).resize(); 1029 1056 return; 1030 1057 }); 1031 1058 var pos; 1032 1059 //=================================================================== 1033 jQuery(window).resize();1060 //jQuery(window).resize(); 1034 1061 /* 1035 1062 * recherche la plus grande image (hauteur ou largeur) … … 1058 1085 1059 1086 } // function 1060 ); // ready1087 ); // ready 1061 1088 /* 1062 1089 * … … 1080 1107 jQuery('html,body').stop().scrollTop(0); 1081 1108 jQuery('html,body').stop().scrollLeft(0); 1082 jQuery(".ui-widget-overlay").css( "opacity", "0.75");1109 jQuery(".ui-widget-overlay").css({opacity:"0.75",filter: 'alpha(opacity:65)'}); 1083 1110 1084 1111 l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width()))/2; … … 1088 1115 jQuery(".gmapsPopup").css("top", h1 + "px"); 1089 1116 1090 },1091 //-------------------------------------------------------1092 absolutize: function (element) {1093 element = jQuery(element).get(0);1094 if (element.getStyle('position') == 'absolute') return;1095 // Position.prepare(); // To be done manually by Scripty when it needs it.1096 1097 var offsets = element.positionedOffset();1098 var top = offsets[1];1099 var left = offsets[0];1100 var width = element.clientWidth;1101 var height = element.clientHeight;1102 1103 element._originalLeft = left - parseFloat(element.style.left || 0);1104 element._originalTop = top - parseFloat(element.style.top || 0);1105 element._originalWidth = element.style.width;1106 element._originalHeight = element.style.height;1107 1108 element.style.position = 'absolute';1109 element.style.top = top + 'px';1110 element.style.left = left + 'px';1111 element.style.width = width + 'px';1112 element.style.height = height + 'px';1113 return element;1114 },1115 1116 relativize: function (element) {1117 element = jQuery(element).get(0); ;1118 if (jQuery(element).css('position') == 'relative') return;1119 // Position.prepare(); // To be done manually by Scripty when it needs it.1120 element._originalLeft = parseFloat(element.style.left || 0);1121 element._originalTop = parseFloat(element.style.top || 0);1122 element._originalWidth = element.style.width;1123 element._originalHeight = element.style.height;1124 1125 element.style.position = 'relative';1126 var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);1127 var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);1128 1129 element.style.top = top + 'px';1130 element.style.left = left + 'px';1131 // element.style.height = element._originalHeight;1132 // element.style.width = element._originalWidth;1133 return element;1134 1117 } 1135 1118 //========================================================= -
extensions/Autosize/main.inc.php
r7574 r7602 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.3. 24 Version: 1.3.3 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
Note: See TracChangeset
for help on using the changeset viewer.