Changeset 7816 for extensions/Autosize/js/conflit.js
- Timestamp:
- Nov 19, 2010, 11:13:00 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/conflit.js
r7805 r7816 3 3 * A faire Compatibilité entre LLGBO GMAPS 4 4 * Infobulles spécifiques pour les EXIFS au survol du bouton : Non pour être ok 5 * 5 *147 llgbo2 main.php. // $template->Clear_assign('metadata');// hide original metadata 6 *[gmaps=id:1;width:800;height:640;] 6 7 * Luciano rv_gmaps 7 8 */ … … 14 15 // jQuery est chargé 15 16 } 16 17 function $(element, nc0) { 18 a = conflit(element, nc0); 19 return a; 20 } 21 22 23 17 24 18 //=================================================== 25 19 26 var time_out = 0; 20 /* 21 22 */ 23 msie = jQuery.browser.msie || false; 24 opera= jQuery.browser.opera || false; 25 //======================================== 26 /*function $defined(A) { 27 $ = _$2; // ; 28 return A != undefined; 29 } 30 */ 31 32 var time_out = 0; 27 33 //=================================================== 28 34 29 30 35 nbpa = 0; 36 var Fn; 31 37 function conflit(element, nc) { 32 33 34 Fn=retour.fn;35 retour=retour.state;36 37 n=document;38 v=window;39 40 41 42 }43 38 //--- cl_conflit 39 var retour = (getStackTrace()); 40 Fn = retour.fn; 41 retour = retour.state; 42 43 n = document; 44 v = window; 45 var ret_element = ""; 46 if (retour.match(RegExp("jQuery", "gi"))) { 47 ret_element = jQuery(element); 48 } 49 else if (retour.match(RegExp("rv_gmaps", "gi"))) { 44 50 ret_element = jQuery().$Prototype(element); 45 51 } else if (retour.match(RegExp("GMaps", "gi"))) { … … 47 53 } else if (retour.match(RegExp("pamooramics", "gi"))) { 48 54 49 ret_element =jQuery().$Pamoorama(element);50 51 if (retour.match(RegExp("init_", "gi"))) {52 53 }54 nbpa +=1;55 56 } else if (retour.match(RegExp("luciano", "gi"))) {57 ret_element = jQuery().$Luciano(element);58 59 }else if (retour.match(RegExp("jQuery", "gi"))) {55 ret_element = jQuery().$Pamoorama(element); 56 57 if (retour.match(RegExp("init_", "gi"))) { 58 59 } 60 nbpa += 1; 61 62 } else if (retour.match(RegExp("luciano", "gi"))) { 63 ret_element = jQuery().$Luciano(element); 64 65 } else if (retour.match(RegExp("jQuery", "gi"))) { 60 66 ret_element = jQuery(element); 61 67 } 62 68 63 if (ret_element != "") 64 return ret_element; 65 66 if (typeof (element) == "string") { 67 if (element.match("^#|.ui", "gi")) { 69 if (ret_element != "") 70 return ret_element; 71 72 if (typeof (element) == "string") { 73 if (element.match("^#|.ui", "gi")) { 74 ret_element = jQuery(element); 75 return ret_element; 76 } 77 } else if (typeof (element) == "function") { 78 fn = element.toString(); 79 if (fn.match("#pwg|open", "gi")) { 80 ret_element = jQuery(element); 81 return ret_element; 82 } 83 } else if (element == document) { 84 68 85 ret_element = jQuery(element); 69 86 return ret_element; 70 } 71 } else if (typeof (element) == "function") { 72 fn = element.toString(); 73 if (fn.match("#pwg|open", "gi")) { 74 ret_element = jQuery(element); 75 return ret_element; 76 } 77 } else if ( element==document) { 78 79 ret_element = jQuery(element); 80 return ret_element; 81 82 83 } 84 tp0 = typeof (element); 85 86 ret_element = jQuery(element); 87 if (DEBUG == "true") { 88 retour = (getStackTrace()); 89 alert("element : " + element + " retour : " + retour); 90 91 } 92 return ret_element ; 87 88 89 } 90 tp0 = typeof (element); 91 92 ret_element = jQuery(element); 93 if (DEBUG == "true") { 94 retour = (getStackTrace()); 95 alert("element : " + element + " retour : " + retour); 96 97 } 98 return ret_element; 93 99 } // conflit(element,nc) 94 100 … … 114 120 }) 115 121 //============================================================= 116 function $(element, nc0) {117 a = conflit(element, nc0);118 return a;119 }120 122 p0 = jQuery("#theImage"); 121 123 if (p0.length) { … … 144 146 //============================================================= 145 147 146 148 // $ = _$2; ; 147 149 148 150 … … 153 155 154 156 //========================================================= 155 ; (function ($) {156 157 })(jQuery);158 //mootools159 /* */160 _$2 = $;161 162 function $defined(A) {163 $= _$2 ; // ;164 return A != undefined;165 }166 167 168 169 170 157 171 158 jQuery.fn.extend({ 172 159 173 //---------------- luciano -------------------------------174 $Luciano: function (el, nc) {175 return document.id(el, nc, this.document);176 },177 //=============== PaMOOramics ===========================178 179 $Pamoorama: function (B) {180 181 182 if (!B) {183 if (typeof (B) == "boolean") return null;184 185 }186 187 try {188 if (B.htmlElement) {189 return Garbage.collect(B);190 }191 } catch (e) { 192 193 }194 195 if ([window, document].contains(B)) { return B; }196 var A = $type(B);197 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }198 if (A != "element") {199 return null;200 }201 if (B.htmlElement) { return Garbage.collect(B); }202 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }203 $extend(B, Element.prototype);204 B.htmlElement = function () { };205 try { return Garbage.collect(B); } catch (e) {206 return;207 }208 209 },210 //===================================================211 $Prototype: function (element) {212 //======== prototype.js =====================213 if (arguments.length > 1) {214 for (var i = 0, elements = [], length = arguments.length; i < length; i++)215 elements.push($(arguments[i]));216 return elements;217 }218 if (typeof element == "string")219 element = document.getElementById(element);220 221 return Element.extend(element);222 223 try {224 new_element = Element.extend(element);225 } catch (e) {226 return new_element;227 }228 return new_element;229 }230 //=========================================================160 //---------------- luciano ------------------------------- 161 $Luciano: function (el, nc) { 162 return document.id(el, nc, this.document); 163 }, 164 //=============== PaMOOramics =========================== 165 166 $Pamoorama: function (B) { 167 168 169 if (!B) { 170 if (typeof (B) == "boolean") return null; 171 172 } 173 174 try { 175 if (B.htmlElement) { 176 return Garbage.collect(B); 177 } 178 } catch (e) { 179 180 } 181 182 if ([window, document].contains(B)) { return B; } 183 var A = $type(B); 184 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; } 185 if (A != "element") { 186 return null; 187 } 188 if (B.htmlElement) { return Garbage.collect(B); } 189 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; } 190 $extend(B, Element.prototype); 191 B.htmlElement = function () { }; 192 try { return Garbage.collect(B); } catch (e) { 193 return; 194 } 195 196 }, 197 //=================================================== 198 $Prototype: function (element) { 199 //======== prototype.js ===================== 200 if (arguments.length > 1) { 201 for (var i = 0, elements = [], length = arguments.length; i < length; i++) 202 elements.push($(arguments[i])); 203 return elements; 204 } 205 if (typeof element == "string") 206 element = document.getElementById(element); 207 208 return Element.extend(element); 209 210 try { 211 new_element = Element.extend(element); 212 } catch (e) { 213 return new_element; 214 } 215 return new_element; 216 } 217 //========================================================= 231 218 }); // fin extend 232 219 … … 246 233 var isCallstackPopulated = false; 247 234 try { 248 235 i.dont.exist += 0; //doesn't exist- that's the point 249 236 } catch (e) { 250 237 var retcallstack = []; 251 238 var e_message = e.message; 252 var 239 var e_stack = e.stack; 253 240 if (e_stack) { //Firefox Opera 3.6 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 } 271 if (Src_Match.match("rv_gmaps", "gi")) {272 callstack.push("rv_gmaps");273 isCallstackPopulated = true;274 break;275 }276 if (Src_Match.match("paMOOramics")) {277 isCallstackPopulated = true;278 callstack.push("paMOOramics");279 break;280 }281 if (Src_Match.match("Luciano","gi")) {282 callstack.push("Luciano");283 isCallstackPopulated = true;284 break;285 }286 if (Src_Match.match("main")) {287 alert(Src_Match)288 callstack.push("main");289 isCallstackPopulated = true;290 break;291 }292 if (Src_Match.match("jQuery")) {293 callstack.push("jQuery");294 isCallstackPopulated = true;295 break;296 }297 }298 }299 //callstack.shift();300 isCallstackPopulated = false;301 }302 if (window.opera && e.message && isCallstackPopulated == false) {303 callstack = [];304 //Opera =================================305 var lines = e.message.split("\n");306 for (var i = 0, len = lines.length; i < len; i++) {307 if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {308 var entry = lines[i];309 //Append next line also since it has the file info310 if (lines[i + 1]) {311 entry += " at " + lines[i + 1];312 i++;313 }314 callstack.push(entry);315 //isCallstackPopulated = true;316 }317 }318 319 }320 //===== fin Opera======================================321 }322 if (!isCallstackPopulated) { //IE and Safari323 var currentFunction = arguments.callee.caller;324 //next325 callstack = [];326 all_functions = [];327 state = "";328 if (currentFunction == null) {329 return ("");330 }331 states = [];332 var fn1 = currentFunction.toString(); // fonction d'appel local (conflit)333 334 currentFunction = currentFunction.caller;335 currentFunction = currentFunction.caller;336 //$family337 338 while (currentFunction) {339 var fn = currentFunction.toString();340 all_functions.push(fn);341 var fname =fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " ";342 if (fname != " ") {343 344 jQuery.noop;345 if (states.length>0)break;346 347 // if (fname != " $") callstack.push(fn);348 } if (fname != "") {349 jQuery.noop;350 // if (fname != " $") callstack.push(fn);351 }241 //=== test fichier source ============= 242 var lines = e.stack.split("\n"); 243 for (var i = 0, len = lines.length; i < len; i++) { 244 var Src_Match = lines[i]; 245 if (Src_Match.match(/conflit.js/)) { 246 // 247 } else { 248 if (Src_Match.match(/^\s*[A-Za-z0-9\-_\$]+\(/)) { 249 callstack.push(Src_Match); //php? 250 } else { 251 callstack.push(Src_Match); 252 } 253 if (Src_Match.match("GMaps|applyMap|markupMaps|applyMarkers")) { 254 callstack.push("GMaps"); 255 isCallstackPopulated = true; 256 break; 257 } 258 if (Src_Match.match("rv_gmaps", "gi")) { 259 callstack.push("rv_gmaps"); 260 isCallstackPopulated = true; 261 break; 262 } 263 if (Src_Match.match("paMOOramics")) { 264 isCallstackPopulated = true; 265 callstack.push("paMOOramics"); 266 break; 267 } 268 if (Src_Match.match("Luciano", "gi")) { 269 callstack.push("Luciano"); 270 isCallstackPopulated = true; 271 break; 272 } 273 if (Src_Match.match("main")) { 274 alert(Src_Match) 275 callstack.push("main"); 276 isCallstackPopulated = true; 277 break; 278 } 279 if (Src_Match.match("jQuery")) { 280 callstack.push("jQuery"); 281 isCallstackPopulated = true; 282 break; 283 } 284 } 285 } 286 //callstack.shift(); 287 isCallstackPopulated = false; 288 } 289 if (window.opera && e.message && isCallstackPopulated == false) { 290 callstack = []; 291 //Opera ================================= 292 var lines = e.message.split("\n"); 293 for (var i = 0, len = lines.length; i < len; i++) { 294 if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) { 295 var entry = lines[i]; 296 //Append next line also since it has the file info 297 if (lines[i + 1]) { 298 entry += " at " + lines[i + 1]; 299 i++; 300 } 301 callstack.push(entry); 302 //isCallstackPopulated = true; 303 } 304 } 305 306 } 307 //===== fin Opera====================================== 308 } 309 if (!isCallstackPopulated) { //IE and Safari 310 var currentFunction = arguments.callee.caller; 311 //next 312 callstack = []; 313 all_functions = []; 314 state = ""; 315 if (currentFunction == null) { 316 return (""); 317 } 318 states = []; 319 var fn1 = currentFunction.toString(); // fonction d'appel local (conflit) 320 321 currentFunction = currentFunction.caller; 322 currentFunction = currentFunction.caller; 323 //$family 324 325 while (currentFunction) { 326 var fn = currentFunction.toString(); 327 all_functions.push(fn); 328 var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " "; 329 if (fname != " ") { 330 331 jQuery.noop; 332 if (states.length > 0) break; 333 334 // if (fname != " $") callstack.push(fn); 335 } if (fname != "") { 336 jQuery.noop; 337 // if (fname != " $") callstack.push(fn); 338 } 352 339 callstack.push(fn); 353 354 if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) { 355 states.push('jQuery'); 356 357 } 358 if (fn.match(RegExp("dialog..open", "gi"))) { 359 states.push('GMaps'); 360 361 } 362 if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) { 363 states.push('GMaps'); 364 365 } 366 //====================== 367 if (fn.match(RegExp("_footer|ie_ready|makeDraggable|droppables", "gi"))) { 368 369 states.push('paMOOramics'); 370 371 } 372 if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { 373 states.push('rv_gmaps'); 374 375 } 376 //? bubble 377 Expression = new RegExp("\\$", "gi") 378 if (fn.match(Expression)) { 379 if (fn.match(RegExp("rateForm", "gi"))) { 380 381 states.push('Luciano'); 382 383 } 384 } 385 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano 340 341 if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) { 342 states.push('jQuery'); 343 344 } 345 if (fn.match(RegExp("dialog..open", "gi"))) { 346 states.push('GMaps'); 347 348 } 349 if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) { 350 states.push('GMaps'); 351 352 } 353 //====================== 354 if (fn.match(RegExp("_footer|ie_ready|makeDraggable|droppables", "gi"))) { 355 356 states.push('paMOOramics'); 357 358 } 359 if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { 360 states.push('rv_gmaps'); 361 362 } 363 //? bubble 364 Expression = new RegExp("\\$", "gi") 365 if (fn.match(Expression)) { 366 if (fn.match(RegExp("rateForm", "gi"))) { 386 367 387 368 states.push('Luciano'); 388 389 } 390 391 if (all_functions.length > 50) break; 392 393 394 currentFunction = currentFunction.caller; 395 } 396 397 } 398 state = states.join('\n'); 399 Fn = all_functions; 400 return { state:state , fn:callstack.join('\n') }; 369 370 } 371 } 372 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano 373 374 states.push('Luciano'); 375 376 } 377 378 if (all_functions.length > 50) break; 379 380 381 currentFunction = currentFunction.caller; 382 } 383 384 } 385 state = states.join('\n'); 386 Fn = all_functions; 387 return { state: state, fn: callstack.join('\n') }; 401 388 } 402 389 //==================================== 403 jQuery(window).load(function () { 404 405 a= jQuery(':Description'); 406 407 408 }); 409 410 411 412 413 //============================================== 414 jQuery.extend(jQuery.expr[':'], { 390 391 392 (function($) { 393 $(document).ready(function(){ 394 jQuery(window).load(function () { 395 a = jQuery(':Description'); 396 }); 397 }); 398 //============================================== 399 jQuery.extend(jQuery.expr[':'], { 415 400 // Nom du sélecteur personnalisé 416 Description: function (a) {401 Description: function (a) { 417 402 n = jQuery(a).infos(); 418 403 if (n.id != "") { … … 433 418 434 419 if (Match.match(new RegExp("ajax", "gi"))) { 435 alert(n.id + n.nodeName + a.outerHTML);420 // alert(n.id + n.nodeName + a.outerHTML); 436 421 437 422 } 438 423 } 439 424 if (Match.match(new RegExp("pamoorama", "ig"))) { 440 441 // alert(n.id + n.nodeName + a.innerHTML); 442 443 } 444 } 425 426 // alert(n.id + n.nodeName + a.innerHTML); 427 428 } 429 }else{ 430 431 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) { 432 jQuery.noop; 433 434 } 435 436 } 445 437 446 438 return a; 447 439 448 440 } 449 }); 441 }); //fin extend 442 /* 443 * 444 */ 445 446 447 448 449 450 451 })(jQuery); 452 453 454 function $(element, nc0) { 455 a = conflit(element, nc0); 456 return a; 457 } 458 if (typeof ($.ajax)!="function") 459 { 460 $.ajax= function (origSettings) { 461 jQuery.ajax(origSettings) ; 462 } 463 464 465 $.parseJSON= function (msg){ 466 return jQuery.parseJSON(msg) ; 467 } 468 450 469 451 jQuery("#pamoorama").bind("load", { foo: "bar" }, function release(event) { 452 //setTimeout("end_Timer()", 100); 470 } 453 471 454 // event.stopPropagation();455 })456 function end_Timer() {457 alert("load pamoorama");458 472 473 function save_framework(page) { 474 return 475 459 476 } 460 jQuery().ajaxSuccess(function (evt, request, settings) { 461 alert("ok ajax"); 462 463 }); 464 function save_framework(page) { 465 466 _$2 = window.$; // Pour $.ajax sauvegarge ; 467 if (page == "theCategoryPage") 468 $ = jQuery; 469 else { 470 tpe = jQuery.browser.msie || false; 471 if (tpe == true) { 472 473 // $ = jQuery; // ---> ajax 474 }else{ 475 $ = jQuery; // ---> ajax 476 } 477 478 } 479 480 } 477
Note: See TracChangeset
for help on using the changeset viewer.