Changeset 8740
- Timestamp:
- Jan 18, 2011, 5:17:36 PM (14 years ago)
- Location:
- extensions/cl_conflit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/cl_conflit/js/conflit.js
r8629 r8740 37 37 else OS = "an unknown operating system"; 38 38 } 39 39 mybrowser.version =version; 40 mybrowser.OS = OS; 40 41 mybrowser.browser = lbrowser; 41 42 return mybrowser … … 72 73 function conflit(element, nc) { 73 74 //--- cl_conflit 74 if (typeof MooTools =="undefined" && typeof Prototype=="undefined") {75 if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 75 76 ret_element = jQuery(element); 76 77 return ret_element; … … 94 95 } 95 96 else if (retour.match(RegExp("rv_gmaps", "gi"))) { 96 try{ 97 ret_element = myjQuery().$Prototype(element); 98 } 99 catch(e) 100 { 101 97 try { 102 98 ret_element = myjQuery().$Prototype(element); 103 104 } 105 } else if (retour.match(RegExp("GMaps", "gi"))) { 99 } 100 catch (e) { 101 102 ret_element = myjQuery().$Prototype(element); 103 104 } 105 } else if (retour.match(RegExp("GMaps", "gi"))) { 106 106 107 107 ret_element = jQuery(element); … … 492 492 493 493 } 494 if (jQuery('#browser').length > 0) { 495 jQuery('#browser').val(browser.browser); 496 } 494 497 if (typeof (Parent) == "undefined") 495 498 Parent = "#theImage"; … … 508 511 }; 509 512 //==== compatibilité Gally/LLGBO === 510 jQuery(Parent).css({ position: "static" }); 513 jQuery(Parent).css({ position: "static" }); 511 514 512 515 } … … 543 546 return a; 544 547 } 548 549 if (typeof ($.extend) != "function") { 550 551 $.extend = function (a,b) { 552 return jQuery.extend(a, b); 553 } ; 554 555 556 } 545 557 546 558 if (typeof ($.ajax) != "function") { -
extensions/cl_conflit/js/jquery.dimensions.js
r8629 r8740 119 119 120 120 121 borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth );122 borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth );123 borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth );124 borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth );121 borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth, "", "", 'borderLeftWidth'); 122 borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth, "", "", 'borderRightWidth'); 123 borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth, "", "", 'borderTopWidth'); 124 borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth, "", "", 'borderBottomWidth'); 125 125 try { 126 126 borderwidth.width = Css.borderWidth; … … 131 131 132 132 133 margin.left = jQuery(elem).Get_Val_int(Css.marginLeft );134 margin.right = jQuery(elem).Get_Val_int(Css.marginRight );135 margin.top = jQuery(elem).Get_Val_int(Css.marginTop );136 margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom );133 margin.left = jQuery(elem).Get_Val_int(Css.marginLeft, "", "", 'marginLeft'); 134 margin.right = jQuery(elem).Get_Val_int(Css.marginRight, "", "", 'marginRight'); 135 margin.top = jQuery(elem).Get_Val_int(Css.marginTop, "", "", 'marginTop'); 136 margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom, "", "", 'marginBottom'); 137 137 try { 138 138 margin.margin = Css.margin; … … 141 141 } 142 142 143 padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft); 144 padding.right = jQuery(elem).Get_Val_int(Css.paddingRight); 145 padding.top = jQuery(elem).Get_Val_int(Css.paddingTop); 146 padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom); 143 144 padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft, "", "", 'paddingLeft'); 145 padding.right = jQuery(elem).Get_Val_int(Css.paddingRight, "", "", 'paddingRight'); 146 padding.top = jQuery(elem).Get_Val_int(Css.paddingTop, "", "", 'paddingTop'); 147 padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom, "", "", 'paddingBottom'); 147 148 try { 148 149 padding.padding = Css.padding; … … 246 247 */ 247 248 248 Get_Val_int: function (myObj, Maxi_val, Mini_val ) {249 Get_Val_int: function (myObj, Maxi_val, Mini_val, prop) { 249 250 var val = 0; 250 251 … … 264 265 265 266 if (typeof (myObj) == "string") { 266 if (myObj == "none") return Maxi_val; 267 switch (myObj) { 268 case 'thin': 269 return 1; 270 break; 271 case 'medium': 272 return 2; 273 break; 274 case 'thick': 275 return 4; 276 break; 277 case 'inherit': 278 break; 279 case 'none': 280 return Maxi_val; 281 break; 282 default: 283 break; 284 } 285 el = this.get(0); 267 286 var reg1 = new RegExp("auto", "g") 268 287 if (myObj.match(reg1)) { 269 288 return Maxi_val; 270 289 } 271 reg1 = new RegExp("px", "g") 272 if (myObj.match(reg1)) { 273 274 myObj = parseInt(myObj); 275 276 } 290 if (prop) 291 myObj = num(el, prop); 277 292 else { 278 reg1 = new RegExp(" %", "g")293 reg1 = new RegExp("px", "g") 279 294 if (myObj.match(reg1)) { 280 val = Math.ceil(myObj * Maxi_val / 100); 281 return val; 282 } 295 296 myObj = parseInt(myObj); 297 298 } else { 299 reg1 = new RegExp("%", "g") 300 if (myObj.match(reg1)) { 301 val = Math.ceil(myObj * Maxi_val / 100); 302 return val; 303 } 304 305 } 306 283 307 } 284 308 285 309 if (Mini_val) 286 310 if (myObj < Mini_val) return Maxi_val; 287 288 switch (myObj) {289 case 'thin':290 return 1;291 break;292 case 'medium':293 return 2;294 break;295 case 'thick':296 return 4;297 break;298 case 'inherit':299 break;300 default:301 break;302 }303 304 311 305 312 -
extensions/cl_conflit/main.inc.php
r8629 r8740 2 2 /* 3 3 Plugin Name: cl_conflit 4 Version: 1.0. 74 Version: 1.0.8 5 5 Description: gestion des conflits entre jQuery et les autres librairies 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=474
Note: See TracChangeset
for help on using the changeset viewer.