Changeset 7536
- Timestamp:
- Nov 1, 2010, 10:25:51 AM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/template/admin.tpl
r7394 r7536 1 1 {html_head} 2 2 <script type="text/javascript"> 3 var DEBUG = '{$DEBUG}'; 3 4 var thumbnail = '{$thumbnail}'; 4 5 var theme = '{$theme}'; -
extensions/Autosize/autosize.inc.php
r7394 r7536 20 20 // | USA. | 21 21 // +-----------------------------------------------------------------------+ 22 if (!defined('AUTOSIZE_PATH')) 23 define('AUTOSIZE_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 22 if (!defined('AUTOSIZE_PATH')) 23 define( 24 'AUTOSIZE_PATH', 25 PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' 26 ); 24 27 25 28 class autosize_controler { … … 36 39 load_language('lang', AUTOSIZE_PATH); 37 40 $my_path = dirname(__FILE__).'/'; 41 38 42 if (isset( $page['body_id']) ) { 39 43 if ( $page['body_id']=='thePicturePage' ) { … … 41 45 42 46 $autosize_parametres = cl_autosize_Get_Options(); 43 include (AUTOSIZE_PATH."include/affiche.php"); 47 include (AUTOSIZE_PATH."include/affiche.php"); 48 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 49 $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ; 50 44 51 if($autosize_parametres->check_icon_v == 'on'){ 52 45 53 $template->assign('cl_autosize_button', 46 array( 54 array( 47 55 'cl_autosize_info' => 'cl_autosize_info' , 48 56 'cl_autosize_info_2' => 'cl_autosize_info_2' , … … 51 59 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png' 52 60 ) 61 53 62 ); 54 63 … … 56 65 $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); 57 66 } 67 68 58 69 $template->set_filenames( 59 70 array('autosize_content'=> $my_path.'template/autosize.tpl') 60 71 ); 61 72 $template->assign( 73 array('DEBUG' => $debug , 74 'cl_visible' => $cl_visible 75 ) 76 ); 77 62 78 return $template->parse( 'autosize_content', false); 63 79 } … … 117 133 { 118 134 global $template,$user,$conf ; 119 120 121 $my_path = dirname(__FILE__).'/'; 135 136 137 138 $my_path = basename(dirname(__FILE__)).'/' ; 139 $my_path = dirname(__FILE__).'/'; 122 140 $template->set_filenames( 123 array('autosize_ cl_init'=> $my_path.'template/cl_conflit.tpl')124 );125 141 array('autosize_init'=>$my_path. "template/conflit.tpl" 142 ) 143 ); 126 144 $template->assign( 127 array( 128 'AUTOSIZE_PATH' => $my_path, 129 130 ) 145 array('AUTOSIZE_ROOT' => AUTOSIZE_PATH) 131 146 ); 132 147 133 return $template->parse( 'autosize_ cl_init', false);148 return $template->parse( 'autosize_init', false); 134 149 135 150 … … 141 156 142 157 global $template,$user,$conf ; 143 $my_path = dirname(__FILE__).'/'; 158 $my_path = realpath(AUTOSIZE_PATH .'/'); 159 144 160 $template->set_filenames( 145 array('autosize_cl_init'=> $my_path.'template/c l_conflit.tpl')161 array('autosize_cl_init'=> $my_path.'template/conflit.tpl') 146 162 ); 147 163 /* -
extensions/Autosize/js/Affiche_script.js
r7458 r7536 1 var cl_visible = true; 1 2 2 function Toggle_bp() { 3 3 cl_visible = !cl_visible; … … 20 20 21 21 jQuery(document).ready( 22 22 23 function (jQuery) { 24 25 26 if (DEBUG == "false") { 27 jQuery("#Debug").hide(); 28 jQuery("#Debug1").hide(); 29 jQuery("#Debug2").hide(); 30 } 23 31 var img_top = "0"; 24 32 … … 30 38 var marges_llgbo = 0; 31 39 if (llgboframe.length > 0) { 32 33 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 40 ll1 = jQuery(llgboframe).info(); 41 ll2 = jQuery("#gbo div:last").info(); 42 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; 34 43 } 35 44 … … 47 56 48 57 49 58 //============================================================= 50 59 function cl_Timer() { 51 60 // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); } … … 64 73 setTimeout("cl_Timer()", 500); 65 74 } 75 //============================================================= 66 76 function onPropertyChange(e) { 67 77 var el = e.srcElement; … … 89 99 */ 90 100 function Info_entete(Parent) { 101 91 102 var info_imageToolBar = jQuery("#imageToolBar").info(); 92 103 if (info_imageToolBar.position == "absolute") { … … 97 108 98 109 if (info_theImage.position == "relative") { 99 //--- passage absolute ==> static ===/110 //--- passage relative ==> static ===/ 100 111 jQuery("#theImage").css("position", "static"); 101 112 info_theImage = jQuery("#theImage").info(); … … 108 119 109 120 } 110 121 111 122 marge_top = Info_the_page.top + 112 123 Info_the_page.borderwidth.top + … … 122 133 */ 123 134 function Info_description(Parent) { 124 jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " 125 }); 135 136 126 137 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 127 138 … … 136 147 marginRight: "auto", 137 148 marginTop: "0px", 138 marginBottom: "0px" 149 marginBottom: "0px", position: "absolute", top: Bandeau + "px" 139 150 }); 140 151 } else { 141 jQuery("#" + Parent).css({ padding: "0px", 142 marginLeft: "auto", 143 marginRight: "auto", 144 marginTop: "0px", 145 marginBottom: "0px" 152 153 /* jQuery("#" + Parent).css({ padding: "0px", 154 marginLeft: "auto", 155 marginRight: "auto", 156 marginTop: "0px", 157 marginBottom: "0px" 146 158 }); 147 } 159 */ 160 161 } 162 163 164 // jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " }); 165 148 166 149 167 if (theme.match(RegExp("luciano", "g"))) { 150 info_img = jQuery("#" + Parent + " #theImg").info(); 168 info_img = jQuery("#" + Parent + " #theImg img").info(); 169 151 170 } else { 152 171 … … 165 184 //============================================================================= 166 185 info_desc = jQuery("#" + Parent + " p:first").info(); 186 if (info_desc.bottom < info_img.bottom) 187 info_desc.bottom = info_img.bottom; 188 167 189 // if (info_desc.top > info_img.bottom) 168 190 // info_description.top = info_desc.top; 169 191 170 192 if (jQuery("#Panorama").length) { 193 Type_Img = "panorama"; 194 // cl_visible = false; 195 196 } 171 197 info_table = jQuery(".infoTable").info(); 172 198 … … 180 206 if (info_licencetag.bottom > 0) { 181 207 jQuery(".licencetag").css("border", "solid 5px transparent"); 182 if (info_licencetag.bottom > info_licencetag.height) 183 info_description.bottom = info_licencetag.bottom - 3; 208 if (info_licencetag.bottom > info_description.bottom) { 209 info_description.bottom = info_licencetag.bottom; 210 } 184 211 else 185 info_description.bottom -= info_licencetag.padding.top + info_table.margin.top;212 info_description.bottom += info_table.margin.top + info_table.padding.top; 186 213 187 214 } … … 217 244 } 218 245 } 246 247 if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 } 248 219 249 info_description.height = info_description.bottom - info_description.top; 220 250 221 if (0) { 251 252 if (DEBUG == "true") { 253 222 254 /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); 223 255 224 jQuery("#Debug").hide(); 225 jQuery("#Debug1").hide(); 226 jQuery("#Debug2").hide(); 256 227 257 info_description.width = "800"; 228 258 */ 229 259 jQuery("#Debug").css('display', 'block'); 260 jQuery("#Debug1").show(); 261 jQuery("#Debug2").show(); 230 262 Bandeau_bas = info_description; 231 263 … … 257 289 }); 258 290 jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom); 259 // cl_visible = false; 291 260 292 } 261 293 … … 285 317 jQuery().recentrage_widget(); 286 318 }) 287 319 jQuery("#icon_gmaps").bind('click', function () { 320 jQuery().recentrage_widget(); 321 }) 288 322 289 323 … … 315 349 jQuery(window).resize(function (event, ui) { 316 350 if (typeof (event) == 'undefined') return; 317 if (!cl_visible ) return;351 if (!cl_visible == true) return; 318 352 if (eval(user_status + "_enabled") == "") return; 319 353 var chk = eval(user_status + "_enabled"); … … 334 368 //=========================================================================== 335 369 336 337 var Cadre = jQuery("#theImage").get(0);338 370 339 371 var Type_Img = ""; … … 349 381 } else if (jQuery("#Panorama").length) { 350 382 Type_Img = "panorama"; 351 } else if (jQuery( Cadre).find("img").length > 0) {383 } else if (jQuery("#theImage").find("img").length > 0) { 352 384 Type_Img = "img"; 353 385 } else if (jQuery("img").length > 0) { … … 360 392 361 393 394 var Cadre = jQuery("#theImage").get(0); 362 395 var info_Cadre = jQuery(Cadre).info(); 363 396 //=============== Information cadre ====== … … 379 412 var info_theHeader = jQuery("#theHeader").info(); 380 413 381 var marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 414 415 var marge = 0; 416 if (info_ToolBar.width > 0) 417 marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 382 418 383 419 var marge_right = marge; … … 394 430 395 431 winwidth -= (marge_right + marge_left); 432 396 433 397 434 … … 454 491 455 492 case "panorama": 456 457 var w00 = 0; 458 jQuery("#Panorama img").each(function (i) { 459 w0 = this.width; 460 if (w0 > w00) { 461 TheImg = this; 462 n = TheImg.nameProp; 463 w00 = w0; 464 } 465 }); 466 493 // return; 494 495 496 TheImg = Get_Img_Maxi("#Panorama img"); 467 497 info_theImage = jQuery(TheImg).info(); 468 498 info_the_page = jQuery("#the_page").info(); … … 472 502 473 503 if (!TheImg) return; 504 if (theme.match(RegExp("luciano", "g"))) { 505 TheImg = jQuery("#the_page #theImg"); 506 } 474 507 info_theImage = jQuery(TheImg).info(); 475 508 info_the_page = jQuery("#the_page").info(); … … 573 606 var Licence = jQuery(".licencetag"); 574 607 info_Licence = jQuery(".licencetag").info(); 575 //================================================================================== 608 576 609 jQuery("#theImage #theImg IMG").css("marginTop", "0px") 577 610 //========== Correction en fonction du thème ============================= 578 611 var correction = 0; 579 612 if (theme.match(RegExp("sobre", "g"))) { … … 584 617 correction += 0; //?? 585 618 } else if (theme.match(RegExp("luciano", "g"))) { 586 correction += 0; //?? 619 correction = 0; //?? 620 587 621 } else if (theme.match(RegExp("simple", "g"))) { 588 622 correction += 0; //?? … … 682 716 683 717 t1 = jQuery(llgboframe).info(); 684 685 718 if (!TheImg.src) { 719 TheImg = jQuery(TheImg).find("img").get(0) 720 } 686 721 if (TheImg.src) { 687 722 … … 689 724 Image_height -= marges_llgbo; // réduction frame 690 725 if (rapport > 1) { 691 jQuery("#gbo").outerWidth(Image_width); 692 jQuery("#gbo").css("width", Image_width + "px"); 693 726 if (Image_width > winwidth) { 727 jQuery("#gbo").outerWidth(winwidth); 728 jQuery("#gbo").css("width", winwidth + "px"); 729 } 730 else { 731 jQuery("#gbo").outerWidth(Image_width); 732 jQuery("#gbo").css("width", Image_width + "px"); 733 } 694 734 695 735 t1 = jQuery("#gbo div:last").info(); 696 736 697 Image_width = jQuery("#gbo div:last").innerWidth();737 Image_width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); 698 738 Image_height = parseInt(Image_width / rapport); 699 739 700 740 jQuery("#gbo").outerHeight(Image_height + marges_llgbo); 701 741 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 702 if ( 703 jQuery("#gbo").css("paddingBottom", 1 8+ "px");742 if (jQuery.browser.msie) { 743 jQuery("#gbo").css("paddingBottom", 17 + "px"); 704 744 } 705 745 … … 707 747 Image_height -= 4; 708 748 Image_width -= 4; 749 if (Image_width > winwidth) { 750 jQuery("#gbo").outerWidth(winwidth); 751 jQuery("#gbo").css("width", winwidth + "px"); 752 } 753 else { 754 jQuery("#gbo").outerWidth(Image_width); 755 jQuery("#gbo").css("width", Image_width + "px"); 756 } 757 709 758 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 759 jQuery("#gbo").height(Image_height + marges_llgbo); 760 710 761 jQuery("#gbo").css("width", Image_width + marges_llgbo + "px"); 711 712 Image_width = jQuery("#gbo div:last").innerWidth(); 713 Image_height = parseInt(Image_width / rapport); 762 jQuery("#gbo").width(Image_width + marges_llgbo); 763 764 765 766 if (jQuery.browser.msie) { 767 jQuery("#gbo").css("paddingBottom", 17 + "px"); 768 } 714 769 715 770 } 716 771 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 772 a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); 717 773 a1 = jQuery("area[rel=prev]"); 718 774 a2 = jQuery("area[rel=next]"); 719 775 a3 = jQuery("area[rel=up]"); 776 nb_zone = 3; 720 777 if (a1.length == 0) { 721 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + 0 + "," + 0 + "'" }); 722 jQuery("area[rel=up]").attr({ coords: "'" + 0 + ",0," + Image_width / 2 + "," + Image_height + "'" }); 723 jQuery("area[rel=next]").attr({ coords: "'" + Image_width / 2 + ",0," + (Image_width) + "," + Image_height + "'" }); 724 725 } else if (a2.length == 0) { 726 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + (Image_width) / 2 + "," + Image_height + "'" }); 727 jQuery("area[rel=up]").attr({ coords: "'" + Image_width / 2 + ",0," + (Image_width * 2) / 2 + "," + Image_height + "'" }); 728 jQuery("area[rel=next]").attr({ coords: "'" + 0 + ",0," + 0 + "," + 0 + "'" }); 729 778 nb_zone -= 1; 779 } 780 if (a2.length == 0) { 781 nb_zone -= 1; 782 } 783 784 785 var Largeur_zone = (Image_width / nb_zone); 786 var Hauteur_zone = (Image_height); 787 var init_zone = 0; 788 789 if (a1.length > 0) { 790 coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone }; 791 792 jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); 793 init_zone += Largeur_zone; 794 } 795 796 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height }; 797 798 if (a0.length > 0) { 799 jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" }); 800 jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" }); 730 801 } else { 731 732 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + (Image_width) / 3 + "," + Image_height + "'" }); 733 jQuery("area[rel=up]").attr({ coords: "'" + Image_width / 3 + ",0," + (Image_width * 2) / 3 + "," + Image_height + "'" }); 734 jQuery("area[rel=next]").attr({ coords: "'" + (Image_width * 2) / 3 + ",0," + (Image_width) + "," + Image_height + "'" }); 802 jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" }); 735 803 } 736 804 init_zone += Largeur_zone; 805 806 if (a2.length > 0) { 807 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height }; 808 jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); 809 } 810 811 812 813 814 815 /* 816 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + (Image_width) / nb_zone + "," + Image_height + "'" }); 817 jQuery("area[rel=up]").attr({ coords: "'" + Image_width * (nb_zone - 1) / (nb_zone + 1) + ",0," + (Image_width * (nb_zone - 1)) / (nb_zone + 1) + "," + Image_height + "'" }); 818 jQuery("area[rel=next]").attr({ coords: "'" + (Image_width * (nb_zone - 1)) / (nb_zone + 1) + ",0," + (Image_width * (nb_zone + 1)) / (nb_zone + 1) + "," + Image_height + "'" }); 819 */ 737 820 738 821 } … … 742 825 // Image_height, Image_width = valeur a atteindre. 743 826 if (theme.match(RegExp("luciano", "g"))) { 827 //---- information en dehors du cadre 744 828 Zone_Affichage.height -= Bandeau_bas.height; 745 829 jQuery(Cadre).height(Zone_Affichage.height); … … 749 833 //========================================================= 750 834 751 jQuery(Cadre).css("top", "0px");835 // jQuery(Cadre).css("top", "0px"); 752 836 jQuery("#standard").css("top", 0 + "px"); 753 837 jQuery("#comments").css("top", 0 + "px"); … … 794 878 } else if (Type_Img == "panorama") { 795 879 796 // jQuery(TheImg).panorama2(img_finale.height, img_finale.width);797 jQuery(TheImg).height(img_finale.height);798 jQuery(TheImg).width(img_finale.width);880 // ----- jQuery(TheImg).panorama2(img_finale.height, img_finale.width); 881 // jQuery(TheImg).height(img_finale.height); 882 // jQuery(TheImg).width(img_finale.width); 799 883 jQuery("#Panorama div").height(Image_height); 800 884 // class=simple_panorama … … 854 938 jQuery(TheImg).css("height", img_finale.height + "px"); 855 939 jQuery(TheImg).css("width", img_finale.width + "px"); 940 856 941 } 857 942 … … 889 974 if (jQuery("#navThumbPrev").length > 0) { 890 975 jQuery("#navThumbPrev").css({ height: info_img.height + "px", 891 top: info_img.top 976 top: info_img.top 892 977 }); 893 978 } 894 979 if (jQuery("#navThumbNext").length > 0) { 895 980 jQuery("#navThumbNext").css({ height: info_img.height + "px", 896 top: info_img.top 981 top: info_img.top 897 982 }); 898 983 } … … 902 987 } else { 903 988 904 jQuery("#imageToolBar").css("position", "static");989 // jQuery("#imageToolBar").css("position", "static"); 905 990 } 906 991 } catch (e) { … … 946 1031 947 1032 } // function 948 ); // ready1033 ); // ready 949 1034 /* 950 1035 * -
extensions/Autosize/js/conflit.js
r7394 r7536 1 //==== remplace $(... avec jQuery( ====1 //==== autosize remplace $(... avec jQuery( ==== 2 2 var d1 = 0; 3 3 var init_tb = 0; 4 function addEvent2(obj, type, fn) { 5 if (obj.addEventListener) { 6 obj.addEventListener(type, fn, false); 7 EC.add(obj, type, fn); 8 } 9 else if (obj.attachEvent) { 10 obj["e" + type + fn] = fn; 11 obj[type + fn] = function () { 12 obj["e" + type + fn](window.event); 13 } 14 obj.attachEvent("on" + type, obj[type + fn]); 15 EC.add(obj, type, fn); 16 } 17 else { 18 obj["on" + type] = obj["e" + type + fn]; 4 /* 5 function $(element, nc) { 6 if (MooTools.version == "1.2.4") { 7 MooTools_version = "Luciano"; // luciano 8 return jQuery().$Luciano(element, nc); 19 9 } 20 10 } 21 function $(element, nc) { 22 //============== détection framework ================== 23 24 25 var tp1 = typeof (MooTools); 26 var MooTools_version = "0"; 27 28 if (tp1 != "undefined") { 29 if (MooTools.version == "1.2.4") { 30 MooTools_version = "Luciano"; // luciano 31 ret_Luciano = jQuery().$Luciano(element, nc); 32 } 33 34 if (MooTools.version == "1.11") { 35 MooTools_version = "pamoorama"; //pamoorama 36 try { 37 38 } catch (e) { 39 40 }; 41 } 42 43 11 */ 12 jQuery(window).load(function () { 13 if (jQuery("#theImage").css("position") == "relative") { 14 //==== compatibilité Gally/LLGBO === 15 //--- passage relative ==> static ===/ 16 jQuery("#theImage").css("position", "static"); 44 17 } 45 46 tp1 = typeof (Prototype); 47 var Prototype_Version = '0'; 48 if (tp1 != "undefined") { 49 if (Prototype.Version == '1.6.0.2') { 50 Prototype_Version = '1602'; 51 52 } else if (Prototype.Version == '1.6.1') { 53 Prototype_Version = '161'; 54 55 } else if (Prototype.Version == '1.0.0.0') { 56 Prototype_Version = '1'; 57 58 } 59 } 60 //=================================================== 61 var jq = jQuery(element).selector; 62 var new_element = jQuery(element); 63 //div.gmapsPopup div.ui-dialog-titlebar 64 if (jq.match(/GMaps/) || jq.match(/gmaps/)) { 65 if (jq == "#iGMapsIconContent") { 66 setTimeout('jQuery().recentrage_widget()', 0); 67 } 68 if (new_element.length > 0) return new_element; 69 return new_element; 70 } 71 if (Prototype_Version == "0" && MooTools_version == "0") { 72 return new_element; 73 } 74 //======================================================================================= 75 if (arguments.caller && arguments.caller.length > 0) { 76 if (arguments.caller.length > 1) { 77 if (element == "pamoorama") { 78 return jQuery().$Pamoorama(element); 79 } 80 arg = arguments.caller[1]; 81 if (typeof (arg) != "undefined" && typeof (arg) != undefined) { 82 //=========== options rv_maps prototype.js =================================== 83 84 if (Prototype_Version != '0') 85 switch (arg) { 86 case "dom:loaded": 87 return element; 88 return jQuery().$Protype(element); 89 break; 90 case "load": 91 return jQuery().$Protype(element); 92 break; 93 case "unload": 94 return jQuery().$Protype(element); 95 break; 96 case "prototype_event_registry": 97 98 try { 99 new_element = jQuery().$Protype(element); 100 } catch (e) { 101 new_element = null; 102 } 103 104 105 return new_element; 106 break; 107 case "readystatechange": 108 try { 109 new_element = jQuery().$Protype(element); 110 } catch (e) { 111 new_element = null; 112 } 113 114 return new_element; 115 break; 116 } 117 118 if (MooTools_version == 'pamoorama' && typeof (arg) != undefined) 119 //=========== options pamoorama =================================== 120 { 121 var reg1 = new RegExp("pamoorama", "g"); 122 switch (arg) { 123 case "bottom": 124 return jQuery().$Pamoorama(element); 18 tp = typeof (Browser); 19 if (tp !="undefined") 20 if (Browser.loaded == true) { 21 n = Browser; 22 } 23 24 function $(element, nc) { 25 //============== détection framework ================== 26 27 28 var tp1 = typeof (MooTools); 29 var MooTools_version = "0"; 30 31 if (tp1 != "undefined") { 32 if (MooTools.version == "1.2.4") { 33 MooTools_version = "Luciano"; // luciano 34 ret_Luciano = jQuery().$Luciano(element, nc); 35 } 36 37 if (MooTools.version == "1.11") { 38 MooTools_version = "pamoorama"; //pamoorama 39 try { 40 41 } catch (e) { 42 43 }; 44 } 45 46 47 } 48 49 tp1 = typeof (Prototype); 50 var Prototype_Version = '0'; 51 if (tp1 != "undefined") { 52 if (Prototype.Version == '1.6.0.2') { 53 Prototype_Version = '1602'; 54 55 } else if (Prototype.Version == '1.6.1') { 56 Prototype_Version = '161'; 57 58 } else if (Prototype.Version == '1.0.0.0') { 59 Prototype_Version = '1'; 60 61 } 62 } 63 //=================================================== 64 var jq = jQuery(element).selector; 65 var new_element = jQuery(element); 66 //div.gmapsPopup div.ui-dialog-titlebar 67 if (jq.match(/GMaps/) || jq.match(/gmaps/)) { 68 if (jq == "#iGMapsIconContent") { 69 setTimeout('jQuery().recentrage_widget()', 0); 70 } 71 if (new_element.length > 0) return new_element; 72 return new_element; 73 } 74 if (Prototype_Version == "0" && MooTools_version == "0") { 75 return new_element; 76 } 77 //======================================================================================= 78 if (arguments.caller && arguments.caller.length > 0) { 79 if (arguments.caller.length > 1) { 80 if (element == "pamoorama") { 81 return jQuery().$Pamoorama(element); 82 } 83 arg = arguments.caller[1]; 84 if (typeof (arg) != "undefined" && typeof (arg) != undefined) { 85 //=========== options rv_maps prototype.js =================================== 86 87 if (Prototype_Version != '0') 88 switch (arg) { 89 case "dom:loaded": 90 return element; 91 return jQuery().$Prototype(element); 125 92 break; 126 case "left": 127 return jQuery().$Pamoorama(element); 93 case "load": 94 return jQuery().$Prototype(element); 95 break; 96 case "unload": 97 return jQuery().$Prototype(element); 128 98 break; 129 99 case "prototype_event_registry": 130 return jQuery().$Pamoorama(element); 100 101 try { 102 new_element = jQuery().$Prototype(element); 103 } catch (e) { 104 new_element = null; 105 } 106 107 108 return new_element; 131 109 break; 132 110 case "readystatechange": 133 return jQuery().$Pamoorama(element); 134 break; 135 136 default: 137 if (arg.area) { 138 return jQuery().$Pamoorama(element); 139 } else 140 if (arg.velocity) { 141 return jQuery().$Pamoorama(element); 142 } else if (arg.src) { 143 return jQuery().$Pamoorama(element); 144 } else if (arg.modifiers) { 145 return jQuery().$Pamoorama(element); 146 } else if (arg.limit) { 147 return jQuery().$Pamoorama(element); 148 } else if (arg.duration) { 149 return jQuery().$Pamoorama(element); 150 } else if (arg.id) { 151 switch (arg.id) { 152 case "pamoorama_footer": 153 return jQuery().$Pamoorama(element); 154 break; 155 case "pamoorama_outter": 156 return jQuery().$Pamoorama(element); 157 break; 158 case "pamoorama_inner": 159 return jQuery().$Pamoorama(element); 160 break; 161 162 default: 163 return jQuery().$Pamoorama(element); 164 break; 165 166 } 167 } else if (arg.src) { 168 return jQuery().$Pamoorama(element); 169 111 try { 112 new_element = jQuery().$Prototype(element); 113 } catch (e) { 114 new_element = null; 115 try { 116 new_element = jQuery().$Luciano(element, nc); 117 new_element = jQuery(element).get(0); 118 } catch (e) { 119 new_element = null; 170 120 } 171 //======================================================= 121 122 } 123 172 124 return new_element; 173 125 break; 174 175 } 176 } else if (MooTools_version == 'Luciano') { //=========== options luciano =================================== 126 } 127 128 if (MooTools_version == 'pamoorama' && typeof (arg) != undefined) 129 //=========== options pamoorama =================================== 130 { 131 var reg1 = new RegExp("pamoorama", "g"); 132 switch (arg) { 133 case "bottom": 134 return jQuery().$Pamoorama(element); 135 break; 136 case "left": 137 return jQuery().$Pamoorama(element); 138 break; 139 case "prototype_event_registry": 140 return jQuery().$Pamoorama(element); 141 break; 142 case "readystatechange": 143 return jQuery().$Pamoorama(element); 144 break; 145 146 default: 147 if (arg.area) { 148 return jQuery().$Pamoorama(element); 149 } else 150 if (arg.velocity) { 151 return jQuery().$Pamoorama(element); 152 } else if (arg.src) { 153 return jQuery().$Pamoorama(element); 154 } else if (arg.modifiers) { 155 return jQuery().$Pamoorama(element); 156 } else if (arg.limit) { 157 return jQuery().$Pamoorama(element); 158 } else if (arg.duration) { 159 return jQuery().$Pamoorama(element); 160 } else if (arg.id) { 161 switch (arg.id) { 162 case "pamoorama_footer": 163 return jQuery().$Pamoorama(element); 164 break; 165 case "pamoorama_outter": 166 return jQuery().$Pamoorama(element); 167 break; 168 case "pamoorama_inner": 169 return jQuery().$Pamoorama(element); 170 break; 171 172 default: 173 return jQuery().$Pamoorama(element); 174 break; 175 176 } 177 } else if (arg.src) { 178 return jQuery().$Pamoorama(element); 179 180 } 181 //======================================================= 182 return new_element; 183 break; 184 185 } 186 } else if (MooTools_version == 'Luciano') { //=========== options luciano =================================== 187 //=== theme Luciano ==== 188 return ret_Luciano; 189 } 190 191 } 192 } 193 } 194 195 //================================================== 196 tpe = typeof (element); 197 if (Prototype_Version != '0') { 198 if (tpe == "string") { 199 //=== rvmaps === // 200 if (element.match(/[a-z]_[a-z]/)) { 201 202 return jQuery().$Prototype(element); 203 } 204 id = "window_" + new Date().getTime(); 205 reg1 = new RegExp("^window_", "g"); 206 if (element.match(reg1, "g")) { 207 208 if (element.match(/_[a-z]/)) { 209 return jQuery().$Prototype(element); 210 } 211 return null; 212 } 213 } 214 } 215 //========== test jQuery ? ============== 216 217 if (jq.match(RegExp("^#", "g")) || jq == "html") { 218 return new_element; 219 } 220 if (tpe == "undefined") { 221 return jQuery(); 222 } 223 //==== mootools ==== 224 if (MooTools_version == "Luciano" && tpe == "string") { 225 //=== theme Luciano ==== 226 new_element = jQuery().$Luciano(element, nc); 227 if (element == "order") return new_element; 228 if (element == "themeSelect") return new_element; 229 if (element == "languageSelect") return new_element; 230 if (element == 'linkPrev') return new_element; 231 if (element == 'linkNext') return new_element; 232 if (element == 'rateForm') return new_element; 233 } 234 235 if (MooTools_version == 'pamoorama') 236 //=========== options pamoorama =================================== 237 { 238 239 if (tpe == "string") 240 switch (jq) { 241 case "ie_ready": 242 return jQuery().$Pamoorama(element); 243 break; 244 case "pamoorama": 245 return jQuery().$Pamoorama(element); 246 break; 247 case ".tab a": 248 return jQuery(element); 249 break; 250 251 } else if (tpe == "boolean") { 252 return jQuery().$Pamoorama(element); 253 } 254 el = element.nodeName; 255 if (el == "DIV") return jQuery().$Pamoorama(element); 256 if (el == "IMG") return jQuery().$Pamoorama(element); 257 if (el == "#document") return jQuery(element); 258 if (el == "BODY") { 259 try { return jQuery().$Pamoorama(element) } catch (e) { 260 return jQuery(element); 261 }; 262 263 } 264 if (element == window) 265 return new_element; 266 jQuery().$Pamoorama(element); 267 } 268 obj_panorama = jQuery("#Panorama"); 269 if (obj_panorama.length > 0 && jq != "rateForm" && jq != "order" && jq != "themeSelect") { 270 if (tpe == "object") 271 if (Prototype_Version != '0') { 272 //=== rvmaps === 273 try { 274 elem_retour = jQuery().$Prototype(element); 275 return elem_retour; 276 } catch (e) { 277 278 } 279 } 280 281 if (new_element.length < 2) return new_element; 282 if (new_element.length == 2) return jQuery(element).get(1); 283 if (new_element.length == 3) return jQuery(element).get(2); 284 285 } 286 afq = jQuery(document).data("initialized"); //2 287 if (element == window && afq != 1) 288 if (init_tb == 1) { 289 init_tb = 2; 290 return new_element; 291 } 292 293 294 //========= ???? =================== 295 if (new_element != null) { 296 if (typeof (new_element.context) != "undefined") { 297 if (afq != 1 && afq != undefined) { 298 if (init_tb != 2) init_tb = 1; 299 return new_element; 300 } 301 if (new_element.context.loaded) { 177 302 //=== theme Luciano ==== 178 return ret_Luciano; 179 } 180 181 } 182 } 183 } 184 185 //================================================== 186 tpe = typeof (element); 187 if (Prototype_Version != '0') { 188 if (tpe == "string") { 189 //=== rvmaps === // 190 if (element.match(/[a-z]_[a-z]/)) { 191 192 return jQuery().$Protype(element); 193 } 194 id = "window_" + new Date().getTime(); 195 reg1 = new RegExp("^window_", "g"); 196 if (element.match(reg1, "g")) { 197 198 if (element.match(/_[a-z]/)) { 199 return jQuery().$Protype(element); 200 } 201 return null; 202 } 203 } 204 } 205 //========== test jQuery ? ============== 206 207 if (jq.match(RegExp("^#", "g")) || jq == "html") { 208 return new_element; 209 } 210 if (tpe == "undefined") { 211 return jQuery(); 212 } 213 //==== mootools ==== 214 if (MooTools_version == "Luciano" && tpe=="string") { 215 //=== theme Luciano ==== 216 new_element = jQuery().$Luciano(element, nc); 217 return new_element; 218 219 } 220 221 if (MooTools_version == 'pamoorama') 222 //=========== options pamoorama =================================== 223 { 224 225 if (tpe=="string") 226 switch (jq) { 227 case "ie_ready": 228 return jQuery().$Pamoorama(element); 229 break; 230 case "pamoorama": 231 return jQuery().$Pamoorama(element); 232 break; 233 case ".tab a": 234 return jQuery(element); 235 break; 236 237 }else if(tpe=="boolean") 238 { 239 return jQuery().$Pamoorama(element); 240 } 241 el = element.nodeName; 242 if (el == "DIV") return jQuery().$Pamoorama(element); 243 if (el == "IMG") return jQuery().$Pamoorama(element); 244 if (el == "#document") return jQuery(element) ; 245 if (el == "BODY") { 246 try { return jQuery().$Pamoorama(element) } catch (e) { 247 return jQuery(element); 248 }; 249 250 } 251 if (element == window) 252 return new_element; 253 jQuery().$Pamoorama(element); 254 } 255 obj_panorama = jQuery("#Panorama"); 256 if (obj_panorama.length > 0 && jq != "rateForm" && jq != "order" && jq != "themeSelect") { 257 if (tpe == "object") 258 if (Prototype_Version != '0') { 259 //=== rvmaps === 260 try { elem_retour=jQuery().$Protype(element); 261 return elem_retour; 262 } catch (e) { 263 264 } 265 } 266 267 if (new_element.length < 2) return new_element; 268 if (new_element.length == 2) return jQuery(element).get(1); 269 if (new_element.length == 3) return jQuery(element).get(2); 270 271 } 272 afq = jQuery(document).data("initialized"); //2 273 if (element == window && afq != 1) 274 if (init_tb == 1) { 275 init_tb = 2; 276 return new_element; 277 } 278 279 if (new_element.context && afq != 1 && afq != undefined) { 280 if (init_tb != 2) init_tb = 1; 281 return new_element; 282 } 283 //========= ???? =================== 284 if (new_element.context) 285 if (new_element.context.loaded) { 286 //=== theme Luciano ==== 287 if (MooTools_version == "Luciano") return ret_Luciano; 288 //=== theme gally ? ==== 289 if (Prototype_Version != '0') { 290 //=== rvmaps === 291 try { 292 return jQuery(element); 293 } catch (e) { 294 return jQuery().$Protype(element); 295 } 296 } 297 } 298 init_tb = 0; 299 //================================================================ 303 if (MooTools_version == "Luciano") { 304 try { 305 ret_el = jQuery().$Prototype(element); 306 return ret_el; 307 } catch (e) { 308 jQuery("#Debug").text(e.message); 309 return ret_Luciano; 310 } 311 } 312 //=== theme gally ? ==== 313 if (Prototype_Version != '0') { 314 //=== rvmaps === 315 try { 316 return jQuery(element); 317 } catch (e) { 318 return jQuery().$Prototype(element); 319 } 320 } 321 } 322 } 323 } 324 init_tb = 0; 325 //================================================================ 300 326 301 327 //==== mootools ==== 302 328 if (MooTools_version == "Luciano") { 303 329 //=== theme Luciano ==== 330 tp = this; 304 331 new_element = ret_Luciano; 305 tp = new_element.nodeName + new_element.nodeType; 306 if (tp == "DIV1") return new_element; 307 tp = element.nodeName + element.nodeType; 308 return new_element; 309 332 //$(this.options.container) 333 if (new_element != null) { 334 if (new_element.nodeName) { 335 tp = new_element.nodeName + new_element.nodeType; 336 if (tp == "DIV1") return new_element; 337 if (tp == "SELECT1") return new_element; 338 tp = element.nodeName + element.nodeType; 339 return new_element; 340 } 341 342 } 310 343 } else if (MooTools_version == "pamoorama") { 311 344 //=== paMOOramics === … … 314 347 } 315 348 316 //================================================================= 317 318 if (Prototype_Version != '0') { 319 //=== rvmaps === 320 try { 321 return jQuery().$Protype(element); 322 } catch (e) { 323 return jQuery(element); 324 } 349 //================================================================= 350 351 if (Prototype_Version != '0') { 352 //=== rvmaps === 353 try { 354 return jQuery().$Prototype(element); 355 } catch (e) { 356 return jQuery(element); 357 } 358 } 359 return jQuery(element); 360 325 361 } 326 return jQuery(element); 327 328 } 329 362 }); 330 363 //========================================================= 331 364 (function ($) { … … 389 422 }, 390 423 //=================================================== 391 $Prot ype: function (element) {424 $Prototype: function (element) { 392 425 //======== prototype.js ===================== 393 426 if (arguments.length > 1) { -
extensions/Autosize/main.inc.php
r7458 r7536 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.2. 74 Version: 1.2.8 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 … … 15 15 $autosize_controler = new autosize_controler(); 16 16 17 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 45 ); 17 18 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 40 ); 18 19 19 20 20 21 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 21 add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 ); 22 23 //add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script'),40 ); 24 add_event_handler('loc_begin_index', array(&$autosize_controler, 'cl_autosize_script'),51 ); 25 //add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 ); 22 26 23 27 ?> -
extensions/Autosize/template/autosize.tpl
r7394 r7536 1 1 {* $Id: autosize/template/picture.tpl *} 2 <!-- autosize/template/picture.tpl --> 2 3 {html_head} 4 <!-- autosize/template/picture.tpl --> 5 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} 6 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 7 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 3 8 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}6 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}7 9 {*jQuery is always available by default*} 8 <script type="text/javascript"> 10 11 <script type="text/javascript"> 12 var cl_visible = "{$cl_visible}" =="true"; 13 var DEBUG = '{$DEBUG}'; 9 14 var thumbnail = '{$thumbnail}'; 10 15 var theme = '{$theme}'; … … 48 53 </script> 49 54 55 {known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"} 56 57 <!-- << autosize/template/picture.tpl --> 58 {/html_head} 50 59 51 60 52 <!-- << autosize/template/picture.tpl --> 61 {if $DEBUG == "true"} 62 {assign var="visible" value="block"} 53 63 64 65 54 66 <!--- autosize/template/picture.tpl body ---> 55 {known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"}56 <!-- << autosize/template/picture.tpl body -->57 {html_head}58 {/html_head}59 67 <div id="Debug" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 60 68 <div id="Debug1" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 61 69 <div id="Debug2" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 70 {else} 71 {assign var="visible" value="none"} {/if}<!-- << autosize/template/picture.tpl body --> -
extensions/Autosize/template/picture.tpl
r7193 r7536 19 19 var src2="{$cl_autosize_button.ICON2}"; 20 20 var src3="{'cl_autosize_info_2'|@translate}"; 21 var src4="{'cl_autosize_info'|@translate}"; 22 21 var src4 = "{'cl_autosize_info'|@translate}"; 23 22 24 23 </script>
Note: See TracChangeset
for help on using the changeset viewer.