$.curCSS not anymore exists in jquery 1.8

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1375991 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-08-22 11:17:05 +00:00
parent f2de03ac17
commit 714491fecf
1 changed files with 14 additions and 14 deletions

View File

@ -80,11 +80,11 @@ $.fn.extend({
var scrollParent; var scrollParent;
if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
scrollParent = this.parents().filter(function() { scrollParent = this.parents().filter(function() {
return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); return (/(relative|absolute|fixed)/).test($.css(this,'position',1)) && (/(auto|scroll)/).test($.css(this,'overflow',1)+$.css(this,'overflow-y',1)+$.css(this,'overflow-x',1));
}).eq(0); }).eq(0);
} else { } else {
scrollParent = this.parents().filter(function() { scrollParent = this.parents().filter(function() {
return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); return (/(auto|scroll)/).test($.css(this,'overflow',1)+$.css(this,'overflow-y',1)+$.css(this,'overflow-x',1));
}).eq(0); }).eq(0);
} }
@ -144,12 +144,12 @@ $.each( [ "Width", "Height" ], function( i, name ) {
function reduce( elem, size, border, margin ) { function reduce( elem, size, border, margin ) {
$.each( side, function() { $.each( side, function() {
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0; size -= parseFloat( $.css( elem, "padding" + this, true) ) || 0;
if ( border ) { if ( border ) {
size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0; size -= parseFloat( $.css( elem, "border" + this + "Width", true) ) || 0;
} }
if ( margin ) { if ( margin ) {
size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0; size -= parseFloat( $.css( elem, "margin" + this, true) ) || 0;
} }
}); });
return size; return size;
@ -200,7 +200,7 @@ function focusable( element, isTabIndexNotNaN ) {
function visible( element ) { function visible( element ) {
return !$( element ).parents().andSelf().filter(function() { return !$( element ).parents().andSelf().filter(function() {
return $.curCSS( this, "visibility" ) === "hidden" || return $.css( this, "visibility" ) === "hidden" ||
$.expr.filters.hidden( this ); $.expr.filters.hidden( this );
}).length; }).length;
} }
@ -4126,7 +4126,7 @@ function getColor(elem, attr) {
var color; var color;
do { do {
color = $.curCSS(elem, attr); color = $.css(elem, attr);
// Keep going until we find an element that has color, or we hit the body // Keep going until we find an element that has color, or we hit the body
if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") ) if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
@ -10089,12 +10089,12 @@ $.fn.position = function( options ) {
var elem = $( this ), var elem = $( this ),
elemWidth = elem.outerWidth(), elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(), elemHeight = elem.outerHeight(),
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0, marginLeft = parseInt( $.css( this, "marginLeft", true ) ) || 0,
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0, marginTop = parseInt( $.css( this, "marginTop", true ) ) || 0,
collisionWidth = elemWidth + marginLeft + collisionWidth = elemWidth + marginLeft +
( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ), ( parseInt( $.css( this, "marginRight", true ) ) || 0 ),
collisionHeight = elemHeight + marginTop + collisionHeight = elemHeight + marginTop +
( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ), ( parseInt( $.css( this, "marginBottom", true ) ) || 0 ),
position = $.extend( {}, basePosition ), position = $.extend( {}, basePosition ),
collisionPosition; collisionPosition;
@ -10207,13 +10207,13 @@ $.ui.position = {
if ( !$.offset.setOffset ) { if ( !$.offset.setOffset ) {
$.offset.setOffset = function( elem, options ) { $.offset.setOffset = function( elem, options ) {
// set position first, in-case top/left are set even on static elem // set position first, in-case top/left are set even on static elem
if ( /static/.test( $.curCSS( elem, "position" ) ) ) { if ( /static/.test( $.css( elem, "position" ) ) ) {
elem.style.position = "relative"; elem.style.position = "relative";
} }
var curElem = $( elem ), var curElem = $( elem ),
curOffset = curElem.offset(), curOffset = curElem.offset(),
curTop = parseInt( $.curCSS( elem, "top", true ), 10 ) || 0, curTop = parseInt( $.css( elem, "top", true ), 10 ) || 0,
curLeft = parseInt( $.curCSS( elem, "left", true ), 10) || 0, curLeft = parseInt( $.css( elem, "left", true ), 10) || 0,
props = { props = {
top: (options.top - curOffset.top) + curTop, top: (options.top - curOffset.top) + curTop,
left: (options.left - curOffset.left) + curLeft left: (options.left - curOffset.left) + curLeft