Changeset 8729
- Timestamp:
- Jan 18, 2011, 1:17:27 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r8627 r8729 316 316 } 317 317 318 318 function auto_memo_var($variables) 319 { 320 ob_start(); 321 echo '<pre>'; 322 print_r($variables); 323 echo '</pre>'; 324 $m= ob_get_contents(); 325 ob_end_clean(); 326 return $m; 327 } 328 319 329 320 330 ?> -
extensions/Autosize/css/autosize.css
r8060 r8729 1 #theImage{ 2 3 opacity: 1.0 ; 4 5 } 6 1 7 2 /* jQuery ui resizable */ 8 3 .ui-resizable { position: relative; } … … 23 18 .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: 0px; top: 0px; background: transparent url(images/resizable-nw.gif); } 24 19 .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(images/resizable-ne.gif); } 20 #theImage { 21 opacity: 0; 22 filter: alpha(opacity:0); 23 padding-bottom: 0px; 24 padding-left: 0px; 25 } 26 #the_page{ 27 position:static ; 28 29 } 30 #mapPicture{ 31 top:40% ; 32 33 } 34 #mapPicture{ 35 top:40% ; 36 37 } 38 #imageContainer{ 39 height:2000px; 40 } -
extensions/Autosize/js/Affiche_script.js
r8627 r8729 52 52 53 53 //========================================================================== 54 function Wait_Affichage() { 54 function Wait_Affichage() { 55 56 fade_in = parseInt(fade_in); 55 57 if(!jQuery().newResize()) { 56 58 setTimeout("Wait_Affichage()", 500); 57 59 return 58 60 } 59 60 fade_in = parseInt(fade_in); 61 if (fade_in == 0) { 62 if (msie) 63 jQuery(Parent).css({opacity:"1",filter: "alpha(opacity=100)"}); 64 else 65 jQuery(Parent).css("opacity","1"); 66 } else { 67 jQuery(Parent).animate( 68 { opacity: 1 }, fade_in, "swing" 61 62 if (fade_in == 0) { 63 jQuery(Parent).css({opacity:"1" }); 64 } else { 65 66 jQuery(Parent).animate( 67 { opacity: "1" }, fade_in, "swing" 69 68 , function (i) { 69 jQuery(Parent).css({ opacity: "1" }); 70 70 if (DEBUG == "true") { 71 71 bp1 = jQuery('.debug').get(nu_img); … … 85 85 jQuery(document).ready( 86 86 function (jQuery) { 87 jQuery(window).unload(function () { 88 89 90 91 }); 87 92 jQuery(window).load(function () { 88 if (fade_in != 0) { 89 if (msie) 90 jQuery("#theImage").css({ opacity: "0" }); 91 else 92 jQuery("#theImage").css({ opacity: "0" }); 93 } 93 94 // jQuery("#theImage").css({ opacity: "0" }); 95 96 jQuery("#the_page").css({ top: "0px" }); 97 94 98 //======= cl_conflit ====== 95 99 img_top = "0"; 96 100 rapport = -1; 97 98 101 marges_llgbo = 0; 99 102 pos = 0; 100 101 102 103 //============================================================= 103 104 function cl_Timer() { … … 133 134 img_finale = { height: 0, width: 0 }; 134 135 Zone_Affichage = { height: 0, width: 0 }; 135 136 //============================================================ 136 //============================================================ 137 137 138 138 Info_the_page = jQuery("#the_page").infos(); … … 150 150 } 151 151 old_window = { width: 0, height: 0 }; 152 Wait_Affichage(); 152 jQuery("#theImage").trigger('ON'); 153 153 154 old_window = { width: 0, height: 0 }; 154 155 jQuery().newResize(); … … 255 256 var info_ToolBar = jQuery("#imageToolBar").infos(); 256 257 var marge = 0; 257 marge_right = 0;258 marge_left = 0;258 var marge_right = 0; 259 var marge_left = 0; 259 260 if (theme.match(RegExp("simple", "g"))) { 260 261 if (info_ToolBar.width > 0) … … 263 264 marge = (Zone_Affichage.width - info_the_page.width) / 2; 264 265 265 varmarge_right = marge;266 varmarge_left = marge;266 marge_right = marge; 267 marge_left = marge; 267 268 268 269 if (info_content.width > 100) { … … 274 275 275 276 } 276 } 277 else 277 } else { 278 if (info_ToolBar.width > 0) 279 marge = (info_the_page.width - info_ToolBar.width) / 2; 280 281 marge_right = marge; 282 marge_left = marge; 278 283 winwidth = info_the_page.width; 284 } 279 285 280 286 … … 328 334 jQuery("#map").css("left", info_map.width + "px"); 329 335 Bandeau_bas.height = 10; 330 336 331 337 if (theme.match(RegExp("simple", "g"))) { 332 338 img_reelle.width = winwidth; //- info_map.width -marge_right; 333 } else { 334 img_reelle.width = winwidth - info_map.width -marge_right;339 } else { 340 img_reelle.width = winwidth - info_map.width - marge_right; 335 341 } 336 342 … … 610 616 heightgbo = img_finale.height; 611 617 img_finale.width -= marges_llgbo; 612 img_finale.height -= marges_llgbo; 618 if (jQuery("#slideshow").infos().width > 0) { 619 img_finale.height -= (marges_llgbo * 1.5); 620 } else { 621 img_finale.height -= marges_llgbo 622 } 623 613 624 614 625 if (wingbo > winwidth) { … … 668 679 //================ Zone affichage ========================= 669 680 670 if (theme.match(RegExp("luciano", "g"))) {671 //---- information en dehors du cadre672 jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height);673 }674 675 //=========================================================676 681 677 682 // jQuery(Cadre).css("top", "0px"); … … 683 688 Image_width = img_finale.width; 684 689 //========================================================================= 685 jQuery(Cadre).css({ marginLeft: marge_left + "px" 686 }); 690 if (jQuery("#slideshow").infos().width > 0) { 691 692 jQuery(Cadre).css({ marginLeft: "auto" 693 }); 694 } 695 else 696 jQuery(Cadre).css({ marginLeft: marge_left + "px" 697 }); 687 698 jQuery(Cadre).width(Zone_Affichage.width); 688 699 // jQuery(Cadre).height(Zone_Affichage.height); … … 816 827 } 817 828 818 819 829 jQuery("#imageContainer").css({ height: "auto" }); 820 830 821 831 jQuery("#navThumbPrev").css({ overflow: "hidden" }); 822 832 jQuery("#navThumbNext").css({ overflow: "hidden" }); 823 833 n = typeof inittoolbar; 824 834 if (Type_Img == "map") { 835 jQuery("#navThumbNext").css({ display: 'none' }); 836 jQuery("#navThumbPrev").css({ display: 'none' }); 837 } 825 838 try { 826 839 if (theme.match(RegExp("gally", "gi"))) { … … 835 848 top: info_img.top + 20 + "px", overflow: "hidden" 836 849 }); 837 if (Type_Img == "map") 838 jQuery("#navThumbPrevContainer").css({ background: 'none' }); 850 839 851 } 840 852 if (jQuery("#navThumbNext").length > 0) { … … 844 856 845 857 } 846 if (Type_Img == "map") 847 jQuery("#navThumbNextContainer").css({ background: 'none' }); 858 859 848 860 if (!theme.match(RegExp("lapis", "gi"))) { 849 initializeImageMode("resize"); 861 if (typeof initializeImageMode == "function") { 862 initializeImageMode("resize"); 863 } 864 850 865 } 851 866 … … 955 970 * 956 971 */ 957 972 958 973 function Info_entete(Parent) { 959 974 if (typeof (marge_top) != "undefined") return result; … … 1022 1037 //============================================================================= 1023 1038 info_description = { top: 0, bottom: 0, height: 0 }; 1024 1025 1039 1040 jQuery(Parent).css({ display: "block" }); 1026 1041 //====== détection du type d'images ====== 1027 1042 if (jQuery("#charlie").length > 0) { … … 1085 1100 if (theme.match(RegExp("luciano", "g"))) { 1086 1101 TheImg = jQuery(Parent + " #theImg img"); 1102 1087 1103 info_img = jQuery(TheImg).infos(); 1088 1104 … … 1242 1258 1243 1259 if (theme.match(RegExp("luciano", "g"))) { 1244 //info_description.bottom -= 30 1260 info_description.bottom -= 0; 1261 1262 1263 correction = -30; 1264 Info_slidshowToolBar = jQuery("#slidshowToolBar").infos(); 1265 1266 if (Info_slidshowToolBar.height > 0) { 1267 correction -= (Info_slidshowToolBar.height); 1268 info_description.top -= 90; 1269 1270 } 1271 1272 1273 1274 //========================================================= 1245 1275 } 1246 1276 … … 1336 1366 Wait_Affichage(); 1337 1367 }); 1338 1368 jQuery(Parent).live('ON', function (e) { 1369 jQuery(jQuery('.debug').get(1)).trigger('ON'); 1370 Wait_Affichage(); 1371 }); 1339 1372 1340 1373 // Custom Event, ON to turn on a debug. -
extensions/Autosize/js/conflit.js
r8627 r8729 3 3 //=================================================== 4 4 var detect = navigator.userAgent.toLowerCase(); 5 // $_SERVER['HTTP_USER_AGENT'] ; 5 6 var OS, version; 6 7 //============================================================================== … … 8 9 9 10 function detect_browser() { 11 10 12 mybrowser = { 11 13 browser: "", … … 37 39 else OS = "an unknown operating system"; 38 40 } 39 41 mybrowser.version =version; 42 mybrowser.OS = OS; 40 43 mybrowser.browser = lbrowser; 41 44 return mybrowser … … 64 67 msie = mybrowser.msie || false; 65 68 netscape = mybrowser.netscape || false; 69 70 66 71 67 72 var time_out = 0; … … 478 483 test_conflit = false; 479 484 librairies = new Array; 480 481 482 483 485 $_ = $; 484 486 function save_framework(page) { … … 490 492 } catch (e) { 491 493 494 } 495 if (jQuery('#browser').length > 0) { 496 jQuery('#browser').val(browser.browser); 492 497 } 493 498 if (typeof (Parent) == "undefined") … … 508 513 //==== compatibilité Gally/LLGBO === 509 514 jQuery(Parent).css({ position: "static" }); 510 511 515 } 512 516 } catch (e) { -
extensions/Autosize/js/jquery.dimensions.js
r8627 r8729 113 113 height = jQuery(elem).height(); 114 114 } else { 115 115 116 Css = jQuery(elem).getStyles(elem); 116 117 myposition = Css.position || ""; … … 119 120 120 121 121 borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth );122 borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth );123 borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth );124 borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth );122 borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth, "", "", 'borderLeftWidth'); 123 borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth, "", "", 'borderRightWidth'); 124 borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth, "", "", 'borderTopWidth'); 125 borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth, "", "", 'borderBottomWidth'); 125 126 try { 126 127 borderwidth.width = Css.borderWidth; … … 131 132 132 133 133 margin.left = jQuery(elem).Get_Val_int(Css.marginLeft); 134 margin.right = jQuery(elem).Get_Val_int(Css.marginRight); 135 margin.top = jQuery(elem).Get_Val_int(Css.marginTop); 136 margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom); 134 margin.left = jQuery(elem).Get_Val_int(Css.marginLeft, "", "", 'marginLeft'); 135 margin.right = jQuery(elem).Get_Val_int(Css.marginRight, "", "", 'marginRight'); 136 margin.top = jQuery(elem).Get_Val_int(Css.marginTop, "", "", 'marginTop'); 137 margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom, "", "", 'marginBottom'); 138 139 137 140 try { 138 141 margin.margin = Css.margin; … … 141 144 } 142 145 143 padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft); 144 padding.right = jQuery(elem).Get_Val_int(Css.paddingRight); 145 padding.top = jQuery(elem).Get_Val_int(Css.paddingTop); 146 padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom); 146 147 padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft, "", "", 'paddingLeft'); 148 padding.right = jQuery(elem).Get_Val_int(Css.paddingRight, "", "", 'paddingRight'); 149 padding.top = jQuery(elem).Get_Val_int(Css.paddingTop, "", "", 'paddingTop'); 150 padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom, "", "", 'paddingBottom'); 151 147 152 try { 148 153 padding.padding = Css.padding; … … 246 251 */ 247 252 248 Get_Val_int: function (myObj, Maxi_val, Mini_val ) {253 Get_Val_int: function (myObj, Maxi_val, Mini_val, prop) { 249 254 var val = 0; 250 255 Maxi_val = parseInt(Maxi_val || "0"); … … 263 268 264 269 if (typeof (myObj) == "string") { 265 266 if (myObj == "none") return Maxi_val; 270 switch (myObj) { 271 case 'thin': 272 return 1; 273 break; 274 case 'medium': 275 return 2; 276 break; 277 case 'thick': 278 return 4; 279 break; 280 case 'inherit': 281 break; 282 case 'none': 283 return Maxi_val; 284 break; 285 default: 286 break; 287 } 288 el = this.get(0); 267 289 var reg1 = new RegExp("auto", "g") 268 290 if (myObj.match(reg1)) { 269 291 return Maxi_val; 270 292 } 271 reg1 = new RegExp("px", "g") 272 if (myObj.match(reg1)) { 273 274 myObj = parseInt(myObj); 275 276 } 293 if (prop) 294 myObj = num(el, prop); 277 295 else { 278 reg1 = new RegExp(" %", "g")296 reg1 = new RegExp("px", "g") 279 297 if (myObj.match(reg1)) { 280 val = Math.ceil(myObj * Maxi_val / 100); 281 return val; 282 } 298 299 myObj = parseInt(myObj); 300 301 } else { 302 reg1 = new RegExp("%", "g") 303 if (myObj.match(reg1)) { 304 val = Math.ceil(myObj * Maxi_val / 100); 305 return val; 306 } 307 308 } 309 283 310 } 284 311 285 312 if (Mini_val) 286 313 if (myObj < Mini_val) return Maxi_val; 287 288 switch (myObj) {289 case 'thin':290 return 1;291 break;292 case 'medium':293 return 2;294 break;295 case 'thick':296 return 4;297 break;298 case 'inherit':299 break;300 default:301 break;302 }303 304 314 305 315 -
extensions/Autosize/language/fr_FR/lang.php
r7962 r8729 1 1 <?php 2 2 global $lang; 3 3 4 $lang['cl_autosize_hlp_line3'] = "Si la taille originale de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. " ; 4 5 -
extensions/Autosize/main.inc.php
r8627 r8729 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.4. 2.64 Version: 1.4.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 -
extensions/Autosize/template/autosize.tpl
r8627 r8729 5 5 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 6 6 <script type="text/javascript"> 7 7 8 var fade_in = '{$fade_in}'; 8 9 var cl_visible = "{$cl_visible}" =="true"; … … 45 46 var check_desc_v = '{$check_desc_v}'; 46 47 </script> 47 48 48 {known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"} 49 49 <link href="{$AUTOSIZE_PATH}css/autosize.css" rel="stylesheet" type="text/css" />
Note: See TracChangeset
for help on using the changeset viewer.