Changeset 12527 for extensions/Autosize
- Timestamp:
- Oct 28, 2011, 4:44:20 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r11961 r12527 29 29 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 30 30 31 header ('X-UA-Compatible: n=7') ;32 31 // header ('X-UA-Compatible: n=7') ; 32 // header ('X-UA-Compatible: IE=Edge') ; 33 33 if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; 34 34 … … 50 50 $DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ; 51 51 //================================================================================================= 52 53 52 $autosize_parametres = cl_autosize_Get_Options() ; 54 53 $theme=$user['theme']; … … 64 63 'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH) , 65 64 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS, 66 'Version_pwg' => PHPWG_VERSION 65 'Version_pwg' => PHPWG_VERSION 67 66 ) 68 67 ); … … 72 71 //=========================================================== 73 72 /* 74 * cl_autosize_script_2( admin)73 * cl_autosize_script_2() 75 74 */ 76 75 static public function cl_autosize_script_2() … … 90 89 $theme=$user['theme']; 91 90 if ($ma_page=='thePiwiShackControllerPage') return ; 92 91 92 93 93 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480; 94 94 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320; … … 96 96 $img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480; 97 97 $img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320; 98 99 100 101 98 102 $src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width ; 99 103 $src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height ; 104 if(isset($_COOKIE['img_w'])){ 105 $src_img_w=$_COOKIE['img_w']; 106 $src_img_h=$_COOKIE['img_h']; 107 } 108 100 109 $window_height= isset($_POST['window_height'])?$_POST['window_height']: $img_scaled_height ; 101 110 $window_width= isset($_POST['window_width'])?$_POST['window_width']: $img_scaled_width ; … … 107 116 'window_height' =>$window_height, 108 117 'window_width' => $window_width 118 109 119 ); 110 120 … … 122 132 ) 123 133 ); 124 134 125 135 $autoscript="<script type='text/javascript'> 126 136 /* cl_autosize_script_2 */ 127 137 if (typeof (save_framework) == 'function') 128 save_framework('".$ma_page."'); 138 save_framework('".$ma_page."'); 129 139 </script>"; 130 140 … … 179 189 $template->assign('cl_autosize_button', 180 190 array( 'cl_autosize_info' => 'cl_autosize_info' , 191 'cl_autosize_info_1' => 'cl_autosize_info_' , 181 192 'cl_autosize_info_2' => 'cl_autosize_info_2' , 182 193 'URL' => $_SERVER['REQUEST_URI'] , -
extensions/Autosize/css/autosize.css
r12078 r12527 80 80 } 81 81 #form_autosize_picture { 82 z-index: -100; 83 display: none; 84 visibility: hidden; 85 position:fixed; 86 top:-200px; 82 87 83 } 88 84 .Image { -
extensions/Autosize/js/Affiche_script.js
r12060 r12527 1 1 Parent = "#theImage"; 2 // problème avec GMaps+diaporama: 3 // corriger gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow'])) 2 4 function Toggle_bp() { 3 5 cl_visible = !cl_visible; 4 6 set_cl(); 5 7 jQuery().newResize(); … … 8 10 function set_cl(){ 9 11 if (typeof cl_visible == "undefined") return; 10 if (typeof src1 == "undefined") return; 12 if (typeof src1 == "undefined") return; 13 11 14 if (cl_visible) src = src1; 12 15 else src = src2; 13 if (cl_visible) src_info = src3; 14 else src_info = src4; 16 17 if (cl_visible) { 18 src_info = src3; 19 src_info_1 = src3; 20 } 21 else { 22 src_info = src4; 23 src_info_1 = src5; 24 } 15 25 16 26 jQuery('#bp_cla').attr('alt', src_info); … … 19 29 jQuery('#bp_cla').attr('Stitle', src_info); 20 30 jQuery('#bp_cla').attr('Stip', " "); 21 31 zoom = jQuery('#zoom ').val(); 32 jQuery('#bp_cla').text(src_info_1); 33 jQuery('#bp_cla span').text(zoom+"%" ); 22 34 bp_scr = jQuery('#bp_img_cla'); 23 35 24 36 if (bp_scr.length > 0) { 25 bp_scr.get(0).src = src;26 jQuery('#bp_img_cla').attr('alt', src_info);27 jQuery('#bp_img_cla').attr('title', src_info);37 bp_scr.get(0).src = src; 38 jQuery('#bp_img_cla').attr('alt', src_info); 39 jQuery('#bp_img_cla').attr('title', src_info); 28 40 } 29 41 … … 66 78 //========================================================================== 67 79 function Wait_Affichage() { 68 href = location.href; 69 70 jQuery.post(href, function (data) { }); 71 // alert("Data Loaded: " + data); 80 72 81 if (typeof fade_in == "undefined") fade_in = 1000; 73 82 fade_in = parseInt(fade_in); … … 83 92 jQuery(Parent).css({ opacity: "1" }); 84 93 } else { 85 94 jQuery(Parent).animate({ opacity: "1" }, 86 95 fade_in, "swing", 87 96 function (i) { 88 jQuery(Parent).css({ opacity: "1" }); 89 if (DEBUG_autosize == "true") { 90 bp1 = jQuery('.debug').get(nu_img); 91 if (!bp1) nu_img = 0; 92 bp1 = jQuery('.debug').get(nu_img); 93 jQuery(bp1).trigger('ON'); 94 } 97 jQuery(Parent).css({ opacity: "1" }); 98 if (DEBUG_autosize == "true") { 99 100 nu_img--; 101 if (nu_img < 1) nu_img = 1; 102 103 bp1 = jQuery('.debug').get(nu_img); 104 jQuery(bp1).trigger('ON'); 105 } 95 106 } 96 107 ); 97 108 98 } 109 } 110 111 99 112 // if (nu_img > 1) return; 100 113 if (typeof theImg == "undefined") return true; … … 118 131 jQuery("#window_height").val(Window_Affichage.height); 119 132 jQuery("#window_width").val(Window_Affichage.width); 120 jQuery("#ret_autosize").trigger('ON', { width: img_w, 133 134 jQuery("#ret_autosize").trigger('ON', { 135 width: img_w, 121 136 height: img_h, 122 137 theImage: theImg, … … 231 246 //=============================================== 232 247 jQuery.extend(jQuery.expr[':'], { 233 234 248 // Nom du sélecteur personnalisé 249 Autosize: function (a) { 235 250 nd = a.nodeName; 236 237 238 251 n1 = a.className; 252 // personal_block 253 if (n1.match(RegExp("autosize", "gi"))) { 239 254 // autosize = "MargeBasse:30px; ResizePicture:false" 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 infconf = jQuery(a).attr("autosize"); 256 n1 = typeof infconf; 257 conf = { MargeBasse: 0, NoPicture: false } 258 if (n1 == "undefined") { 259 260 } else { 261 tableau = infconf.split(";"); 262 for (var i = 0; i < tableau.length; i++) { 263 tableau2 = tableau[i].split(":"); 264 conf[jQuery.trim(tableau2[0])] = jQuery.trim(tableau2[1]); 265 } 266 imgs = jQuery(a).find("img"); 267 rap = new Array(); 268 width = new Array(); 269 height = new Array(); 255 270 if (imgs.length > 0) 256 257 258 259 260 261 271 jQuery(imgs).each(function (i) { 272 img = jQuery(this); 273 rap.push((img.width() / img.height())); 274 width.push(img.width()); 275 height.push(img.height()); 276 }); 262 277 else { 263 278 imgs = jQuery(a).children(); 264 279 jQuery(imgs).each(function (i) { 265 if (this.height >0) {280 if (this.height > 0) { 266 281 rap.push(this.width / this.height); 267 282 width.push(this.width); … … 274 289 } 275 290 276 277 278 279 280 281 jQuery(a).css({ opacity: 0 });282 283 284 285 286 287 288 291 conf['rap'] = rap; 292 conf['width'] = width; 293 conf['height'] = height; 294 295 List_autosize.push({ obj: a, conf: conf }); 296 jQuery(a).css({ opacity: 0 }); 297 } 298 } 299 // Css = jQuery(a).getStyles(a); 300 return false; 301 302 }, 303 Set_Class: function (a) { 289 304 nd = a.nodeName; 290 305 if (nd == "DIV") { 291 XBrowserAddHandler(a,'onpropertychange', onPropertyChange);292 //jQuery(a).find("img:nth-child(1)").css("border","Solid 5px green");293 img = jQuery(a).children("img");294 if (img.length == 0) img = jQuery(a).find("a").children("img");295 if (img.length > 0)296 if (img.length == 1) {297 if (img[0].src.match(RegExp(".png", "g")))298 return;299 // img[0].attachEvent('onpropertychange', onPropertyChange);300 XBrowserAddHandler(img[0],'onpropertychange', onPropertyChange);301 jQuery(img).addClass("Image");302 //jQuery(img).attr("autosize", "MargeBasse:0px; ResizePicture:true");303 }304 } 305 306 XBrowserAddHandler(a, 'onpropertychange', onPropertyChange); 307 //jQuery(a).find("img:nth-child(1)").css("border","Solid 5px green"); 308 img = jQuery(a).children("img"); 309 if (img.length == 0) img = jQuery(a).find("a").children("img"); 310 if (img.length > 0) 311 if (img.length == 1) { 312 if (img[0].src.match(RegExp(".png", "g"))) 313 return; 314 // img[0].attachEvent('onpropertychange', onPropertyChange); 315 XBrowserAddHandler(img[0], 'onpropertychange', onPropertyChange); 316 jQuery(img).addClass("Image"); 317 //jQuery(img).attr("autosize", "MargeBasse:0px; ResizePicture:true"); 318 } 319 } 320 } 306 321 }); 307 322 function XBrowserAddHandler(target,eventName,handlerName){ … … 386 401 jQuery(document).ready( 387 402 function (jQuery) { 388 jQuery(':Autosize');403 // jQuery(':Autosize'); 389 404 jQuery(window).unload(function () { 390 405 try { … … 396 411 397 412 if (typeof Window_Affichage != "undefined") { 398 jQuery.cookie('window_height', Window_Affichage.height);399 jQuery.cookie('window_width', Window_Affichage.width);400 }413 jQuery.cookie('window_height', Window_Affichage.height); 414 jQuery.cookie('window_width', Window_Affichage.width); 415 } 401 416 } 402 417 } catch (r) { … … 410 425 ********************************************/ 411 426 jQuery(window).load(function () { 412 jQuery(':Set_Class'); 427 428 href = location.href; 429 var aff_ok = false; 430 /* 431 jQuery.post(href, function (data) { 432 nu_img--; 433 if (nu_img < 0) nu_img = 9; 434 jQuery(jQuery('.debug').get(nu_img)).trigger('ON'); 435 //alert("Data Loaded: " + data); 436 Wait_Affichage(); 437 }); 438 */ 439 // jQuery(':Set_Class'); 413 440 if (typeof img_width == "undefined") { 414 441 if (List_autosize.length == 0) return; … … 457 484 var old_window = { width: 0, height: 0 }; 458 485 459 Bandeau_bas = Info_Description_f(Parent); 486 Bandeau_bas = Info_Description_f(Parent); 460 487 if (typeof Bandeau_bas == "undefined") { 461 488 462 489 } 463 490 if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top; … … 519 546 set_cl(); 520 547 if (typeof options != "undefined") 521 if (options.imageAutosize) 548 if (options.imageAutosize) { 549 Wait_Affichage(); 522 550 return true; //stripped 523 if (DEBUG_autosize == "true") { 524 nu_img += 1; 525 526 bp1 = jQuery('.debug').get(nu_img); 527 if (!bp1) nu_img = 0; 528 bp1 = jQuery('.debug').get(nu_img); 529 530 jQuery(bp1).trigger('ON'); 531 } 551 } 552 553 532 554 if (typeof cl_visible == "undefined") return true; 533 555 if (!cl_visible == true) { return true; } … … 551 573 552 574 var Cadre = jQuery(Parent).get(0); 553 575 554 576 //=============== Information cadre ====== 555 577 var info_the_page = jQuery("#the_page").infos(); … … 588 610 } 589 611 590 if (jQuery('#_Comment, ').length==0)612 if (jQuery('#_Comment, ').length == 0) 591 613 jQuery('.imageComment, ').wrapAll('<div id="_Comment" />'); 592 614 … … 611 633 if (theme.match(RegExp("stripped", "gi"))) { 612 634 613 marge = (info_the_page.width - info_HeaderBar.width) / 2; 635 info_imageHeaderBar = jQuery("#imageHeaderBar").infos(); 636 marge = (info_the_page.width - info_content.width) / 2; 614 637 marge_right = marge + 2; 615 638 marge_left = marge + 2; … … 688 711 //the theMainImage ?? 689 712 if (!theImg) { 690 theImg = jQuery("#theMainImage");691 if (theImg.length > 0)692 return;693 theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");713 theImg = jQuery("#theMainImage"); 714 if (theImg.length > 0) 715 return; 716 theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]"); 694 717 // return; 695 if (theImg.length > 0)696 theImg = theImg[0];697 else698 theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");718 if (theImg.length > 0) 719 theImg = theImg[0]; 720 else 721 theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]"); 699 722 } 700 723 info_theImage = jQuery(theImg).infos(); … … 710 733 theImg = jQuery("#the_page #theImg"); 711 734 } 712 info_theImage = jQuery(theImg).infos(); 735 713 736 info_the_page = jQuery("#the_page").infos(); 714 737 … … 857 880 info_Licence = jQuery(".licencetag").infos(); 858 881 859 jQuery(Parent + " #theImg IMG").css("marginTop", "0px"); 882 var MainImage = jQuery("#theMainImage"); 883 884 if (MainImage.length == 0) jQuery(Parent + " #theImg IMG").css("marginTop", "0px"); 885 860 886 //========== Correction en fonction du thème ============================= 861 887 var correction = 0; … … 889 915 890 916 h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); 891 if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top |0;917 if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top | 0; 892 918 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; 893 919 //========================================================================= … … 897 923 Zone_Affichage.width = mini_width2; 898 924 //========================================================================= 899 if (typeof (Bandeau_bas) != "undefined") { 925 if (typeof (Bandeau_bas) != "undefined") { 900 926 if (Bandeau_bas.height < Zone_Affichage.height) Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom); 901 927 } else { 902 928 } 903 929 … … 1122 1148 1123 1149 1124 1125 jQuery("#player").css("width", img_finale.width + "px"); 1126 jQuery("#player").css("height", img_finale.height); 1127 1128 jQuery("#embedplayer").css("width", img_finale.width); 1129 jQuery("#embedplayer").css("height", img_finale.height); 1130 1131 jQuery("embed").css("height", img_finale.height); 1132 1133 jQuery("video").height(img_finale.height); 1134 jQuery("video").width(img_finale.width); 1135 1136 jQuery("video").css({ height: img_finale.height+"px" }); 1137 jQuery("object").css({ height: img_finale.height+"px" }); 1138 1139 jQuery("object").width(img_finale.width); 1140 jQuery("object").height(img_finale.height); 1141 1142 jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //?? 1143 jQuery(theImg).height(img_finale.height); 1144 1145 jQuery(Cadre).css("height", "auto"); 1150 if (MainImage.length > 0) { 1151 img_finale.height = parseInt(img_finale.width / rapport); 1152 img_finale.height -= 30; 1153 img_finale.width = rapport * img_finale.height; 1154 1155 1156 MainImage.width(img_finale.width); 1157 MainImage.height(img_finale.height); 1158 jQuery("#embedplayer").width(300); 1159 jQuery("#embedplayer").height(15); 1160 } else { 1161 jQuery("#player").css("width", img_finale.width + "px"); 1162 jQuery("#player").css("height", img_finale.height); 1163 jQuery("#embedplayer").css("width", img_finale.width); 1164 jQuery("#embedplayer").css("height", img_finale.height); 1165 jQuery("embed").css("height", img_finale.height); 1166 jQuery("video").height(img_finale.height); 1167 jQuery("video").width(img_finale.width); 1168 jQuery("video").css({ height: img_finale.height + "px" }); 1169 jQuery("object").css({ height: img_finale.height + "px" }); 1170 jQuery("object").width(img_finale.width); 1171 jQuery("object").height(img_finale.height); 1172 jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //?? 1173 jQuery(theImg).height(img_finale.height); 1174 jQuery(Cadre).css("height", "auto"); 1175 } 1176 1177 1146 1178 } else if (Type_Img == "embed") { 1147 1179 1148 jQuery(Cadre).css("height", "auto"); 1149 jQuery("embed").css("height", img_finale.height); 1150 jQuery("object").css({ height: img_finale.height + "px" }); 1151 1152 jQuery("object").width(img_finale.width); 1153 jQuery("object").height(img_finale.height); 1180 if (MainImage.length > 0) { 1181 img_finale.height = parseInt(img_finale.width / rapport); 1182 img_finale.height -= 30; 1183 img_finale.width = rapport * img_finale.height; 1184 1185 1186 MainImage.width(img_finale.width); 1187 MainImage.height(img_finale.height); 1188 jQuery("#embedplayer").width(300); 1189 jQuery("#embedplayer").height(15); 1190 } else { 1191 jQuery(Cadre).css("height", "auto"); 1192 jQuery("embed").css("height", img_finale.height); 1193 jQuery("object").css({ height: img_finale.height + "px" }); 1194 1195 jQuery("object").width(img_finale.width); 1196 jQuery("object").height(img_finale.height); 1197 } 1154 1198 1155 1199 } else if (Type_Img == "panorama") { … … 1304 1348 zoom = parseInt(zoom * 100); 1305 1349 jQuery('#zoom ').val(zoom); 1306 jQuery('#bp_cla').text(zoom + "%"); 1307 1350 jQuery('#bp_cla span').text(zoom + "%"); 1308 1351 // --- réglage de la hauteur de page en fonction du copyright----------- 1309 1352 if (typeof (pos_copyright) == "undefined") pos_copyright = jQuery("#copyright").infos(); … … 1326 1369 info_frame = jQuery(Cadre).infos(); 1327 1370 if (theme.match(RegExp("stripped", "gi"))) { 1371 /* 1328 1372 info_theImageBox = jQuery("#theImageAndTitle").infos(); 1329 1373 p1 = jQuery(".randomButtons").infos(); 1330 1374 p2 = jQuery("#imageHeaderBar").infos(); 1375 p3 = info_content.top; 1376 p1 = options.imageAutosizeTitle; 1377 1331 1378 jQuery("#theImage").width("width", info_theImageBox.width + "px"); 1332 jQuery("#theImageAndTitle").css("position", "relative");1333 jQuery("# theImageAndTitle").css({marginTop: "0px",1334 paddingTop: (p1.top) + "px"1379 //jQuery("#theImageAndTitle").css("position", "relative"); 1380 jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px", 1381 paddingTop: "0px", textAalign: "center", marginLeft: "auto" 1335 1382 }); 1383 1384 jQuery("#theImageAndTitle").css({ position: "relative", top: "0px", marginTop: "0px", 1385 paddingTop: "0px", marginLeft: "auto" 1386 }); */ 1336 1387 t1 = info_theImageBox.top; 1337 1388 l1 = info_theImageBox.left; … … 1351 1402 1352 1403 Window_Affichage = info_theImageBox; 1353 if (DEBUG_autosize == " true") {1404 if (DEBUG_autosize == "_true") { 1354 1405 // jQuery(Cadre).css("border", "solid green"); 1355 1406 … … 1391 1442 var w00 = 0; 1392 1443 var myImg = null; 1393 img = jQuery(myobj); 1444 1445 img = jQuery("#theMainImage"); 1446 if (img != null) { 1447 return; 1448 1449 } 1450 img = jQuery(myobj); 1394 1451 1395 1452 img = jQuery('img[alt]'); … … 1586 1643 1587 1644 } else if (jQuery("#charlie").length > 0) { 1588 info_charlie = jQuery("#charlie").infos(); 1589 if (jQuery("object").attr("type") == 'application/x-shockwave-flash') { 1645 info_charlie = jQuery("#charlie").infos(); 1646 obj_charlie = jQuery("object"); 1647 try { 1648 tp = obj_charlie.attr(); 1649 } catch (e) { 1650 tp = obj_charlie.prop(); 1651 } 1652 1653 if (tp!=undefined) { 1654 if (obj_charlie.length > 0) 1655 tp = jQuery("object").attr("type") || jQuery("object").prop("type"); 1656 else 1657 tp = jQuery("embed").attr("type") || jQuery("embed").prop("type"); 1658 } 1659 1660 if (tp == 'application/x-shockwave-flash') { 1590 1661 jQuery("#charlie").css({ 1591 1662 paddingTop: "0px", … … 1602 1673 }); 1603 1674 } 1604 theImg = jQuery("#charlie"); 1605 info_img = jQuery(theImg).infos(); 1675 1676 var MainImage = jQuery("#theMainImage"); 1677 1678 if (MainImage.length == 0) { 1679 theImg = jQuery("#charlie"); 1680 info_img = jQuery(theImg).infos(); 1681 } else { 1682 theImg = jQuery("#theMainImage"); 1683 info_img = jQuery(theImg).infos(); 1684 1685 } 1606 1686 1607 1687 1608 1688 } else if (jQuery(Parent + " embed").length > 0) { 1609 1610 theImg = jQuery(Parent + " embed"); 1611 1612 info_img = jQuery(theImg).infos(); 1613 jQuery(Parent + " embed").width({ width: info_img.width+"px", height: info_img.height + "px" }); 1614 1689 if (jQuery("#theMainImage").lenght == 0) { 1690 theImg = jQuery(Parent + " embed"); 1691 info_img = jQuery(theImg).infos(); 1692 jQuery(Parent + " embed").width({ width: info_img.width + "px", height: info_img.height + "px" }); 1693 } else { 1694 theImg = jQuery("#theMainImage"); 1695 info_img = jQuery(theImg).infos(); 1696 Type_Img == "charlie" 1697 } 1615 1698 1616 1699 } else if (Type_Img == "pamoorama") { … … 1624 1707 info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height); 1625 1708 1626 } else { 1627 theImg = jQuery(Parent + " img[alt]"); 1709 } else { 1710 var MainImage = jQuery("#theMainImage"); 1711 1712 if (MainImage.length == 0) { 1713 theImg = jQuery(Parent + " img[alt]"); 1714 } else { 1715 theImg = jQuery("#theMainImage"); 1716 } 1628 1717 1629 1718 //theImg = Get_Img_Maxi(theImg); … … 1678 1767 } else if (theme.match(RegExp("stripped", "gi"))) { 1679 1768 //options.imageAutosize 1680 //options.imageMargin 1769 //options.imageMargin 1770 jQuery("#content").css({paddingTop:"5px"}); 1771 info_content = jQuery("#content").infos(); 1681 1772 if (options.imageAutosizeTitle == false) { 1682 info_description.top = info_theImageBox.bottom ;1773 info_description.top = info_theImageBox.bottom ; 1683 1774 1684 1775 info_description.bottom =info_HeaderBar.margin.top+ info_description.top + … … 1691 1782 1692 1783 1693 info_description.top = info_theImageBox.bottom +1694 jQuery("#content").infos().top +1784 info_description.top = info_theImageBox.bottom - 1785 info_content.top + 1695 1786 options.imageAutosizeMargin * 2 + 1696 1787 (marges_llgbo / 2) … … 1759 1850 //==================================================== 1760 1851 function Debug_pos() { 1852 return; 1761 1853 if (DEBUG_autosize == "true") { 1762 1854 … … 1797 1889 //'gallyInterfaceReady' 1798 1890 1799 1800 1801 if (typeof Bandeau_bas =="undefined" || Bandeau_bas.width == 0) {1802 1803 1804 1891 jQuery('#pamoorama').live('ON', function (e) { 1892 jQuery(jQuery('.debug').get(1)).trigger('ON'); 1893 if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) { 1894 Bandeau_bas = Info_Description_f(Parent); 1895 Bandeau = Bandeau_bas.top; 1896 old_window = { width: 0, height: 0 }; 1805 1897 jQuery(window).resize(); 1806 1898 1807 1899 } 1808 1900 1809 // Wait_Affichage(); 1810 }); 1811 1812 jQuery(Parent).live('ON', function (e) { 1813 jQuery(jQuery('.debug').get(1)).trigger('ON'); 1814 Wait_Affichage(); 1815 }); 1816 1817 // Custom Event, ON to turn on a debug. 1818 jQuery('.debug').live('ON', function (e) { 1819 1820 jQuery('.debug').trigger('OFF'); 1821 jQuery(this).addClass('debugOn'); 1822 }); 1823 1824 // On Click = debugs On 1825 jQuery('.debug').live('click', function (e) { 1826 1827 jQuery(this).trigger('ON'); 1828 }); 1829 1830 // Custom Event, Turn off a debug 1831 jQuery('.debug').live('OFF', function (e) { 1832 1833 jQuery(this).removeClass('debugOn'); 1834 }); 1835 1836 // on Double Click, remove the debug from the DOM 1837 jQuery('.debug').live('dblclick', function () { 1838 1839 jQuery(this).fadeOut(function () { $(this).remove() }); 1840 }); 1841 1842 // Add another debug to the DOM 1843 jQuery('#adddebugs').click(function () { 1844 jQuery('<div></div>') 1901 // Wait_Affichage(); 1902 }); 1903 1904 1905 1906 jQuery('#ret_autosize').live('ON', function (e) { 1907 if (nu_img == "") nu_img = 8 ; 1908 jQuery(jQuery('.debug').get(nu_img)).trigger('ON'); 1909 1910 }); 1911 1912 jQuery(Parent).live('ON', function (e) { 1913 if (nu_img == "") nu_img = 7; 1914 jQuery(jQuery('.debug').get(nu_img)).trigger('ON'); 1915 // Wait_Affichage(); 1916 }); 1917 // Custom Event, ON to turn on a debug. 1918 jQuery('.debug').live('ON', function (e) { 1919 1920 nu_img = jQuery(this).text(); 1921 jQuery('.debug').trigger('OFF'); 1922 jQuery(this).addClass('debugOn'); 1923 1924 }); 1925 1926 // On Click = debugs On 1927 jQuery('.debug').live('click', function (e) { 1928 i = jQuery(this).text(); 1929 jQuery(this).trigger('ON'); 1930 }); 1931 1932 // Custom Event, Turn off a debug 1933 jQuery('.debug').live('OFF', function (e) { 1934 jQuery(this).removeClass('debugOn'); 1935 }); 1936 1937 // on Double Click, remove the debug from the DOM 1938 jQuery('.debug').live('dblclick', function () { 1939 jQuery(this).fadeOut(function () { jQuery(this).remove() }); 1940 }); 1941 1942 // Add another debug to the DOM 1943 jQuery('#adddebugs').click(function () { 1944 i = jQuery('.debug').length; 1945 jQuery('<div>' + i + '</div>') 1845 1946 .addClass('debug') 1846 1947 .appendTo('#debugsContainer'); 1847 }); 1848 1849 // Add 10 testing debugs to start with 1850 jQuery(window).load(function () { 1851 DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false"; 1852 if (DEBUG_autosize == "true") { 1853 for (var i = 0; i < 10; i++) { 1854 jQuery('#adddebugs').click(); 1855 } 1856 jQuery(jQuery('.debug').get(8)).click(); 1857 1858 1859 1860 } 1861 }); //on load 1948 }); 1949 1950 // Add 10 testing debugs to start with 1951 jQuery(window).load(function () { 1952 DEBUG_autosize = (typeof DEBUG_autosize != "undefined") ? DEBUG_autosize : "false"; 1953 if (DEBUG_autosize == "true") { 1954 for (var i = 0; i < 10; i++) { 1955 jQuery('#adddebugs').click(); 1956 } 1957 jQuery(jQuery('.debug').get(i - 1)).click(); 1958 } 1959 1960 }); //on load 1862 1961 }); -
extensions/Autosize/js/conflit.js
r11461 r12527 522 522 523 523 librairies = new Array; 524 $_ = $; 524 525 525 function save_framework(page) { 526 526 // theGategoryPage,theRegisterPage … … 559 559 } 560 560 561 $_2 = $;561 562 562 return 563 563 } 564 564 565 565 (function ($) { 566 $(document).ready(function () {566 jQuery(document).ready(function () { 567 567 //================================================= 568 568 if (typeof jQuery.fn.infos != "function") { … … 571 571 } 572 572 }); 573 574 })(jQuery);575 576 577 //--------------------------------------------------------------578 $_0 = $;579 573 function $(element, nc0) { 580 574 if (typeof jQuery.fn.infos != "function") … … 584 578 return a; 585 579 } 580 })(jQuery); 581 582 583 //-------------------------------------------------------------- 586 584 //=== ajout des fonctions jQuery === 587 jQuery.extend($, jQuery); 585 if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 586 // $ = jQuery.noConflict(); 587 // jQuery.extend($, jQuery); 588 } else { 589 590 591 /* */ 592 } -
extensions/Autosize/js/conflit_2.js
r11461 r12527 2 2 //=== ajout des fonctions jQuery === 3 3 if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 4 $mootools = window.$;4 5 5 } else { 6 6 if (typeof jQuery != 'undefined') { -
extensions/Autosize/language/fr_FR/plugin.lang.php
r10845 r12527 1 1 <?php 2 2 global $lang; 3 $lang['cl_autosize_info_1'] = "Affichage auto."; 3 4 4 5 $lang['cl_autosize_hlp_line3'] = "Si la taille originale de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. " ; -
extensions/Autosize/main.inc.php
r11461 r12527 34 34 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 35 35 36 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL+20 , 2);36 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL+20 ); 37 37 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL+21 ); 38 38 -
extensions/Autosize/template/autosize.tpl
r11961 r12527 10 10 var img_width='{$IMG_WIDTH }'; 11 11 var img_height = '{ $IMG_HEIGHT }'; 12 13 var cookie_width='{$COOKIE_WIDTH }'; 14 var cookie_height = '{ $COOKIE_HEIGHT }'; 15 12 16 13 17 var marge_basse='{ $MARGE_BASSE }'; … … 58 62 .debug { 59 63 display: inline-block; 60 width: 45px;61 height: 45px;64 width: 12px; 65 height:12px; 62 66 background-color: black; 63 67 margin: 2px; 64 68 } 69 65 70 .debugOn { 66 71 background-color: yellow; 67 72 border: solid 1px black; 68 width: 43px;69 height: 43px;70 73 } 71 74 … … 88 91 <div id="Debug5" align=center style="color:black;z-index:2000;position:absolute; background-color:red; top:100px;left:0px;width:300px;margin:auto;"></div> 89 92 <div id="Debug6" align=center style="display:none"></div> 90 <p><button id="adddebugs">Add a debug</button></p>91 93 92 <div id="debugsContainer"><div class="debug"></div></div> 94 95 <div id="debugsContainer"><button id="adddebugs" style="display:none">Add a debug</button> 96 <div class="debug"></div> 97 </div> 93 98 {/literal} 94 99 {else} … … 100 105 101 106 102 103 104 <input id='ret_autosize' name='ret_autosize' type=' submit' value='' />105 <input id='src_img_h' name='src_img_h' type=' text' value='' />106 <input id='src_img_w' name='src_img_w' type=' text' value='' />107 <input id='window_height' name='window_height' type=' text' value='' />108 <input id='window_width' name='window_width' type=' text' value='' />109 <input id='zoom' name='zoom' type=' text' value='100%' />110 </form > 107 <div style="display:none"> 108 <form action='' method='post' name='form_autosize_picture' id='form_autosize_picture' type='submit' > 109 <input id='ret_autosize' name='ret_autosize' type='hidden' value='' /> 110 <input id='src_img_h' name='src_img_h' type='hidden' value='' /> 111 <input id='src_img_w' name='src_img_w' type='hidden' value='' /> 112 <input id='window_height' name='window_height' type='hidden' value='' /> 113 <input id='window_width' name='window_width' type='hidden' value='' /> 114 <input id='zoom' name='zoom' type='hidden' value='' /> 115 </form ></div> -
extensions/Autosize/template/conflit.tpl
r11461 r12527 6 6 var cl_plugin = '{$name}'; 7 7 var Version_pwg='{$Version_pwg}'; 8 9 var Cookie_width='{$COOKIE_WIDTH }'; 10 var Cookie_height = '{$COOKIE_HEIGHT }'; 11 8 12 {if $DEBUG_autosize == "true"} 9 13 var cl_query = '{$autosize_parametres->query}'; -
extensions/Autosize/template/picture.tpl
r11961 r12527 14 14 title="{'cl_autosize_info_2'|@translate}" 15 15 alt="{'cl_autosize_info_2'|@translate}" /> 16 <img class="button" id="bp_img_cla" alt="{'cl_autosize_info_2'|@translate}" src="{$cl_autosize_button.ICON}" complete="complete"/>{$zoom} 16 <img class="button" id="bp_img_cla" alt="{'cl_autosize_info_2'|@translate}" src="{$cl_autosize_button.ICON}" complete="complete"/><span> 17 </span> 17 18 </a> 18 19 … … 51 52 var src3="{'cl_autosize_info_2'|@translate}"; 52 53 var src4 = "{'cl_autosize_info'|@translate}"; 54 var src5 = "{'cl_autosize_info_1'|@translate}"; 53 55 </script>
Note: See TracChangeset
for help on using the changeset viewer.