From 0cf6b232ac9cf128ee9183a27c08f4f74ab2e2e6 Mon Sep 17 00:00:00 2001 From: grakiss Date: Thu, 28 Sep 2017 03:47:54 -0400 Subject: add api&web services for cvp JIRA: DOVETAIL-512 add api&web services for cvp Change-Id: I9ef9525e980fe61dc3108035ef9a3ff8783b2697 Signed-off-by: grakiss --- .../testapi-ui/assets/lib/jquery/src/css/curCSS.js | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/curCSS.js (limited to 'cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/curCSS.js') diff --git a/cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/curCSS.js b/cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/curCSS.js new file mode 100644 index 00000000..01ccad3a --- /dev/null +++ b/cvp/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/curCSS.js @@ -0,0 +1,65 @@ +define( [ + "../core", + "./var/rnumnonpx", + "./var/rmargin", + "./var/getStyles", + "./support", + "../selector" // Get jQuery.contains +], function( jQuery, rnumnonpx, rmargin, getStyles, support ) { + +"use strict"; + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + +return curCSS; +} ); -- cgit 1.2.3-korg