Changeset 7618 for extensions/Autosize
- Timestamp:
- Nov 4, 2010, 10:07:40 AM (14 years ago)
- Location:
- extensions/Autosize/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7606 r7618 23 23 function wait_Timer() { 24 24 old_w = 0 25 25 26 if (DEBUG == "true") { 26 27 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); … … 29 30 position: "absolute", 30 31 border: "solid 1px green", 31 top: 100 + "px",32 top: 400 + "px", 32 33 width: (200) + "px", 33 height: 200 + "px"34 height: 400 + "px" 34 35 }); 35 36 jQuery("#Debug1").text("Debug1:info : " + info_pamoorama_outter.width + … … 37 38 ); 38 39 } 39 jQuery(window).resize(); 40 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 }); 41 48 42 49 } … … 61 68 62 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 ); 63 78 64 79 … … 362 377 * window .resize 363 378 */ 364 jQuery(window).resize(); 365 setTimeout('jQuery(window).resize()', 300); 379 366 380 367 381 jQuery(window).resize(function (event, ui) { … … 370 384 if (eval(user_status + "_enabled") == "") return; 371 385 var chk = eval(user_status + "_enabled"); 372 373 386 374 387 … … 1085 1098 1086 1099 } // function 1087 ); // ready1100 ); // ready 1088 1101 /* 1089 1102 * -
extensions/Autosize/js/conflit.js
r7606 r7618 3 3 var init_tb = 0; 4 4 5 6 5 function $(element, nc) { 7 6 nc = this; 7 // element, key, defaultValue 8 8 return conflit(element, nc); 9 9 } … … 44 44 var tp1 = typeof (MooTools); 45 45 var MooTools_version = "0"; 46 ret_mootool=jQuery(element) ; 47 ret_Luciano =ret_mootool ; 48 ret_pamoorama = ret_mootool; 46 49 47 50 if (tp1 != "undefined") { … … 49 52 if (MooTools.version == "1.2.4") { 50 53 MooTools_version = "Luciano"; // luciano 51 ret_Luciano = jQuery().$Luciano(element, nc);54 ret_Luciano = jQuery().$Luciano(element, nc) ; 52 55 } 53 56 54 57 if (MooTools.version == "1.11") { 55 58 MooTools_version = "pamoorama"; //pamoorama 59 ret_pamoorama = jQuery().$Pamoorama(element) 56 60 } 57 61 … … 61 65 tp1 = typeof (Prototype); 62 66 var Prototype_Version = '0'; 67 ret_proto=jQuery(); 63 68 if (tp1 != "undefined") { 64 69 if (Prototype.Version == '1.6.0.2') { 65 70 Prototype_Version = '1602'; 66 71 ret_proto=jQuery().$Prototype(element) ; 67 72 } else if (Prototype.Version == '1.6.1') { 68 73 Prototype_Version = '161'; 69 74 ret_proto=jQuery().$Prototype(element) ; 70 75 } else if (Prototype.Version == '1.0.0.0') { 71 76 Prototype_Version = '1'; 72 77 ret_proto=jQuery().$Prototype(element) ; 73 78 } 74 79 } 75 80 //=================================================== 81 82 76 83 var jq = jQuery(element).selector; 77 var new_element = jQuery(element); 84 var ret_el ={ prototype : ret_proto, 85 pamoorama : ret_pamoorama, 86 jquery : jQuery(element), 87 Luciano: ret_Luciano 88 }; 89 90 if (element == window) { 91 if (typeof (Gmaps_status) != "undefined") { 92 if (Gmaps_status ) 93 return ret_el.jquery; 94 } 95 96 if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps 97 if (MooTools_version == "pamoorama") return ret_el.pamoorama; 98 return ret_el.jquery; 99 j = nc; 100 101 } 102 103 //=================================================== 78 104 //div.gmapsPopup div.ui-dialog-titlebar 79 if (jq.match(/GMaps/) || jq.match(/gmaps/)) { 105 if (jq.match(/GMaps/) || jq.match(/gmaps/)) { 106 Gmaps_status = true; 80 107 if (jq == "#iGMapsIconContent") { 81 108 setTimeout('jQuery().recentrage_widget()', 0); 82 109 } 83 if ( new_element.length > 0) return new_element;84 return new_element;110 if (ret_el.jquery.length > 0) return ret_el.jquery; 111 return ret_el.jquery; 85 112 } 86 113 if (Prototype_Version == "0" && MooTools_version == "0") { 87 return new_element;114 return ret_el.jquery; 88 115 } 89 116 //======================================================================================= … … 91 118 if (arguments.caller.length > 1) { 92 119 if (element == "pamoorama") { 93 return jQuery().$Pamoorama(element);120 return ret_el.pamoorama 94 121 } 95 122 arg = arguments.caller[1]; … … 101 128 case "dom:loaded": 102 129 return element; 103 return jQuery().$Prototype(element);130 return ret_el.prototype 104 131 break; 105 132 case "load": 106 return jQuery().$Prototype(element);133 return ret_el.prototype 107 134 break; 108 135 case "unload": 109 return jQuery().$Prototype(element);136 return ret_el.prototype 110 137 break; 111 138 case "prototype_event_registry": 112 139 113 140 try { 114 new_element = jQuery().$Prototype(element);141 retour = ret_el.prototype; 115 142 } catch (e) { 116 new_element= null;143 retour = null; 117 144 } 118 119 120 return new_element; 145 return retour; 121 146 break; 122 147 case "readystatechange": 123 148 try { 124 new_element = jQuery().$Prototype(element);149 retour = ret_el.Luciano; 125 150 } catch (e) { 126 new_element= null;151 retour = null; 127 152 try { 128 new_element = jQuery().$Luciano(element, nc);129 new_element= jQuery(element).get(0);153 retour = ret_el.Luciano; 154 retour = jQuery(element).get(0); 130 155 } catch (e) { 131 new_element= null;156 retour = null; 132 157 } 133 158 134 159 } 135 160 136 return new_element;161 return ret_el.jquery; 137 162 break; 138 163 } … … 144 169 switch (arg) { 145 170 case "bottom": 146 return jQuery().$Pamoorama(element);171 return ret_el.pamoorama 147 172 break; 148 173 case "left": 149 return jQuery().$Pamoorama(element);174 return ret_el.pamoorama 150 175 break; 151 176 case "prototype_event_registry": 152 return jQuery().$Pamoorama(element);177 return ret_el.pamoorama 153 178 break; 154 179 case "readystatechange": 155 return jQuery().$Pamoorama(element);180 return ret_el.pamoorama 156 181 break; 157 182 158 183 default: 159 184 if (arg.area) { 160 return jQuery().$Pamoorama(element);185 return ret_el.pamoorama 161 186 } else 162 187 if (arg.velocity) { 163 return jQuery().$Pamoorama(element);188 return ret_el.pamoorama 164 189 } else if (arg.src) { 165 return jQuery().$Pamoorama(element);190 return ret_el.pamoorama 166 191 } else if (arg.modifiers) { 167 return jQuery().$Pamoorama(element);192 return ret_el.pamoorama 168 193 } else if (arg.limit) { 169 return jQuery().$Pamoorama(element);194 return ret_el.pamoorama 170 195 } else if (arg.duration) { 171 return jQuery().$Pamoorama(element);196 return ret_el.pamoorama 172 197 } else if (arg.id) { 173 198 switch (arg.id) { 174 199 case "pamoorama_footer": 175 return jQuery().$Pamoorama(element);200 return ret_el.pamoorama 176 201 break; 177 202 case "pamoorama_outter": 178 return jQuery().$Pamoorama(element);203 return ret_el.pamoorama 179 204 break; 180 205 case "pamoorama_inner": 181 return jQuery().$Pamoorama(element);206 return ret_el.pamoorama 182 207 break; 183 208 184 209 default: 185 return jQuery().$Pamoorama(element);210 return ret_el.pamoorama 186 211 break; 187 212 188 213 } 189 214 } else if (arg.src) { 190 return jQuery().$Pamoorama(element);215 return ret_el.pamoorama 191 216 192 217 } 193 218 //======================================================= 194 return new_element;219 return ret_el.jquery; 195 220 break; 196 221 … … 212 237 if (element.match(/[a-z]_[a-z]/)) { 213 238 214 return jQuery().$Prototype(element);239 return ret_el.prototype 215 240 } 216 241 id = "window_" + new Date().getTime(); … … 219 244 220 245 if (element.match(/_[a-z]/)) { 221 return jQuery().$Prototype(element);246 return ret_el.prototype 222 247 } 223 248 return null; … … 228 253 if (tpe == "string") 229 254 if (element.match(RegExp("^#", "g")) ) { 230 return new_element;255 return ret_el.jquery; 231 256 } 232 257 if (jq.match(RegExp("^#", "g")) || jq == "html") { 233 return new_element;258 return ret_el.jquery; 234 259 } 235 260 if (tpe == "undefined") { … … 239 264 if (MooTools_version == "Luciano" && tpe == "string") { 240 265 //=== theme Luciano ==== 241 new_element = jQuery().$Luciano(element, nc);242 if (element == "order") return new_element;243 if (element == "themeSelect") return new_element;244 if (element == "languageSelect") return new_element;245 if (element == 'linkPrev') return new_element;246 if (element == 'linkNext') return new_element;247 if (element == 'rateForm') return new_element;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; 248 273 } 249 274 … … 255 280 switch (jq) { 256 281 case "ie_ready": 257 return jQuery().$Pamoorama(element);282 return ret_el.pamoorama 258 283 break; 259 284 case "pamoorama": 260 return jQuery().$Pamoorama(element);285 return ret_el.pamoorama 261 286 break; 262 287 case ".tab a": … … 265 290 266 291 } else if (tpe == "boolean") { 267 return jQuery().$Pamoorama(element);268 } 269 292 return ret_el.pamoorama 293 } 294 if(element) 270 295 if (typeof (element.nodeName) != "undefined") { 271 296 el = element.nodeName; 272 if (el == "DIV") return jQuery().$Pamoorama(element); 273 if (el == "IMG") return jQuery().$Pamoorama(element); 274 if (el == "#document") return jQuery(element); 297 if (el == "DIV") return ret_el.pamoorama 298 if (el == "IMG") return ret_el.pamoorama 299 if (el == "#document") { 300 if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps 301 if (MooTools_version == "pamoorama") return ret_el.pamoorama; 302 return ret_el.jquery; 303 } 275 304 if (el == "BODY") { 276 try { return jQuery().$Pamoorama(element) } catch (e) { 305 try { 306 if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps 307 if (MooTools_version == "pamoorama") return ret_el.pamoorama; 308 return ret_el.jquery; 309 return jQuery().$Pamoorama(element) 310 } catch (e) { 277 311 return jQuery(element); 278 312 }; 279 313 } 280 } 281 if (element == window) 282 return new_element; 314 } 315 316 317 318 if (element == window) { 319 if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps 320 if (MooTools_version == "pamoorama") return ret_el.pamoorama; 321 return ret_el.jquery; 322 323 } 283 324 284 325 } … … 296 337 } 297 338 298 if ( new_element.length < 2) return new_element;299 if ( new_element.length == 2) return jQuery(element).get(1);300 if ( new_element.length == 3) return jQuery(element).get(2);339 if (ret_el.jquery.length < 2) return ret_el.jquery; 340 if (ret_el.jquery.length == 2) return jQuery(element).get(1); 341 if (ret_el.jquery.length == 3) return jQuery(element).get(2); 301 342 302 343 } … … 305 346 if (init_tb == 1) { 306 347 init_tb = 2; 307 return new_element;348 return ret_el.jquery; 308 349 } 309 350 310 351 311 352 //========= ???? =================== 312 if ( new_element!= null) {313 if (typeof ( new_element.context) != "undefined") {353 if (ret_el.jquery != null) { 354 if (typeof (ret_el.jquery.context) != "undefined") { 314 355 if (afq != 1 && afq != undefined) { 315 356 if (init_tb != 2) init_tb = 1; 316 return new_element;317 } 318 if ( new_element.context.loaded) {357 return ret_el.jquery; 358 } 359 if (ret_el.jquery.context.loaded) { 319 360 //=== theme Luciano ==== 320 361 if (MooTools_version == "Luciano") { … … 331 372 //=== rvmaps === 332 373 try { 333 return jQuery().$Prototype(element);374 return ret_el.prototype 334 375 335 376 } catch (e) { … … 348 389 //=== theme Luciano ==== 349 390 tp = this; 350 new_element= ret_Luciano;391 ret_el.jquery = ret_Luciano; 351 392 //$(this.options.container) 352 if ( new_element!= null) {353 if ( new_element.nodeName) {354 tp = new_element.nodeName + new_element.nodeType;355 if (tp == "DIV1") return new_element;356 if (tp == "SELECT1") return new_element;393 if (ret_el.jquery != null) { 394 if (ret_el.jquery.nodeName) { 395 tp = ret_el.jquery.nodeName + ret_el.jquery.nodeType; 396 if (tp == "DIV1") return ret_el.jquery; 397 if (tp == "SELECT1") return ret_el.jquery; 357 398 tp = element.nodeName + element.nodeType; 358 return new_element;399 return ret_el.jquery; 359 400 } 360 401 … … 363 404 //=== paMOOramics === 364 405 // ie_ready,undefined 365 return jQuery().$Pamoorama(element);406 return ret_el.pamoorama 366 407 } 367 408 … … 372 413 //=== rvmaps === 373 414 try { 374 return jQuery().$Prototype(element);415 return ret_el.prototype 375 416 } catch (e) { 376 417 return jQuery(element); … … 414 455 //---------------- luciano ------------------------------- 415 456 $Luciano: function (el, nc) { 416 return document.id(el, nc, this.document); 457 try { 458 return document.id(el, nc, this.document) 459 } catch (e) { 460 return; 461 }; 417 462 }, 418 463 //=============== PaMOOramics =========================== 419 464 $Pamoorama: function (B) { 465 420 466 if (!B) { 421 467 if (typeof (B) == "boolean") return null; … … 436 482 $extend(B, Element.prototype); 437 483 B.htmlElement = function () { }; 438 try{ return Garbage.collect(B);}catch(e){439 return;440 }484 try { return Garbage.collect(B); } catch (e) { 485 return; 486 } 441 487 442 488 }, … … 452 498 element = document.getElementById(element); 453 499 454 500 return Element.extend(element); 455 501 456 502 try { 457 new_element= Element.extend(element);503 ret_el.jquery = Element.extend(element); 458 504 } catch (e) { 459 return new_element;460 } 461 return new_element;505 return ret_el.jquery; 506 } 507 return ret_el.jquery; 462 508 } 463 509 //========================================================= 464 }); // fin extend510 }); // fin extend
Note: See TracChangeset
for help on using the changeset viewer.