Changeset 8981
- Timestamp:
- Jan 30, 2011, 11:37:52 AM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/template/admin.tpl
r8912 r8981 32 32 33 33 var check_desc_v = '{$check_desc_v}'; 34 35 34 check_desc_v = (check_desc_v == 'checked="checked"'); 35 </script> 36 36 37 37 {if PHPWG_VERSION < 2.2 } -
extensions/Autosize/css/autosize.css
r8957 r8981 21 21 opacity: 0; 22 22 filter: alpha(opacity:0); 23 23 padding-top: 0px; 24 24 padding-bottom: 0px; 25 25 padding-left: 0px; -
extensions/Autosize/js/Affiche_script.js
r8957 r8981 51 51 function Wait_Affichage() { 52 52 fade_in = parseInt(fade_in); 53 54 53 if (!jQuery().newResize()) { 55 54 setTimeout("Wait_Affichage()", 500); 56 55 return 57 56 } 58 nu_img++; 57 nu_img++; 58 59 59 if (fade_in == 0) { 60 60 jQuery(Parent).css({ opacity: "1" }); 61 } else { 62 63 jQuery(Parent).animate(64 { opacity: "1" }, fade_in, "swing"65 , function (i) {66 jQuery(Parent).css({ opacity: "1" });67 if (DEBUG == "true") {68 bp1 = jQuery('.debug').get(nu_img);69 if (!bp1) nu_img = 0;70 bp1 = jQuery('.debug').get(nu_img);71 jQuery(bp1).trigger('ON');72 }73 }74 );61 } else { 62 jQuery(Parent).animate( { opacity: "1" }, 63 fade_in, "swing", 64 function (i) { 65 jQuery(Parent).css({ opacity: "1" }); 66 if (DEBUG == "true") { 67 bp1 = jQuery('.debug').get(nu_img); 68 if (!bp1) nu_img = 0; 69 bp1 = jQuery('.debug').get(nu_img); 70 jQuery(bp1).trigger('ON'); 71 } 72 } 73 ); 74 75 75 } 76 76 // if (nu_img > 1) return; … … 84 84 jQuery("#src_img_w").val(img_w); 85 85 jQuery("#ret_autosize").val(src_img); 86 86 87 87 jQuery("#ret_autosize").trigger('ON', { width: img_w, height: img_h, theImage: TheImg, src_img: src_img }); 88 88 … … 227 227 228 228 jQuery(window).unload(function () { 229 if (TheImg) { 230 jQuery.cookie('old_img', TheImg.src); // créer un cookie avec une valeur 231 jQuery.cookie('old_img_h', jQuery(TheImg).height()); // créer un cookie avec une valeur 232 jQuery.cookie('old_img_w', jQuery(TheImg).width()); // créer un cookie avec une valeur 233 } 234 229 235 }); 230 236 … … 245 251 return; 246 252 } 253 //========================================================= 254 if (typeof (options) == "undefined") { 255 options = { imageAutosizeMargin: 0, imageAutosize: false } 256 } 257 258 old_img= jQuery.cookie('old_img'); 259 old_img_h= jQuery.cookie('old_img_h'); 260 old_img_w= jQuery.cookie('old_img_w'); 261 262 247 263 //============================================================ 248 264 img_init = { height: img_height, width: img_width }; // taille initiale … … 331 347 newResize: function () { 332 348 // 349 //if (options.imageAutosize) return true ;stripped 333 350 if (DEBUG == "true") { 334 351 nu_img += 1; … … 630 647 631 648 //==================================================== 632 633 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau649 if (options.imageAutosizeMargin > 0) Marge_Basse = options.imageAutosizeMargin; 650 else Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 634 651 //========================================================================== 635 652 h = 0; … … 726 743 if (theme.match(RegExp("stripped", "gi"))) { 727 744 img_finale.width -= (llgboframe.top * 2); 728 img_finale.height = (img_finale.width / rapport); 745 if (rapport > 0) img_finale.height = (img_finale.width / rapport); 746 else img_finale.height -= (llgboframe.top * 2); 729 747 } 730 748 zoom = echelle; … … 1011 1029 if (pos != jQuery("#copyright").infos()) 1012 1030 pos = jQuery("#copyright").infos(); 1013 if (!theme.match(RegExp("stripped", "gi"))) { 1031 if (theme.match(RegExp("stripped", "gi"))) { 1032 var TitleBox = jQuery("#imageTitleContainer"); 1033 if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px"); 1034 } else { 1014 1035 if (pos.top > 100) 1015 1016 1036 jQuery("#the_page").height(pos.top); 1037 1017 1038 } 1018 1039 … … 1114 1135 info_thePicturePage = jQuery("#thePicturePage").infos(); 1115 1136 if (theme.match(RegExp("stripped", "gi"))) { 1116 optiontop =Info_the_page.top+ info_imageInfoBar.bottom + llgboframe.top + info_imageToolBar.top + info_imageToolBar.height;1137 optiontop = 0;// Info_the_page.top+ info_imageInfoBar.bottom + llgboframe.top + info_imageToolBar.top + info_imageToolBar.height; 1117 1138 } 1118 1139 … … 1189 1210 llgboframe = jQuery("#gbo").infos(); 1190 1211 marges_llgbo = 0; 1191 //=========================================================1192 1212 1193 1213 if (llgboframe.height > 0) { … … 1296 1316 1297 1317 1298 if (llgboframe.height > 0) info_img = llgboframe; 1318 if (llgboframe.height > 0) info_img = llgboframe; // format de l'image+largeur du cadre 1299 1319 1300 1320 if (theme.match(RegExp("luciano", "g"))) { … … 1313 1333 //========================================================= 1314 1334 } else if (theme.match(RegExp("stripped", "gi"))) { 1315 1335 1316 1336 info_theImageAndTitle = jQuery("#theImageAndTitle").infos(); 1317 1337 info_description.top = info_img.bottom; 1318 info_description.bottom = info_theImageAndTitle.bottom + 1319 info_theImageAndTitle.margin.bottom + 1320 info_theImageAndTitle.margin.top + 1321 info_description.borderwidth.top + 1338 info_description.bottom = info_description.borderwidth.top + 1322 1339 info_description.borderwidth.bottom; 1340 1341 if (options.imageAutosizeTitle) { 1342 1343 check_desc_v = true; 1344 h0 = info_theImageAndTitle.bottom - info_img.bottom; 1345 info_description.bottom += info_theImageAndTitle.bottom+ 1346 marges_llgbo/2 ; //+ 1347 // info_theImageAndTitle.margin.top; 1348 // info_theImageAndTitle.margin.bottom + 1349 } ; 1350 1323 1351 1324 1352 } else { 1325 1353 info_description.bottom = info_theImage.bottom; 1326 1354 info_description.top = info_img.height + info_theImage.top; 1327 info_description.bottom -= info_img.top;1355 // info_description.bottom -= info_img.top; 1328 1356 } 1329 1357 // if (msie == true) info_description.bottom -= 4; 1330 1358 1331 1359 info_description.height = info_description.bottom - info_description.top; 1332 1360 1333 if (check_desc_v != 'checked="checked"') {1361 if (check_desc_v ==false) { 1334 1362 info_description.height = 0; 1335 1363 } … … 1337 1365 Debug_pos(); 1338 1366 1339 1367 // cl_visible=false ; 1340 1368 return info_description; 1341 1369 } -
extensions/Autosize/main.inc.php
r8957 r8981 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.4.4 24 Version: 1.4.44 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
r8957 r8981 41 41 42 42 var check_auto_w = '{$check_auto_w}'; 43 var check_desc_v = '{$check_desc_v}'; 43 44 var check_desc_v = ('{$check_desc_v}' == 'checked="checked"') ? true : false; 44 45 </script> 45 46 -
extensions/Autosize/template/header_2_1.tpl
r8959 r8981 4 4 {known_script id="conflit_script" src = $AUTOSIZE_PATH|@cat:"js/conflit.js" } 5 5 {known_script id="dimensions" src = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js" } 6 7 {known_script 8 id="cookie" src = $AUTOSIZE_PATH|@cat:"js/jquery.cookie.js" } 6 9 {/html_head}
Note: See TracChangeset
for help on using the changeset viewer.