aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jquery/src/traversing
diff options
context:
space:
mode:
authorJesús Eduardo <heckyel@hyperbola.info>2017-12-25 16:58:41 -0500
committerJesús Eduardo <heckyel@hyperbola.info>2017-12-25 16:58:41 -0500
commit49d54c0c3199fb8e380ce68f8fb08a308ddf56a7 (patch)
tree87e9be319452d75241476853a3b240aabdcbd7e2 /lib/jquery/src/traversing
parent6a844225b3b63b89926e136cf65c140df01a4677 (diff)
downloadytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.tar.lz
ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.tar.xz
ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.zip
migración mayor a smarty PHP
Diffstat (limited to 'lib/jquery/src/traversing')
-rw-r--r--lib/jquery/src/traversing/findFilter.js106
-rw-r--r--lib/jquery/src/traversing/var/dir.js22
-rw-r--r--lib/jquery/src/traversing/var/rneedsContext.js8
-rw-r--r--lib/jquery/src/traversing/var/siblings.js17
4 files changed, 0 insertions, 153 deletions
diff --git a/lib/jquery/src/traversing/findFilter.js b/lib/jquery/src/traversing/findFilter.js
deleted file mode 100644
index 3bd036a..0000000
--- a/lib/jquery/src/traversing/findFilter.js
+++ /dev/null
@@ -1,106 +0,0 @@
-define( [
- "../core",
- "../var/indexOf",
- "./var/rneedsContext",
- "../selector"
-], function( jQuery, indexOf, rneedsContext ) {
-
-"use strict";
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- return !!qualifier.call( elem, i, elem ) !== not;
- } );
- }
-
- // Single element
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- } );
- }
-
- // Arraylike of elements (jQuery, arguments, Array)
- if ( typeof qualifier !== "string" ) {
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
- } );
- }
-
- // Simple selector that can be filtered directly, removing non-Elements
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- // Complex selector, compare the two sets, removing non-Elements
- qualifier = jQuery.filter( qualifier, elements );
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
- } );
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- if ( elems.length === 1 && elem.nodeType === 1 ) {
- return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
- }
-
- return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- } ) );
-};
-
-jQuery.fn.extend( {
- find: function( selector ) {
- var i, ret,
- len = this.length,
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter( function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- } ) );
- }
-
- ret = this.pushStack( [] );
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- return len > 1 ? jQuery.uniqueSort( ret ) : ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow( this, selector || [], false ) );
- },
- not: function( selector ) {
- return this.pushStack( winnow( this, selector || [], true ) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-} );
-
-} );
diff --git a/lib/jquery/src/traversing/var/dir.js b/lib/jquery/src/traversing/var/dir.js
deleted file mode 100644
index 366a823..0000000
--- a/lib/jquery/src/traversing/var/dir.js
+++ /dev/null
@@ -1,22 +0,0 @@
-define( [
- "../../core"
-], function( jQuery ) {
-
-"use strict";
-
-return function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
-};
-
-} );
diff --git a/lib/jquery/src/traversing/var/rneedsContext.js b/lib/jquery/src/traversing/var/rneedsContext.js
deleted file mode 100644
index d0663ce..0000000
--- a/lib/jquery/src/traversing/var/rneedsContext.js
+++ /dev/null
@@ -1,8 +0,0 @@
-define( [
- "../../core",
- "../../selector"
-], function( jQuery ) {
- "use strict";
-
- return jQuery.expr.match.needsContext;
-} );
diff --git a/lib/jquery/src/traversing/var/siblings.js b/lib/jquery/src/traversing/var/siblings.js
deleted file mode 100644
index 952629d..0000000
--- a/lib/jquery/src/traversing/var/siblings.js
+++ /dev/null
@@ -1,17 +0,0 @@
-define( function() {
-
-"use strict";
-
-return function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
-};
-
-} );