Changeset 8187 for extensions/cl_conflit
- Timestamp:
- Dec 18, 2010, 12:33:20 PM (13 years ago)
- Location:
- extensions/cl_conflit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/cl_conflit/conflit.inc.php
r7945 r8187 39 39 $template->set_filenames(array('cl_conflit_init'=>$my_path. "template/conflit.tpl" ) ); 40 40 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 41 $cl_conflit_parametres = cl_conflit_Get_Options() ; 41 $cl_conflit_parametres = cl_conflit_Get_Options() ; 42 43 42 44 $theme=$user['theme']; 43 45 … … 51 53 'theme' => $theme , 52 54 'DEBUG' => $debug , 53 'CONFLIT_ PATH' => CONFLIT_PATH)55 'CONFLIT_ROOT' => CONFLIT_PATH) 54 56 ); 55 57 … … 155 157 global $cl_conflit_parametres; 156 158 //============================================================================= 157 $my_para=$cl_conflit_parametres; 159 $cl_conflit_parametres->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($cl_conflit_parametres->query )) ? $cl_conflit_parametres->query : 'Qt' ) ; 160 $cl_conflit_parametres->type=(isset($_POST['type']))? $_POST['type']: ((isset($cl_conflit_parametres->type)) ? $cl_conflit_parametres->type: 'Ty') ; 158 161 159 $my_para->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($my_para->query )) ? $my_para->query : 'Qt' ) ;160 $my_para->type=(isset($_POST['type']))? $_POST['type']: ((isset($my_para->type)) ? $my_para->type: 'Ty') ;161 162 162 163 return $my_para; 163 return $cl_conflit_parametres; 164 164 } 165 165 /* -
extensions/cl_conflit/js/conflit.js
r7945 r8187 1 //==== autosizeremplace $(... avec jQuery( ====1 //==== cl_conflit remplace $(... avec jQuery( ==== 2 2 /* 3 3 *[gmaps=id:1;width:800;height:640;] … … 9 9 var dom = {}; 10 10 if (typeof jQuery == 'undefined') { 11 alert(" jQuery n'est pas chargé");11 // alert(" jQuery n'est pas chargé"); 12 12 } else { 13 13 // jQuery est chargé 14 14 } 15 try( 16 DEBUG = DEBUG || "false"; 17 }catch(e) 18 { 19 20 } 15 21 16 //=================================================== 22 17 var detect = navigator.userAgent.toLowerCase(); … … 82 77 netscape = mybrowser.netscape || false; 83 78 84 85 //========================================86 /*function $defined(A) {87 $ = _$2; // ;88 return A != undefined;89 }90 */91 92 79 var time_out = 0; 93 80 //=================================================== … … 96 83 var Fn; 97 84 function conflit(element, nc) { 98 //--- cl_conflit 85 //--- cl_conflit 86 if (typeof MooTools=="undefined" && typeof Prototype=="undefined" ) { 87 ret_element = jQuery(element); 88 return ret_element; 89 } 90 //==================================================== 91 if (typeof (element) == "string") { 92 if (element.match("^#|.ui", "gi")) { 93 ret_element = jQuery(element); 94 return ret_element; 95 } 96 97 } 98 99 99 var retour = (getStackTrace()); 100 100 Fn = retour.fn; 101 101 retour = retour.state; 102 102 103 n = document;104 v = window;105 103 var ret_element = ""; 106 104 if (retour.match(RegExp("jQuery", "gi"))) { … … 108 106 } 109 107 else if (retour.match(RegExp("rv_gmaps", "gi"))) { 110 ret_element = jQuery().$Prototype(element); 111 } else if (retour.match(RegExp("GMaps", "gi"))) { 112 108 try{ 109 ret_element = myjQuery().$Prototype(element); 110 } 111 catch(e) 112 { 113 114 ret_element = myjQuery().$Prototype(element); 115 116 } 117 } else if (retour.match(RegExp("GMaps", "gi"))) { 113 118 114 119 ret_element = jQuery(element); … … 120 125 121 126 } 122 nbpa += 1;127 123 128 124 129 } else if (retour.match(RegExp("luciano", "gi"))) { … … 151 156 152 157 158 } else if (element == window) { 159 160 ret_element = jQuery(element); 161 return ret_element; 162 163 153 164 } 154 165 tp0 = typeof (element); … … 162 173 return ret_element; 163 174 } // conflit(element,nc) 164 175 //====================================================== 176 /* 177 * 178 * 179 */ 180 //====================================================== 165 181 jQuery(document).ready( 166 function (jQuery) {167 jQuery(window).load(function () {168 //============================================================169 jQuery("#icon_gmaps").bind('click', function () {182 function (jQuery) { 183 jQuery(window).load(function () { 184 //============================================================ 185 jQuery("#icon_gmaps").bind('click', function () { 170 186 171 187 jQuery('html,body').stop().scrollTop(0); … … 182 198 if (typeof(Parent)=="undefined") 183 199 Parent = "#theImage"; 184 185 info_image = jQuery(Parent).infos(); 186 p0 = jQuery(Parent); 187 if (p0.length > 0) { 188 189 //====================================================== 190 if (theme.match("gally", "gi")) 200 info_image = jQuery(Parent).infos(); 201 p0 = jQuery(Parent); 202 if (p0.length > 0) { 203 //====================================================== 204 if (theme.match("gally", "gi")) 191 205 if (jQuery.isFunction(inittoolbar)) { 192 206 if (typeof (currentTab) == "undefined") inittoolbar(); 193 else initializeImageMode("resize"); 194 195 196 if (info_image.position != "static") { 197 //==== compatibilité Gally/LLGBO === 198 //--- passage relative ==> static ===/ 199 jQuery(Parent).css({ position: "static" } ); 200 jQuery("#imageToolBar").css({ position: "relative", top: "0px" }); 201 }; 207 else initializeImageMode("resize"); 208 if (info_image.position != "static") { 209 //==== compatibilité Gally/LLGBO === 210 //--- passage relative ==> static ===/ 211 jQuery(Parent).css({ position: "static" } ); 212 jQuery("#imageToolBar").css({ position: "relative", top: "0px" }); 213 }; 214 } 202 215 } 203 }204 216 // jQuery(window).resize(); 205 217 206 218 }); 207 //============================================================= 208 209 // $ = _$2; ; 210 211 212 }) 213 ; 219 //============================================================= 220 // $ = _$2; ; 221 }); 214 222 215 223 … … 219 227 jQuery.fn.extend({ 220 228 221 222 223 224 225 226 227 229 //---------------- luciano ------------------------------- 230 $Luciano: function (el, nc) { 231 return document.id(el, nc, this.document); 232 }, 233 //=============== PaMOOramics =========================== 234 235 $Pamoorama: function (B) { 228 236 229 237 … … 499 507 } 500 508 //==================================== 501 502 503 (function ($) { 504 $(document).ready(function () { 505 jQuery(window).load(function () { 506 a = jQuery(':Description'); 507 }); 508 }); 509 //============================================== 510 librairies=[]; 511 jQuery.extend(jQuery.expr[':'], { 512 // Nom du sélecteur personnalisé 513 Description: function (a) { 514 n = jQuery(a).infos(); 515 if (n.id != "") { 516 //alert("<" + n.nodeName +" id= " + n.id + " >") ; 517 } 518 if (n.nodeName == "SCRIPT") 519 if (a.src == "") { 520 Match = jQuery(a).html(); 521 /* 522 if ( Match.match(new RegExp("jQuery", "gi") )) { 523 alert(n.id + n.nodeName + a.outerHTML ) ; 524 } 525 if ( Match.match(new RegExp("ajax", "gi") )) { 526 alert(n.id + n.nodeName + a.outerHTML ) ; 527 } 528 */ 529 if (Match.match(new RegExp("\\$", "gi"))) { 530 531 if (Match.match(new RegExp("ajax", "gi"))) { 532 // alert(n.id + n.nodeName + a.outerHTML); 533 534 } 535 } 536 if (Match.match(new RegExp("pamoorama", "ig"))) { 537 538 // alert(n.id + n.nodeName + a.innerHTML); 539 540 } 541 } else { 542 543 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) { 544 jQuery.noop; 545 librairies.push(a.src); 546 } 547 548 } 549 550 return a; 551 552 } 553 }); //fin extend 554 /* 555 * 556 */ 557 558 559 560 561 562 563 })(jQuery); 564 565 566 567 $_0= $; 568 function $(element, nc0) { 569 a = conflit(element, nc0); 570 return a; 571 } 572 if (typeof ($.ajax) != "function") { 573 $.ajax = function (origSettings) { 574 jQuery.ajax(origSettings); 575 } 576 577 578 $.parseJSON = function (msg) { 579 return jQuery.parseJSON(msg); 580 } 581 582 583 } 584 //============================================ 585 /* url (String): URl de la page à charger 586 * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 587 * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 588 * type (String): (optionnel) format des données renvoyées à la fonction de callback 589 */ 590 if (typeof ($.get) != "function") { 591 $.get = function ( a, b, c, d) { 592 return jQuery.get(a, b, c,d ); 593 } 594 595 596 } 597 509 test_conflit = false; 510 librairies =new Array; 511 512 598 513 599 514 $_ = $; … … 604 519 605 520 } 606 607 $_2 = $; 521 $_2 = $; 608 522 return 609 523 } 524 525 (function ($) { 526 $(document).ready(function () { 527 //================================================= 528 if (typeof jQuery.fn.infos !="function") 529 { 530 jQuery=myjQuery; 531 $=my$ ; 532 } 533 }); 534 535 })(jQuery); 536 537 if(test_conflit!=true) 538 { 539 //-------------------------------------------------------------- 540 $_0 = $; 541 542 function $(element, nc0) { 543 if (typeof jQuery.fn.infos !="function") 544 if (typeof myjQuery !="undefined") 545 jQuery=myjQuery; 546 a = conflit(element, nc0); 547 return a; 548 549 } 550 551 if (typeof ($.ajax) != "function") { 552 $.ajax = function (origSettings) { 553 jQuery.ajax(origSettings); 554 } 555 556 557 $.parseJSON = function (msg) { 558 return jQuery.parseJSON(msg); 559 } 560 561 562 } 563 //============================================ 564 /* url (String): URl de la page à charger 565 * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 566 * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 567 * type (String): (optionnel) format des données renvoyées à la fonction de callback 568 */ 569 if (typeof ($.get) != "function") { 570 $.get = function ( a, b, c, d) { 571 return jQuery.get(a, b, c,d ); 572 } 573 } 574 if (typeof ($.post) != "function") { 575 576 $.post = function (a, b, c,d) { 577 return jQuery.post(a, b, c, d); 578 } 579 ; 580 581 } 582 583 584 610 585 } 611 586 //-------------------------------------------------------------- -
extensions/cl_conflit/js/jquery.dimensions.js
r7914 r8187 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/cl_conflit/template/conflit.tpl
r7945 r8187 1 1 {html_head} 2 <!--- cl_conflit/template/confilt.tpl (html_head) ---> 3 <!--- Ajout scripts {$CONFLIT_PATH}---> 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" } <!--- jquery.packed.js ---> 5 {known_script id="conflit_script" src=$CONFLIT_PATH|@cat:"js/conflit.js"}<!--- conflit.js ---> 6 {known_script id="dimensions" src=$CONFLIT_PATH|@cat:"js/jquery.dimensions.js"}<!---jquery.dimensions.js ---> 7 <!--- fin Ajout scripts ---> 2 <!--- Autosize/template/confilt.tpl (before) ---> 3 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" } 4 {known_script id="conflit_script" src=$CONFLIT_ROOT|@cat:"js/conflit.js"} 5 {known_script id="dimensions" src=$CONFLIT_ROOT|@cat:"js/jquery.dimensions.js"} 6 <!---FIN Autosize/template/confilt.tpl (before) ---> {/html_head} 8 7 <script type="text/javascript"> 9 8 var DEBUG = '{$DEBUG}'; … … 22 21 {/if} 23 22 </script> 24 <!---FIN cl_conflit/template/confilt.tpl (html_head) --->25 {/html_head}
Note: See TracChangeset
for help on using the changeset viewer.