aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-11-01 12:44:50 +0200
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-11-01 11:08:17 +0000
commit8ac6a7ef3809cb511b10494d9c1f4654db1e071e (patch)
treef9d7b80d863f4451ad2359c469366f7170475a4b /3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js
parentc53c8c2b31b6734765f0f5638a8bb0e3bf3cff9b (diff)
Dynamically fetching javascript dependencies
JIRA: DOVETAIL-746 This patch deletes the source code of javascript dependencies from web portal. Furthermore, it uses npm to install them. Change-Id: Idc40606ff9e7286aa66421cbbe05f94d7ce9f7e6 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to '3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js')
-rw-r--r--3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js105
1 files changed, 0 insertions, 105 deletions
diff --git a/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js b/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js
deleted file mode 100644
index 3eeafef..0000000
--- a/3rd_party/static/testapi-ui/assets/lib/jquery/src/css/showHide.js
+++ /dev/null
@@ -1,105 +0,0 @@
-define( [
- "../core",
- "../data/var/dataPriv",
- "../css/var/isHiddenWithinTree"
-], function( jQuery, dataPriv, isHiddenWithinTree ) {
-
-"use strict";
-
-var defaultDisplayMap = {};
-
-function getDefaultDisplay( elem ) {
- var temp,
- doc = elem.ownerDocument,
- nodeName = elem.nodeName,
- display = defaultDisplayMap[ nodeName ];
-
- if ( display ) {
- return display;
- }
-
- temp = doc.body.appendChild( doc.createElement( nodeName ) );
- display = jQuery.css( temp, "display" );
-
- temp.parentNode.removeChild( temp );
-
- if ( display === "none" ) {
- display = "block";
- }
- defaultDisplayMap[ nodeName ] = display;
-
- return display;
-}
-
-function showHide( elements, show ) {
- var display, elem,
- values = [],
- index = 0,
- length = elements.length;
-
- // Determine new display value for elements that need to change
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- display = elem.style.display;
- if ( show ) {
-
- // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
- // check is required in this first loop unless we have a nonempty display value (either
- // inline or about-to-be-restored)
- if ( display === "none" ) {
- values[ index ] = dataPriv.get( elem, "display" ) || null;
- if ( !values[ index ] ) {
- elem.style.display = "";
- }
- }
- if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
- values[ index ] = getDefaultDisplay( elem );
- }
- } else {
- if ( display !== "none" ) {
- values[ index ] = "none";
-
- // Remember what we're overwriting
- dataPriv.set( elem, "display", display );
- }
- }
- }
-
- // Set the display of the elements in a second loop to avoid constant reflow
- for ( index = 0; index < length; index++ ) {
- if ( values[ index ] != null ) {
- elements[ index ].style.display = values[ index ];
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend( {
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each( function() {
- if ( isHiddenWithinTree( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- } );
- }
-} );
-
-return showHide;
-} );