From 91d04c64771832a0b8815ffbe1f0f9920320d94d Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 14 Feb 2017 19:41:00 -0500 Subject: Initial OpenECOMP policy/engine commit Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh --- .../libs/bower_components/jquery/src/wrap.js | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/wrap.js (limited to 'ecomp-sdk-app/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/wrap.js') diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/wrap.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/wrap.js new file mode 100644 index 000000000..4958251d2 --- /dev/null +++ b/ecomp-sdk-app/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/wrap.js @@ -0,0 +1,79 @@ +define([ + "./core", + "./core/init", + "./manipulation", // clone + "./traversing" // parent, contents +], function( jQuery ) { + +jQuery.fn.extend({ + wrapAll: function( html ) { + var wrap; + + if ( jQuery.isFunction( html ) ) { + return this.each(function( i ) { + jQuery( this ).wrapAll( html.call(this, i) ); + }); + } + + if ( this[ 0 ] ) { + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function( i ) { + jQuery( this ).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function( i ) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); + +return jQuery; +}); -- cgit 1.2.3-korg