Changeset 8093
- Timestamp:
- Dec 12, 2010, 5:10:17 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r8074 r8093 265 265 if (info_ToolBar.width > 0) 266 266 marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 267 else if (info_the_page.width>0) 268 marge = (Zone_Affichage.width - info_the_page.width) / 2; 267 269 268 270 var marge_right = marge; -
extensions/Autosize/js/conflit.js
r8070 r8093 71 71 var Fn; 72 72 function conflit(element, nc) { 73 //--- cl_conflit 73 //--- cl_conflit 74 if (typeof MooTools=="undefined" && typeof Prototype=="undefined" ) { 75 ret_element = jQuery(element); 76 return ret_element; 77 } 78 //==================================================== 74 79 if (typeof (element) == "string") { 75 80 if (element.match("^#|.ui", "gi")) { … … 77 82 return ret_element; 78 83 } 79 } 84 85 } 86 80 87 var retour = (getStackTrace()); 81 88 Fn = retour.fn; 82 89 retour = retour.state; 83 90 84 n = document;85 v = window;86 91 var ret_element = ""; 87 92 if (retour.match(RegExp("jQuery", "gi"))) { … … 89 94 } 90 95 else if (retour.match(RegExp("rv_gmaps", "gi"))) { 91 ret_element = jQuery().$Prototype(element); 96 try{ 97 ret_element = myjQuery().$Prototype(element); 98 } 99 catch(e) 100 { 101 102 ret_element = myjQuery().$Prototype(element); 103 104 } 92 105 } else if (retour.match(RegExp("GMaps", "gi"))) { 93 106 … … 100 113 101 114 } 102 nbpa += 1;115 103 116 104 117 } else if (retour.match(RegExp("luciano", "gi"))) { … … 113 126 if (ret_element != "") 114 127 return ret_element; 115 128 129 n = document; 130 v = window; 131 nbpa += 1; 116 132 if (typeof (element) == "string") { 117 133 if (element.match("^#|.ui", "gi")) { … … 126 142 } 127 143 } else if (element == document) { 144 145 ret_element = jQuery(element); 146 return ret_element; 147 148 149 } else if (element == window) { 128 150 129 151 ret_element = jQuery(element); … … 236 258 //======== prototype.js ===================== 237 259 if (arguments.length > 1) { 238 for (var i = 0, elements = [], length = arguments.length; i < length; i++)239 elements.push($(arguments[i]));240 return elements;260 for (var i = 0, elements = [], length = arguments.length; i < length; i++) 261 elements.push($(arguments[i])); 262 return elements; 241 263 } 242 264 if (typeof element == "string") 243 element = document.getElementById(element);244 245 return Element.extend(element);246 247 try {248 new_element = Element.extend(element);249 } catch (e) {250 return new_element;251 }252 return new_element;265 element = document.getElementById(element); 266 267 //return Element.extend(element); 268 269 try { 270 new_element = Element.extend(element); 271 } catch (e) { 272 return new_element; 273 } 274 return new_element; 253 275 } 254 276 //========================================================= … … 475 497 } 476 498 //==================================== 477 478 479 $_0= $; 480 function $(element, nc0) { 481 a = conflit(element, nc0); 482 return a; 483 } 484 if (typeof ($.ajax) != "function") { 485 $.ajax = function (origSettings) { 486 jQuery.ajax(origSettings); 487 } 488 489 490 $.parseJSON = function (msg) { 491 return jQuery.parseJSON(msg); 492 } 493 494 495 } 496 //============================================ 497 /* url (String): URl de la page à charger 498 * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 499 * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 500 * type (String): (optionnel) format des données renvoyées à la fonction de callback 501 */ 502 if (typeof ($.get) != "function") { 503 $.get = function ( a, b, c, d) { 504 return jQuery.get(a, b, c,d ); 505 } 506 } 507 499 test_conflit = false; 500 librairies =new Array; 501 502 508 503 509 504 $_ = $; … … 520 515 521 516 } 517 518 (function ($) { 519 $(document).ready(function () { 520 //================================================= 521 if (typeof jQuery.fn.infos !="function") 522 { 523 jQuery=myjQuery; 524 $=my$ ; 525 } 526 }); 527 528 })(jQuery); 529 530 if(test_conflit!=true) 531 { 532 //-------------------------------------------------------------- 533 $_0 = $; 522 534 535 function $(element, nc0) { 536 if (typeof jQuery.fn.infos !="function") 537 if (typeof myjQuery !="undefined") 538 jQuery=myjQuery; 539 a = conflit(element, nc0); 540 return a; 541 } 542 543 if (typeof ($.ajax) != "function") { 544 $.ajax = function (origSettings) { 545 jQuery.ajax(origSettings); 546 } 547 548 549 $.parseJSON = function (msg) { 550 return jQuery.parseJSON(msg); 551 } 552 553 554 } 555 //============================================ 556 /* url (String): URl de la page à charger 557 * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 558 * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 559 * type (String): (optionnel) format des données renvoyées à la fonction de callback 560 */ 561 if (typeof ($.get) != "function") { 562 $.get = function ( a, b, c, d) { 563 return jQuery.get(a, b, c,d ); 564 } 565 } 566 567 } 568 //-------------------------------------------------------------- -
extensions/Autosize/js/jquery.dimensions.js
r7912 r8093 32 32 borr = name == 'Height' ? 'Bottom' : 'Right'; 33 33 options = options || false; 34 options = jQuery.extend({ margin: options } 34 options = jQuery.extend({ margin: options }); 35 35 36 36 var val = this.is(':visible') ? this[0]['offset' + name] : … … 299 299 }; 300 300 301 301 myjQuery = jQuery; 302 my$ = $; 302 303 303 304 })(jQuery); -
extensions/Autosize/main.inc.php
r8074 r8093 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.4.2. 24 Version: 1.4.2.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 -
extensions/Autosize/template/conflit.tpl
r8057 r8093 3 3 <!--- Ajout scripts {$AUTOSIZE_PATH}---> 4 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}<!--- RECHARGE DE {$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} ---> 5 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}<!---{$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} ---> 6 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}<!--- {$AUTOSIZE_PATH|@cat:"js/conflit.js"} ---> 7 5 8 <script type="text/javascript"> 6 9 var DEBUG = '{$DEBUG}'; 7 10 </script> 8 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}<!--- {$AUTOSIZE_PATH|@cat:"js/conflit.js"} ---> 9 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}<!---{$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} ---> 11 10 12 <!--- fin Ajout scripts ---> 11 13 <script type="text/javascript"> … … 25 27 </script> 26 28 <!---FIN Autosize/template/confilt.tpl (/head) ---> 27 {/html_head} 29 {/html_head} 28 30 <!---{$ROOT_URL} --- {$AUTOSIZE_PATH}template/confilt.tpl (body) ---> 29 31 <!---FIN {$ROOT_URL} --- {$AUTOSIZE_PATH}template/confilt.tpl (body) --->
Note: See TracChangeset
for help on using the changeset viewer.