Changeset 7642
- Timestamp:
- Nov 5, 2010, 12:56:12 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7602 r7642 148 148 149 149 }// function cl_autosize_script 150 static public function cl_add_css(){ 151 global $template,$user,$conf,$picture ; 152 $path = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/'; 153 $template->append('head_elements', ' 154 <link rel="stylesheet" type="text/css" href="'.$path.'css/autosize.css"> 155 <script type="text/javascript" src="'.$path.'js/css.js"></script> 156 <script type="text/javascript"> 157 158 </script>' 159 ); 160 } 150 161 /* 151 162 * … … 154 165 global $template,$user,$conf,$picture ; 155 166 $my_path = realpath(AUTOSIZE_PATH .'/'); 156 157 167 $userdata=$user; 168 $fields = array( 'maxwidth', 'maxheight' ); 158 169 159 170 $ThePicture = $template->get_template_vars('current'); 160 171 $data = array(); 161 172 162 173 163 174 return $content; 164 175 165 176 $data['maxwidth'] = '1200'; 166 $data['maxheight'] ='250';177 $data['maxheight'] ='250'; 167 178 $data['user_id'] = $userdata['id']; 168 foreach ($fields as $field) 169 { 170 if (isset($_POST[$field])) 171 { 172 $data[$field] = $_POST[$field]; 173 } 174 } 179 foreach ($fields as $field){ 180 if (isset($_POST[$field])){ 181 $data[$field] = $_POST[$field]; 182 } 183 } 175 184 176 if($data['maxwidth'] != "" ) 177 { 185 if($data['maxwidth'] != "" ){ 178 186 $picture['current']['scaled_width']=$data['maxwidth']; 179 187 $picture['current']['scaled_height']=$data['maxheight']; 180 mass_updates(USER_INFOS_TABLE, 181 array('primary' => array('user_id'), 'update' => $fields), 182 array($data)); 183 184 } 185 186 188 mass_updates(USER_INFOS_TABLE, 189 array('primary' => array('user_id'), 'update' => $fields), 190 array($data)); 191 } 187 192 return $content; 188 193 /* 189 194 $template->assign( 190 195 array( 191 196 'AUTOSIZE_PATH' => $my_path, … … 194 199 ); 195 200 196 $template->parse( 'autosize_cl_init', false);197 return $content;201 $template->parse( 'autosize_cl_init', false); 202 return $content; 198 203 */ 199 204 -
extensions/Autosize/js/Affiche_script.js
r7618 r7642 20 20 } 21 21 //========================================================= 22 23 function wait_Timer() { 24 old_w = 0 22 /* 23 window.onresize = resize; 24 window.onload = load; 25 26 function resize() { 27 alert("resize event detected!"); 28 } 29 function load() { 30 alert("load event detected!"); 31 } 32 */ 33 jQuery(document).ready( 34 function (jQuery) { 35 jQuery("#theImage").css({ opacity: "0.0", filter: 'alpha(opacity:0)' }); 36 jQuery(window).load(function (event) { 37 jQuery("#theImage").css({ opacity: "0.0", filter: 'alpha(opacity:0)' }); 38 setTimeout('wait_Timer()', 20); 39 40 function handler(event) { 41 42 43 jQuery("#theImage").css({ opacity: event.data.opacity, filter: 'alpha(opacity:' + event.data.opacity * 100 + ')' }); 44 } 45 jQuery(window).bind("resize", { opacity: "1" }, handler) 46 25 47 26 if (DEBUG == "true") { 27 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 28 jQuery("#Debug1").css({ 29 filter: 'alpha(opacity:50)', 30 position: "absolute", 31 border: "solid 1px green", 32 top: 400 + "px", 33 width: (200) + "px", 34 height: 400 + "px" 35 }); 36 jQuery("#Debug1").text("Debug1:info : " + info_pamoorama_outter.width + 37 " : " + info_pamoorama_outter.height 38 ); 39 } 40 if (jQuery("#pamoorama").length>0) 41 if (info_pamoorama_outter.height == 0) { 42 43 setTimeout('wait_Timer()', 300); 44 return 45 } 46 jQuery(window).resize(); 47 jQuery("#theImage").css({ filter: 'alpha(opacity:100)',opacity:1 }); 48 49 } 50 51 /* 52 * 53 */ 54 jQuery("#pamoorama").bind('resize', function () { 55 wait_Timer(); 56 }) 57 58 jQuery("#pamoorama_iner").bind('resize', function () { 59 wait_Timer(); 60 }) 61 //============================================================//== 62 jQuery("#pamoorama_outter").bind('resize', function () { 63 wait_Timer(); 64 }) 65 66 67 jQuery(document).ready( 68 69 function (jQuery) { 70 jQuery("#theImage").css({ filter: 'alpha(opacity:10)', opacity: "0.1" }); 71 72 jQuery(window).load(function () { 73 setTimeout('wait_Timer()', 600); 74 75 // jQuery("#theImage").get(0).attachEvent('onpropertychange', onPropertyChange); 76 } 77 ); 48 }); 49 78 50 79 51 … … 96 68 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; 97 69 } 98 99 100 101 102 103 //=============================================================104 function cl_Timer() {105 // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }106 if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)107 alert(jQuery.browser.version);108 panoramaContainer = jQuery(".panorama-container");109 n = document.scripts[6]; //12--14affiche_script ;110 t = n.src;111 112 currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));113 if (currentPosition == NaN) return;114 115 116 if (currentPosition > 1000)117 jQuery(panoramaContainer).css('margin-left', "0px")118 setTimeout("cl_Timer()", 500);119 }120 //=============================================================121 function onPropertyChange(e) {122 var el = e.srcElement;123 var new_class = el.className;124 ID = el.id;125 Prop = e.propertyName.split(".");126 Property = Prop[1];127 if (Property == "display") {128 Valeur = parseInt(el.currentStyle[Property]);129 if (Valeur == "block") {130 131 132 }133 }134 return;135 }136 137 /* ready138 *139 *140 */141 //============================================================142 70 /* 143 71 * 144 72 */ 145 function Info_entete(Parent) { 146 147 var info_imageToolBar = jQuery("#imageToolBar").info(); 148 if (info_imageToolBar.position == "absolute") { 149 jQuery("#imageToolBar").css("position", "relative"); 150 jQuery("#imageToolBar").css("top", 0 + "px"); 151 } 152 153 var info_theImage = jQuery("#theImage").info(); 154 155 if (info_theImage.position == "relative") { 156 //--- passage relative ==> static ===/ 157 jQuery("#theImage").css("position", "static"); 158 info_theImage = jQuery("#theImage").info(); 159 160 } 161 if (info_theImage.position == "absolute") { 162 //--- passage absolute ==> static ===/ 163 jQuery("#theImage").css("position", "static"); 164 info_theImage = jQuery("#theImage").info(); 165 166 } 167 168 marge_top = Info_the_page.top + 169 Info_the_page.borderwidth.top + 170 info_theImage.borderwidth.top; 171 172 img_top = info_theImage.top + info_theImage.borderwidth.top; 173 return { marge_top: marge_top, img_top: img_top }; 174 175 } 176 177 /* Récupère les informations sur la description. 178 * 179 */ 180 function Info_description(Parent) { 181 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 182 //============================================================================= 183 var info_description = { top: 0, bottom: 0, height: 0 }; 184 if (theme.match(RegExp("simple", "gi"))) { 185 jQuery("#" + Parent).css({ padding: "0px", 186 marginLeft: "0px", 187 marginRight: "auto", 188 marginTop: "0px", 189 marginBottom: "0px", position: "absolute", top: Bandeau + "px" 190 }); 191 } else { 192 193 jQuery("#" + Parent).css({ padding: "0px", 194 marginLeft: "auto", 195 marginRight: "auto", 196 marginTop: "0px", 197 marginBottom: "0px" 198 }); 199 200 201 } 202 203 204 // jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " }); 205 206 207 if (theme.match(RegExp("luciano", "g"))) { 208 info_img = jQuery("#" + Parent + " #theImg img").info(); 209 210 } else { 211 212 info_img = jQuery("#" + Parent + " img").info(); 213 } 214 215 info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, 216 top: info_img.padding.top + info_img.borderwidth.top 217 } 218 219 info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom; 220 //============================================================================= 221 info_gbo = jQuery("#gbo").info(); 222 if (info_description.top < info_gbo.bottom) 223 info_description.top = info_gbo.bottom; 224 //============================================================================= 225 info_desc = jQuery("#" + Parent + " p:first").info(); 226 if (info_desc.bottom < info_img.bottom) 227 info_desc.bottom = info_img.bottom; 228 229 // if (info_desc.top > info_img.bottom) 230 // info_description.top = info_desc.top; 231 232 if (jQuery("#Panorama").length) { 233 Type_Img = "panorama"; 234 // cl_visible = false; 235 236 } 237 info_table = jQuery(".infoTable").info(); 238 239 if (info_table.top > info_description.bottom) 240 info_description.bottom = info_table.top; 241 //=========================================================================== 242 243 info_licencetag = jQuery(".licencetag").info(); 244 245 246 if (info_licencetag.bottom > 0) { 247 jQuery(".licencetag").css("border", "solid 5px transparent"); 248 if (info_licencetag.bottom > info_description.bottom) { 249 info_description.bottom = info_licencetag.bottom; 250 } 251 else 252 info_description.bottom += info_table.margin.top + info_table.padding.top; 253 254 } 255 //============================================================================= 256 if (theme.match(RegExp("gally", "gi"))) { 257 if (!theme.match(RegExp("lapis", "gi"))) { 258 info_description.bottom = info_description.bottom 259 } 260 } 261 262 263 264 265 266 if (info_description.top < 1) 267 info_description.top = info_description.bottom; 268 269 270 if (info_description.bottom < info_description.top) { 271 info_description.bottom = info_description.top; 272 273 info_desc = jQuery("#" + Parent + " p:last").info(); 274 275 if (info_desc.bottom > info_img.bottom) 276 info_description.bottom = info_desc.bottom; 277 } 278 279 280 if (theme.match(RegExp("gally", "g"))) { 281 if (!theme.match(RegExp("lapis", "gi"))) { 282 info_copyright = jQuery("#copyright").info(); 283 info_description.bottom += info_copyright.height; 284 } 285 } 286 287 if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 } 288 289 info_description.height = info_description.bottom - info_description.top; 290 291 292 if (DEBUG == "true") { 293 294 /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); 295 296 297 info_description.width = "800"; 298 */ 299 jQuery("#Debug").css('display', 'block'); 300 jQuery("#Debug1").show(); 301 jQuery("#Debug2").show(); 302 Bandeau_bas = info_description; 303 304 jQuery("#Debug").css({ opacity: "0.50", 305 filter: 'alpha(opacity:50)', 306 position: "absolute", 307 width: "800px", 308 border: "solid 1px green", 309 top: Bandeau + "px" 310 }); 311 jQuery("#Debug").text("Debug:Bandeau : " + Bandeau); 312 313 jQuery("#Debug1").css({ opacity: "0.50", 314 filter: 'alpha(opacity:50)', 315 position: "absolute", 316 border: "solid 1px green", 317 top: Bandeau_bas.top + "px", 318 width: (200) + "px", 319 height: Bandeau_bas.height + "px" 320 }); 321 jQuery("#Debug1").text("Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height); 322 323 jQuery("#Debug2").css({ opacity: "0.50", 324 filter: 'alpha(opacity:50)', 325 position: "absolute", 326 left: '50px', 327 width: (300) + "px", 328 border: "solid 1px green", top: Bandeau_bas.bottom + "px" 329 }); 330 jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom); 331 332 } 333 334 if (check_desc_v != 'checked="checked"') { 335 info_description.height = 0; 336 } 337 338 return info_description; 339 340 } 341 342 343 344 345 //============================================================ 346 jQuery("#iGMapsIcon").bind('resize', function () { 347 jQuery().recentrage_widget(); 348 }) 349 jQuery("#icon_gmaps").bind('click', function () { 350 jQuery().recentrage_widget(); 351 }) 352 353 354 355 356 357 358 /* jQuery */ 73 74 359 75 var img_init = { height: img_height, width: img_width }; // taille initiale 360 76 var img_defaut = { height: scaled_height, width: scaled_width }; … … 374 90 Bandeau_bas = Info_description("theImage"); 375 91 //=================================================================== 92 376 93 /* 377 94 * window .resize 378 95 */ 379 380 381 96 jQuery(window).resize(function (event, ui) { 97 382 98 if (typeof (event) == 'undefined') return; 383 99 if (!cl_visible == true) return; … … 468 184 if (Type_Img == "pamoorama") { 469 185 var myPamoorama = this.myPamoorama; 470 186 //===================================================== 187 188 189 190 //===================================================== 471 191 if (typeof (myPamoorama) == "undefined") { 472 473 474 192 return 475 193 } 476 477 478 if (typeof (myPamoorama.imageHeight) == "undefined") { 194 if (myPamoorama.skipInit == false) 195 return 196 197 var h01 = typeof (myPamoorama.imageHeight); 198 199 if (h01 == "undefined") { 479 200 old_w = 0; 480 201 old_h = 0; 481 482 483 202 return; 484 203 } 204 205 //============================================= 206 207 208 485 209 486 210 /* … … 616 340 TheImg = jQuery("#pamoorama"); 617 341 342 if (info_pamoorama_outter.height == 0) { 343 old_h = 0; 344 jQuery(window).resize(); 345 return 346 } 347 // event = window.event ? window.event : event; 348 ; 349 // jQuery("#pamoorama_outter").trigger(jQuery.browser.msie ? "propertychange" : "change", [event]); 350 // 351 // jQuery("#pamoorama_outter").trigger("onPropertychange", [event]); 352 618 353 img_reelle.height = myPamoorama.imageHeight; 619 354 img_reelle.width = myPamoorama.imageWidth; … … 1065 800 pos = jQuery("#copyright").info(); 1066 801 if (pos.top > 100) jQuery("#the_page").height(pos.top); 802 1067 803 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; 1068 //jQuery(window).resize(); 804 805 1069 806 return; 1070 }); 807 }); // fin resize 1071 808 var pos; 1072 //=================================================================== 1073 //jQuery(window).resize(); 809 //================================================ 810 function Info_entete(Parent) { 811 812 var info_imageToolBar = jQuery("#imageToolBar").info(); 813 if (info_imageToolBar.position == "absolute") { 814 jQuery("#imageToolBar").css("position", "relative"); 815 jQuery("#imageToolBar").css("top", 0 + "px"); 816 } 817 818 var info_theImage = jQuery("#theImage").info(); 819 820 if (info_theImage.position == "relative") { 821 //--- passage relative ==> static ===/ 822 jQuery("#theImage").css("position", "static"); 823 info_theImage = jQuery("#theImage").info(); 824 825 } 826 if (info_theImage.position == "absolute") { 827 //--- passage absolute ==> static ===/ 828 jQuery("#theImage").css("position", "static"); 829 info_theImage = jQuery("#theImage").info(); 830 831 } 832 833 marge_top = Info_the_page.top + 834 Info_the_page.borderwidth.top + 835 info_theImage.borderwidth.top; 836 837 img_top = info_theImage.top + info_theImage.borderwidth.top; 838 return { marge_top: marge_top, img_top: img_top }; 839 840 } 841 842 /* Récupère les informations sur la description. 843 * 844 */ 845 function Info_description(Parent) { 846 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 847 //============================================================================= 848 var info_description = { top: 0, bottom: 0, height: 0 }; 849 if (theme.match(RegExp("simple", "gi"))) { 850 jQuery("#" + Parent).css({ padding: "0px", 851 marginLeft: "0px", 852 marginRight: "auto", 853 marginTop: "0px", 854 marginBottom: "0px", position: "absolute", top: Bandeau + "px" 855 }); 856 } else { 857 858 jQuery("#" + Parent).css({ padding: "0px", 859 marginLeft: "auto", 860 marginRight: "auto", 861 marginTop: "0px", 862 marginBottom: "0px" 863 }); 864 865 866 } 867 868 869 // jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " }); 870 871 872 if (theme.match(RegExp("luciano", "g"))) { 873 info_img = jQuery("#" + Parent + " #theImg img").info(); 874 875 } else { 876 877 info_img = jQuery("#" + Parent + " img").info(); 878 } 879 880 info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, 881 top: info_img.padding.top + info_img.borderwidth.top 882 } 883 884 info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom; 885 //============================================================================= 886 info_gbo = jQuery("#gbo").info(); 887 if (info_description.top < info_gbo.bottom) 888 info_description.top = info_gbo.bottom; 889 //============================================================================= 890 info_desc = jQuery("#" + Parent + " p:first").info(); 891 if (info_desc.bottom < info_img.bottom) 892 info_desc.bottom = info_img.bottom; 893 894 // if (info_desc.top > info_img.bottom) 895 // info_description.top = info_desc.top; 896 897 if (jQuery("#Panorama").length) { 898 Type_Img = "panorama"; 899 // cl_visible = false; 900 901 } 902 info_table = jQuery(".infoTable").info(); 903 904 if (info_table.top > info_description.bottom) 905 info_description.bottom = info_table.top; 906 //=========================================================================== 907 908 info_licencetag = jQuery(".licencetag").info(); 909 910 911 if (info_licencetag.bottom > 0) { 912 jQuery(".licencetag").css("border", "solid 5px transparent"); 913 if (info_licencetag.bottom > info_description.bottom) { 914 info_description.bottom = info_licencetag.bottom; 915 } 916 else 917 info_description.bottom += info_table.margin.top + info_table.padding.top; 918 919 } 920 //============================================================================= 921 if (theme.match(RegExp("gally", "gi"))) { 922 if (!theme.match(RegExp("lapis", "gi"))) { 923 info_description.bottom = info_description.bottom 924 } 925 } 926 927 928 929 930 931 if (info_description.top < 1) 932 info_description.top = info_description.bottom; 933 934 935 if (info_description.bottom < info_description.top) { 936 info_description.bottom = info_description.top; 937 938 info_desc = jQuery("#" + Parent + " p:last").info(); 939 940 if (info_desc.bottom > info_img.bottom) 941 info_description.bottom = info_desc.bottom; 942 } 943 944 945 if (theme.match(RegExp("gally", "g"))) { 946 if (!theme.match(RegExp("lapis", "gi"))) { 947 info_copyright = jQuery("#copyright").info(); 948 info_description.bottom += info_copyright.height; 949 } 950 } 951 952 if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 } 953 954 info_description.height = info_description.bottom - info_description.top; 955 956 957 if (DEBUG == "true") { 958 959 /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); 960 961 962 info_description.width = "800"; 963 */ 964 jQuery("#Debug").css('display', 'block'); 965 jQuery("#Debug1").show(); 966 jQuery("#Debug2").show(); 967 Bandeau_bas = info_description; 968 969 jQuery("#Debug").css({ 970 opacity: "0.50", 971 filter: 'alpha(opacity:50)', 972 position: "absolute", 973 width: "800px", 974 border: "solid 1px green", 975 top: Bandeau + "px" 976 }); 977 jQuery("#Debug").text("Debug:Bandeau : " + Bandeau); 978 979 jQuery("#Debug1").css({ opacity: "0.50", 980 filter: 'alpha(opacity:50)', 981 position: "absolute", 982 border: "solid 1px green", 983 top: Bandeau_bas.top + "px", 984 width: (200) + "px", 985 height: Bandeau_bas.height + "px" 986 }); 987 988 // jQuery("#Debug1").text(jQuery("#Debug1").text()+"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height); 989 990 jQuery("#Debug2").css({ opacity: "0.50", 991 filter: 'alpha(opacity:50)', 992 position: "absolute", 993 left: '50px', 994 width: (300) + "px", 995 border: "solid 1px green", top: Bandeau_bas.bottom + "px" 996 }); 997 jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom); 998 999 } 1000 1001 if (check_desc_v != 'checked="checked"') { 1002 info_description.height = 0; 1003 } 1004 1005 return info_description; 1006 1007 } 1008 //================================================================================== 1009 1010 //======== jQuery(window).resize();=========================================================== 1011 1074 1012 /* 1075 1013 * recherche la plus grande image (hauteur ou largeur) … … 1098 1036 1099 1037 } // function 1100 ); // ready 1101 /* 1102 * 1103 */ 1038 ); 1039 1040 1041 1042 /* 1043 * 1044 */ 1045 jQuery("#pamoorama").bind(jQuery.browser.msie ? "propertychange" : "change", function (event) { 1046 1047 onPropertyChange(event); 1048 }) 1049 jQuery("#pamoorama_frame").bind(jQuery.browser.msie ? "propertychange" : "change", function (event) { 1050 onPropertyChange(event); 1051 }) 1052 1053 jQuery(window).load(function () { 1054 // jQuery(window).resize(); 1055 // setTimeout("wait_Timer()", 500); 1056 1057 jQuery("#pamoorama").resize(function () { 1058 1059 jQuery("#pamoorama").bind('resize', function () { 1060 jQuery("#pamoorama_outter").bind( 1061 jQuery.browser.msie ? "propertychange" : "change", function (event) { 1062 event.stopPropagation(); 1063 onPropertyChange(event); 1064 }); 1065 }); 1066 }); 1067 1068 }); 1069 //============================================================= 1070 function cl_Timer() { 1071 // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); } 1072 if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) 1073 alert(jQuery.browser.version); 1074 panoramaContainer = jQuery(".panorama-container"); 1075 n = document.scripts[6]; //12--14affiche_script ; 1076 t = n.src; 1077 1078 currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left')); 1079 if (currentPosition == NaN) return; 1080 1081 1082 if (currentPosition > 1000) 1083 jQuery(panoramaContainer).css('margin-left', "0px") 1084 setTimeout("cl_Timer()", 500); 1085 } 1086 1087 1088 //============================================================ 1089 jQuery("#iGMapsIcon").bind('resize', function () { 1090 jQuery().recentrage_widget(); 1091 }) 1092 jQuery("#icon_gmaps").bind('click', function () { 1093 jQuery().recentrage_widget(); 1094 }) 1095 1096 1097 1098 1099 1100 //===================================================================== 1101 jQuery("#pamoorama").bind("resize", function (event) { 1102 onPropertyChange(event); 1103 }) 1104 1105 jQuery("#pamoorama").bind( 1106 jQuery.browser.msie ? "propertychange" : "change", function (event) { 1107 onPropertyChange(event); 1108 }); 1109 1110 1111 jQuery("#pamoorama_outter").bind( 1112 jQuery.browser.msie ? "propertychange" : "change", function (event) { 1113 1114 onPropertyChange(event); 1115 }); 1116 jQuery("#pamoorama_footer").bind( 1117 jQuery.browser.msie ? "propertychange" : "change", function (event) { 1118 1119 onPropertyChange(event); 1120 }); 1121 jQuery("#pamoorama_frame").bind( 1122 jQuery.browser.msie ? "propertychange" : "change", function (event) { 1123 1124 onPropertyChange(event); 1125 }); 1126 1127 //============================================================= 1128 //frame.injectInside 1129 function onPropertyChange(e) { 1130 1131 var el = e.srcElement; 1132 if (e.srcElement == null) return 1133 ID = el.id; 1134 if (jQuery.browser.msie) 1135 PropertyName = window.event.propertyName; 1136 else 1137 PropertyName = window.evt.propertyName; 1138 1139 if (!PropertyName) return; 1140 Prop = PropertyName.split("."); 1141 1142 Valeur = ""; 1143 Property = Prop[1]; 1144 if (typeof (Property) != "undefined") { 1145 Valeur = parseInt(el.currentStyle[Property]); 1146 } else { 1147 Property = Prop[0]; 1148 } 1149 if (DEBUG == "true") { 1150 1151 if (typeof (message) == "undefined") message = jQuery("#Debug1").text(); 1152 1153 jQuery("#Debug1").css({ 1154 filter: 'alpha(opacity:60)', 1155 opacity: 0.8, 1156 position: "absolute", 1157 border: "solid 1px green", 1158 top: 100 + "px", 1159 width: "auto", 1160 height: 400 + "px" 1161 }); 1162 if (ID != "pamoorama") { 1163 message += "onPropertyChange : " + ID + " : " + Property + " : " + Valeur + "\n"; 1164 jQuery("#Debug1").text(message); 1165 } 1166 1167 1168 if (ID == "pamoorama_outter" & Property == "left" && Valeur == -2) { 1169 jQuery("#theImage").css({ filter: 'alpha(opacity:100)', opacity: 1 }); 1170 jQuery("#theImage").css({ filter: 'alpha(opacity:100)', opacity: 1 }); 1171 } 1172 if (Valeur == "block") { 1173 1174 1175 } 1176 } 1177 return; 1178 } 1179 //==================================================================== // ready 1180 /* 1181 * 1182 */ 1104 1183 jQuery.extend(jQuery.expr[':'], { 1105 1184 // Nom du sélecteur personnalisé … … 1131 1210 //========================================================= 1132 1211 }); // fin extend 1212 1213 1214 function wait_Timer() { 1215 old_w = 0 1216 1217 if (DEBUG == "true") { 1218 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 1219 jQuery("#Debug1").css({ 1220 filter: 'alpha(opacity:50)', 1221 position: "absolute", 1222 border: "solid 1px green", 1223 top: 400 + "px", 1224 width: 400 + "px", 1225 height: "auto" 1226 }); 1227 jQuery("#Debug1").text("Debug1:info : " + info_pamoorama_outter.width + 1228 " : " + info_pamoorama_outter.height 1229 ); 1230 } 1231 if (jQuery("#pamoorama").length > 0) 1232 if (info_pamoorama_outter.height == 0) { 1233 1234 // setTimeout('wait_Timer()', 300); 1235 return 1236 } 1237 jQuery(window).resize(); 1238 1239 1240 } 1241 1242 -
extensions/Autosize/js/conflit.js
r7618 r7642 13 13 function (jQuery) { 14 14 15 16 17 15 tpj = jQuery("#pamoorama"); 18 16 if (tpj.length > 0) { } … … 27 25 28 26 29 tp = typeof (Browser);30 if (tp != "undefined")31 if (Browser.loaded == true) {32 n = Browser;33 }34 function $(element, nc) {35 return conflit(element, nc);36 }37 38 27 }); 39 28 … … 82 71 83 72 var jq = jQuery(element).selector; 84 var ret_el ={ prototype : ret_proto,85 pamoorama : ret_pamoorama,73 var ret_el ={ Prototype : ret_proto, 74 Pamoorama : ret_pamoorama, 86 75 jquery : jQuery(element), 87 76 Luciano: ret_Luciano … … 94 83 } 95 84 96 if (Prototype_Version != "0") return ret_el. prototype; //rv_gmaps97 if (MooTools_version == "pamoorama") return ret_el.pamoorama;85 if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps 86 //if (MooTools_version == "pamoorama") return ret_el.Pamoorama; 98 87 return ret_el.jquery; 99 88 j = nc; … … 118 107 if (arguments.caller.length > 1) { 119 108 if (element == "pamoorama") { 120 return ret_el. pamoorama109 return ret_el.Pamoorama 121 110 } 122 111 arg = arguments.caller[1]; … … 128 117 case "dom:loaded": 129 118 return element; 130 return ret_el. prototype119 return ret_el.Prototype 131 120 break; 132 121 case "load": 133 return ret_el. prototype122 return ret_el.Prototype 134 123 break; 135 124 case "unload": 136 return ret_el. prototype125 return ret_el.Prototype 137 126 break; 138 127 case "prototype_event_registry": 139 128 140 129 try { 141 retour = ret_el. prototype;130 retour = ret_el.Prototype; 142 131 } catch (e) { 143 132 retour = null; … … 169 158 switch (arg) { 170 159 case "bottom": 171 return ret_el. pamoorama160 return ret_el.Pamoorama 172 161 break; 173 162 case "left": 174 return ret_el. pamoorama163 return ret_el.Pamoorama 175 164 break; 176 165 case "prototype_event_registry": 177 return ret_el. pamoorama166 return ret_el.Pamoorama 178 167 break; 179 168 case "readystatechange": 180 return ret_el. pamoorama169 return ret_el.Pamoorama 181 170 break; 182 171 183 172 default: 184 173 if (arg.area) { 185 return ret_el. pamoorama174 return ret_el.Pamoorama 186 175 } else 187 176 if (arg.velocity) { 188 return ret_el. pamoorama177 return ret_el.Pamoorama 189 178 } else if (arg.src) { 190 return ret_el. pamoorama179 return ret_el.Pamoorama 191 180 } else if (arg.modifiers) { 192 return ret_el. pamoorama181 return ret_el.Pamoorama 193 182 } else if (arg.limit) { 194 return ret_el. pamoorama183 return ret_el.Pamoorama 195 184 } else if (arg.duration) { 196 return ret_el. pamoorama185 return ret_el.Pamoorama 197 186 } else if (arg.id) { 198 187 switch (arg.id) { 199 188 case "pamoorama_footer": 200 return ret_el. pamoorama189 return ret_el.Pamoorama 201 190 break; 202 191 case "pamoorama_outter": 203 return ret_el. pamoorama192 return ret_el.Pamoorama 204 193 break; 205 194 case "pamoorama_inner": 206 return ret_el. pamoorama195 return ret_el.Pamoorama 207 196 break; 208 197 209 198 default: 210 return ret_el. pamoorama199 return ret_el.Pamoorama 211 200 break; 212 201 213 202 } 214 203 } else if (arg.src) { 215 return ret_el. pamoorama204 return ret_el.Pamoorama 216 205 217 206 } … … 237 226 if (element.match(/[a-z]_[a-z]/)) { 238 227 239 return ret_el. prototype228 return ret_el.Prototype 240 229 } 241 230 id = "window_" + new Date().getTime(); … … 244 233 245 234 if (element.match(/_[a-z]/)) { 246 return ret_el. prototype235 return ret_el.Prototype 247 236 } 248 237 return null; … … 264 253 if (MooTools_version == "Luciano" && tpe == "string") { 265 254 //=== theme Luciano ==== 266 ret_el.jquery = ret_el.Luciano;267 if (element == "order") return ret_el. jquery;268 if (element == "themeSelect") return ret_el. jquery;269 if (element == "languageSelect") return ret_el. jquery;270 if (element == 'linkPrev') return ret_el. jquery;271 if (element == 'linkNext') return ret_el. jquery;272 if (element == 'rateForm') return ret_el. jquery;255 256 if (element == "order") return ret_el.Luciano; 257 if (element == "themeSelect") return ret_el.Luciano; 258 if (element == "languageSelect") return ret_el.Luciano; 259 if (element == 'linkPrev') return ret_el.Luciano; 260 if (element == 'linkNext') return ret_el.Luciano; 261 if (element == 'rateForm') return ret_el.Luciano; 273 262 } 274 263 … … 280 269 switch (jq) { 281 270 case "ie_ready": 282 return ret_el. pamoorama271 return ret_el.Pamoorama 283 272 break; 284 273 case "pamoorama": 285 return ret_el. pamoorama274 return ret_el.Pamoorama 286 275 break; 287 276 case ".tab a": 288 return jQuery(element);277 return ret_el.jquery; 289 278 break; 290 279 291 280 } else if (tpe == "boolean") { 292 return ret_el. pamoorama281 return ret_el.Pamoorama 293 282 } 294 283 if(element) 295 284 if (typeof (element.nodeName) != "undefined") { 296 285 el = element.nodeName; 297 if (el == "DIV") return ret_el. pamoorama298 if (el == "IMG") return ret_el. pamoorama286 if (el == "DIV") return ret_el.Pamoorama 287 if (el == "IMG") return ret_el.Pamoorama 299 288 if (el == "#document") { 300 if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps 301 if (MooTools_version == "pamoorama") return ret_el.pamoorama; 289 if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps 290 if (MooTools_version == "pamoorama") return ret_el.jquery; 291 if (MooTools_version == "pamoorama") return ret_el.Pamoorama; 302 292 return ret_el.jquery; 303 293 } 304 294 if (el == "BODY") { 305 295 try { 306 if (Prototype_Version != "0") return ret_el. prototype; //rv_gmaps307 if (MooTools_version == "pamoorama") return ret_el. pamoorama;296 if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps 297 if (MooTools_version == "pamoorama") return ret_el.Pamoorama; 308 298 return ret_el.jquery; 309 299 return jQuery().$Pamoorama(element) … … 317 307 318 308 if (element == window) { 319 if (Prototype_Version != "0") return ret_el. prototype; //rv_gmaps320 if (MooTools_version == "pamoorama") return ret_el. pamoorama;309 if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps 310 if (MooTools_version == "pamoorama") return ret_el.Pamoorama; 321 311 return ret_el.jquery; 322 312 … … 372 362 //=== rvmaps === 373 363 try { 374 return ret_el. prototype364 return ret_el.Prototype 375 365 376 366 } catch (e) { … … 404 394 //=== paMOOramics === 405 395 // ie_ready,undefined 406 return ret_el. pamoorama396 return ret_el.Pamoorama 407 397 } 408 398 … … 413 403 //=== rvmaps === 414 404 try { 415 return ret_el. prototype405 return ret_el.Prototype 416 406 } catch (e) { 417 407 return jQuery(element); … … 463 453 //=============== PaMOOramics =========================== 464 454 $Pamoorama: function (B) { 465 466 if (!B) { 467 if (typeof (B) == "boolean") return null; 468 return jQuery(); 469 } 470 if (B.htmlElement) { 455 456 if (!B) { 457 return null; 458 } 459 if (B.htmlElement) { 460 return Garbage.collect(B); 461 } 462 if ([window, document].contains(B)) { 463 return B; 464 } 465 var A = $type(B); 466 if (A == "string") { 467 B = document.getElementById(B); 468 A = (B) ? "element" : false; 469 } 470 if (A != "element") { 471 return null; 472 } 473 if (B.htmlElement) { 474 return Garbage.collect(B); 475 } 476 if (["object", "embed"].contains(B.tagName.toLowerCase())) { 477 return B; 478 } 479 $extend(B, Element.prototype); 480 B.htmlElement = function () { }; 471 481 return Garbage.collect(B); 472 473 } 474 if ([window, document].contains(B)) { return B; } 475 var A = $type(B); 476 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; } 477 if (A != "element") { 478 return null; 479 } 480 if (B.htmlElement) { return Garbage.collect(B); } 481 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; } 482 $extend(B, Element.prototype); 483 B.htmlElement = function () { }; 484 try { return Garbage.collect(B); } catch (e) { 485 return; 486 } 482 487 483 488 484 }, -
extensions/Autosize/main.inc.php
r7606 r7642 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 … … 15 15 $autosize_controler = new autosize_controler(); 16 16 17 //add_event_handler('loc_begin_picture', array(&$autosize_controler, 'cl_add_css'),30); 18 add_event_handler('loc_end_picture', array(&$autosize_controler, 'cl_add_css'),30); 19 17 20 18 21 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 40 ); 19 20 21 22 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 22 23 … … 26 27 //add_event_handler('loc_begin_index', array(&$autosize_controler, 'cl_autosize_script'),51 ); 27 28 28 //add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 );29 29 30 30 ?>
Note: See TracChangeset
for help on using the changeset viewer.