@bingads-webui-campaign/accounts-grid 0.0.1-security → 13.6.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @bingads-webui-campaign/accounts-grid might be problematic. Click here for more details.
- package/AUTHORS.txt +337 -0
- package/LICENSE.txt +20 -0
- package/README.md +58 -3
- package/bower.json +14 -0
- package/dist/jquery.js +10996 -0
- package/dist/jquery.min.js +2 -0
- package/dist/jquery.min.map +1 -0
- package/dist/jquery.slim.js +8894 -0
- package/dist/jquery.slim.min.js +2 -0
- package/dist/jquery.slim.min.map +1 -0
- package/external/sizzle/LICENSE.txt +36 -0
- package/external/sizzle/dist/sizzle.js +2542 -0
- package/external/sizzle/dist/sizzle.min.js +3 -0
- package/external/sizzle/dist/sizzle.min.map +1 -0
- package/package.json +139 -3
- package/src/ajax/jsonp.js +103 -0
- package/src/ajax/load.js +77 -0
- package/src/ajax/script.js +74 -0
- package/src/ajax/var/location.js +5 -0
- package/src/ajax/var/nonce.js +5 -0
- package/src/ajax/var/rquery.js +5 -0
- package/src/ajax/xhr.js +170 -0
- package/src/ajax.js +876 -0
- package/src/attributes/attr.js +141 -0
- package/src/attributes/classes.js +184 -0
- package/src/attributes/prop.js +142 -0
- package/src/attributes/support.js +33 -0
- package/src/attributes/val.js +191 -0
- package/src/attributes.js +13 -0
- package/src/callbacks.js +236 -0
- package/src/core/DOMEval.js +43 -0
- package/src/core/access.js +72 -0
- package/src/core/camelCase.js +23 -0
- package/src/core/init.js +129 -0
- package/src/core/isAttached.js +26 -0
- package/src/core/nodeName.js +13 -0
- package/src/core/parseHTML.js +65 -0
- package/src/core/parseXML.js +35 -0
- package/src/core/ready-no-deferred.js +97 -0
- package/src/core/ready.js +86 -0
- package/src/core/readyException.js +13 -0
- package/src/core/stripAndCollapse.js +14 -0
- package/src/core/support.js +20 -0
- package/src/core/toType.js +20 -0
- package/src/core/var/rsingleTag.js +7 -0
- package/src/core.js +400 -0
- package/src/css/addGetHookIf.js +26 -0
- package/src/css/adjustCSS.js +74 -0
- package/src/css/curCSS.js +100 -0
- package/src/css/finalPropName.js +42 -0
- package/src/css/hiddenVisibleSelectors.js +15 -0
- package/src/css/showHide.js +105 -0
- package/src/css/support.js +152 -0
- package/src/css/var/cssExpand.js +5 -0
- package/src/css/var/getStyles.js +17 -0
- package/src/css/var/isHiddenWithinTree.js +34 -0
- package/src/css/var/rboxStyle.js +7 -0
- package/src/css/var/rcustomProp.js +7 -0
- package/src/css/var/rnumnonpx.js +7 -0
- package/src/css/var/swap.js +26 -0
- package/src/css.js +495 -0
- package/src/data/Data.js +162 -0
- package/src/data/var/acceptData.js +19 -0
- package/src/data/var/dataPriv.js +7 -0
- package/src/data/var/dataUser.js +7 -0
- package/src/data.js +180 -0
- package/src/deferred/exceptionHook.js +21 -0
- package/src/deferred.js +399 -0
- package/src/deprecated/ajax-event-alias.js +22 -0
- package/src/deprecated/event.js +50 -0
- package/src/deprecated.js +89 -0
- package/src/dimensions.js +60 -0
- package/src/effects/Tween.js +125 -0
- package/src/effects/animatedSelector.js +15 -0
- package/src/effects.js +702 -0
- package/src/event/focusin.js +58 -0
- package/src/event/support.js +11 -0
- package/src/event/trigger.js +199 -0
- package/src/event.js +874 -0
- package/src/exports/amd.js +26 -0
- package/src/exports/global.js +34 -0
- package/src/jquery.js +41 -0
- package/src/manipulation/_evalUrl.js +32 -0
- package/src/manipulation/buildFragment.js +106 -0
- package/src/manipulation/getAll.js +32 -0
- package/src/manipulation/setGlobalEval.js +22 -0
- package/src/manipulation/support.js +41 -0
- package/src/manipulation/var/rscriptType.js +5 -0
- package/src/manipulation/var/rtagName.js +8 -0
- package/src/manipulation/wrapMap.js +30 -0
- package/src/manipulation.js +487 -0
- package/src/offset.js +232 -0
- package/src/queue/delay.js +23 -0
- package/src/queue.js +145 -0
- package/src/selector-native.js +240 -0
- package/src/selector-sizzle.js +19 -0
- package/src/selector.js +3 -0
- package/src/serialize.js +134 -0
- package/src/traversing/findFilter.js +97 -0
- package/src/traversing/var/dir.js +22 -0
- package/src/traversing/var/rneedsContext.js +8 -0
- package/src/traversing/var/siblings.js +17 -0
- package/src/traversing.js +198 -0
- package/src/var/ObjectFunctionString.js +7 -0
- package/src/var/arr.js +5 -0
- package/src/var/class2type.js +6 -0
- package/src/var/document.js +5 -0
- package/src/var/documentElement.js +7 -0
- package/src/var/flat.js +16 -0
- package/src/var/fnToString.js +7 -0
- package/src/var/getProto.js +5 -0
- package/src/var/hasOwn.js +7 -0
- package/src/var/indexOf.js +7 -0
- package/src/var/isFunction.js +17 -0
- package/src/var/isWindow.js +8 -0
- package/src/var/pnum.js +5 -0
- package/src/var/push.js +7 -0
- package/src/var/rcheckableType.js +5 -0
- package/src/var/rcssNum.js +9 -0
- package/src/var/rnothtmlwhite.js +8 -0
- package/src/var/rtrimCSS.js +12 -0
- package/src/var/slice.js +7 -0
- package/src/var/support.js +6 -0
- package/src/var/toString.js +7 -0
- package/src/var/whitespace.js +8 -0
- package/src/wrap.js +78 -0
@@ -0,0 +1,141 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../core/access",
|
4
|
+
"../core/nodeName",
|
5
|
+
"./support",
|
6
|
+
"../var/rnothtmlwhite",
|
7
|
+
"../selector"
|
8
|
+
], function( jQuery, access, nodeName, support, rnothtmlwhite ) {
|
9
|
+
|
10
|
+
"use strict";
|
11
|
+
|
12
|
+
var boolHook,
|
13
|
+
attrHandle = jQuery.expr.attrHandle;
|
14
|
+
|
15
|
+
jQuery.fn.extend( {
|
16
|
+
attr: function( name, value ) {
|
17
|
+
return access( this, jQuery.attr, name, value, arguments.length > 1 );
|
18
|
+
},
|
19
|
+
|
20
|
+
removeAttr: function( name ) {
|
21
|
+
return this.each( function() {
|
22
|
+
jQuery.removeAttr( this, name );
|
23
|
+
} );
|
24
|
+
}
|
25
|
+
} );
|
26
|
+
|
27
|
+
jQuery.extend( {
|
28
|
+
attr: function( elem, name, value ) {
|
29
|
+
var ret, hooks,
|
30
|
+
nType = elem.nodeType;
|
31
|
+
|
32
|
+
// Don't get/set attributes on text, comment and attribute nodes
|
33
|
+
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
|
37
|
+
// Fallback to prop when attributes are not supported
|
38
|
+
if ( typeof elem.getAttribute === "undefined" ) {
|
39
|
+
return jQuery.prop( elem, name, value );
|
40
|
+
}
|
41
|
+
|
42
|
+
// Attribute hooks are determined by the lowercase version
|
43
|
+
// Grab necessary hook if one is defined
|
44
|
+
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
45
|
+
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
46
|
+
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
47
|
+
}
|
48
|
+
|
49
|
+
if ( value !== undefined ) {
|
50
|
+
if ( value === null ) {
|
51
|
+
jQuery.removeAttr( elem, name );
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
|
55
|
+
if ( hooks && "set" in hooks &&
|
56
|
+
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
57
|
+
return ret;
|
58
|
+
}
|
59
|
+
|
60
|
+
elem.setAttribute( name, value + "" );
|
61
|
+
return value;
|
62
|
+
}
|
63
|
+
|
64
|
+
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
65
|
+
return ret;
|
66
|
+
}
|
67
|
+
|
68
|
+
ret = jQuery.find.attr( elem, name );
|
69
|
+
|
70
|
+
// Non-existent attributes return null, we normalize to undefined
|
71
|
+
return ret == null ? undefined : ret;
|
72
|
+
},
|
73
|
+
|
74
|
+
attrHooks: {
|
75
|
+
type: {
|
76
|
+
set: function( elem, value ) {
|
77
|
+
if ( !support.radioValue && value === "radio" &&
|
78
|
+
nodeName( elem, "input" ) ) {
|
79
|
+
var val = elem.value;
|
80
|
+
elem.setAttribute( "type", value );
|
81
|
+
if ( val ) {
|
82
|
+
elem.value = val;
|
83
|
+
}
|
84
|
+
return value;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
},
|
89
|
+
|
90
|
+
removeAttr: function( elem, value ) {
|
91
|
+
var name,
|
92
|
+
i = 0,
|
93
|
+
|
94
|
+
// Attribute names can contain non-HTML whitespace characters
|
95
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
96
|
+
attrNames = value && value.match( rnothtmlwhite );
|
97
|
+
|
98
|
+
if ( attrNames && elem.nodeType === 1 ) {
|
99
|
+
while ( ( name = attrNames[ i++ ] ) ) {
|
100
|
+
elem.removeAttribute( name );
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
} );
|
105
|
+
|
106
|
+
// Hooks for boolean attributes
|
107
|
+
boolHook = {
|
108
|
+
set: function( elem, value, name ) {
|
109
|
+
if ( value === false ) {
|
110
|
+
|
111
|
+
// Remove boolean attributes when set to false
|
112
|
+
jQuery.removeAttr( elem, name );
|
113
|
+
} else {
|
114
|
+
elem.setAttribute( name, name );
|
115
|
+
}
|
116
|
+
return name;
|
117
|
+
}
|
118
|
+
};
|
119
|
+
|
120
|
+
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
|
121
|
+
var getter = attrHandle[ name ] || jQuery.find.attr;
|
122
|
+
|
123
|
+
attrHandle[ name ] = function( elem, name, isXML ) {
|
124
|
+
var ret, handle,
|
125
|
+
lowercaseName = name.toLowerCase();
|
126
|
+
|
127
|
+
if ( !isXML ) {
|
128
|
+
|
129
|
+
// Avoid an infinite loop by temporarily removing this function from the getter
|
130
|
+
handle = attrHandle[ lowercaseName ];
|
131
|
+
attrHandle[ lowercaseName ] = ret;
|
132
|
+
ret = getter( elem, name, isXML ) != null ?
|
133
|
+
lowercaseName :
|
134
|
+
null;
|
135
|
+
attrHandle[ lowercaseName ] = handle;
|
136
|
+
}
|
137
|
+
return ret;
|
138
|
+
};
|
139
|
+
} );
|
140
|
+
|
141
|
+
} );
|
@@ -0,0 +1,184 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../core/stripAndCollapse",
|
4
|
+
"../var/isFunction",
|
5
|
+
"../var/rnothtmlwhite",
|
6
|
+
"../data/var/dataPriv",
|
7
|
+
"../core/init"
|
8
|
+
], function( jQuery, stripAndCollapse, isFunction, rnothtmlwhite, dataPriv ) {
|
9
|
+
|
10
|
+
"use strict";
|
11
|
+
|
12
|
+
function getClass( elem ) {
|
13
|
+
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
14
|
+
}
|
15
|
+
|
16
|
+
function classesToArray( value ) {
|
17
|
+
if ( Array.isArray( value ) ) {
|
18
|
+
return value;
|
19
|
+
}
|
20
|
+
if ( typeof value === "string" ) {
|
21
|
+
return value.match( rnothtmlwhite ) || [];
|
22
|
+
}
|
23
|
+
return [];
|
24
|
+
}
|
25
|
+
|
26
|
+
jQuery.fn.extend( {
|
27
|
+
addClass: function( value ) {
|
28
|
+
var classNames, cur, curValue, className, i, finalValue;
|
29
|
+
|
30
|
+
if ( isFunction( value ) ) {
|
31
|
+
return this.each( function( j ) {
|
32
|
+
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
33
|
+
} );
|
34
|
+
}
|
35
|
+
|
36
|
+
classNames = classesToArray( value );
|
37
|
+
|
38
|
+
if ( classNames.length ) {
|
39
|
+
return this.each( function() {
|
40
|
+
curValue = getClass( this );
|
41
|
+
cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
42
|
+
|
43
|
+
if ( cur ) {
|
44
|
+
for ( i = 0; i < classNames.length; i++ ) {
|
45
|
+
className = classNames[ i ];
|
46
|
+
if ( cur.indexOf( " " + className + " " ) < 0 ) {
|
47
|
+
cur += className + " ";
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
// Only assign if different to avoid unneeded rendering.
|
52
|
+
finalValue = stripAndCollapse( cur );
|
53
|
+
if ( curValue !== finalValue ) {
|
54
|
+
this.setAttribute( "class", finalValue );
|
55
|
+
}
|
56
|
+
}
|
57
|
+
} );
|
58
|
+
}
|
59
|
+
|
60
|
+
return this;
|
61
|
+
},
|
62
|
+
|
63
|
+
removeClass: function( value ) {
|
64
|
+
var classNames, cur, curValue, className, i, finalValue;
|
65
|
+
|
66
|
+
if ( isFunction( value ) ) {
|
67
|
+
return this.each( function( j ) {
|
68
|
+
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
69
|
+
} );
|
70
|
+
}
|
71
|
+
|
72
|
+
if ( !arguments.length ) {
|
73
|
+
return this.attr( "class", "" );
|
74
|
+
}
|
75
|
+
|
76
|
+
classNames = classesToArray( value );
|
77
|
+
|
78
|
+
if ( classNames.length ) {
|
79
|
+
return this.each( function() {
|
80
|
+
curValue = getClass( this );
|
81
|
+
|
82
|
+
// This expression is here for better compressibility (see addClass)
|
83
|
+
cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
84
|
+
|
85
|
+
if ( cur ) {
|
86
|
+
for ( i = 0; i < classNames.length; i++ ) {
|
87
|
+
className = classNames[ i ];
|
88
|
+
|
89
|
+
// Remove *all* instances
|
90
|
+
while ( cur.indexOf( " " + className + " " ) > -1 ) {
|
91
|
+
cur = cur.replace( " " + className + " ", " " );
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
// Only assign if different to avoid unneeded rendering.
|
96
|
+
finalValue = stripAndCollapse( cur );
|
97
|
+
if ( curValue !== finalValue ) {
|
98
|
+
this.setAttribute( "class", finalValue );
|
99
|
+
}
|
100
|
+
}
|
101
|
+
} );
|
102
|
+
}
|
103
|
+
|
104
|
+
return this;
|
105
|
+
},
|
106
|
+
|
107
|
+
toggleClass: function( value, stateVal ) {
|
108
|
+
var classNames, className, i, self,
|
109
|
+
type = typeof value,
|
110
|
+
isValidValue = type === "string" || Array.isArray( value );
|
111
|
+
|
112
|
+
if ( isFunction( value ) ) {
|
113
|
+
return this.each( function( i ) {
|
114
|
+
jQuery( this ).toggleClass(
|
115
|
+
value.call( this, i, getClass( this ), stateVal ),
|
116
|
+
stateVal
|
117
|
+
);
|
118
|
+
} );
|
119
|
+
}
|
120
|
+
|
121
|
+
if ( typeof stateVal === "boolean" && isValidValue ) {
|
122
|
+
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
123
|
+
}
|
124
|
+
|
125
|
+
classNames = classesToArray( value );
|
126
|
+
|
127
|
+
return this.each( function() {
|
128
|
+
if ( isValidValue ) {
|
129
|
+
|
130
|
+
// Toggle individual class names
|
131
|
+
self = jQuery( this );
|
132
|
+
|
133
|
+
for ( i = 0; i < classNames.length; i++ ) {
|
134
|
+
className = classNames[ i ];
|
135
|
+
|
136
|
+
// Check each className given, space separated list
|
137
|
+
if ( self.hasClass( className ) ) {
|
138
|
+
self.removeClass( className );
|
139
|
+
} else {
|
140
|
+
self.addClass( className );
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// Toggle whole class name
|
145
|
+
} else if ( value === undefined || type === "boolean" ) {
|
146
|
+
className = getClass( this );
|
147
|
+
if ( className ) {
|
148
|
+
|
149
|
+
// Store className if set
|
150
|
+
dataPriv.set( this, "__className__", className );
|
151
|
+
}
|
152
|
+
|
153
|
+
// If the element has a class name or if we're passed `false`,
|
154
|
+
// then remove the whole classname (if there was one, the above saved it).
|
155
|
+
// Otherwise bring back whatever was previously saved (if anything),
|
156
|
+
// falling back to the empty string if nothing was stored.
|
157
|
+
if ( this.setAttribute ) {
|
158
|
+
this.setAttribute( "class",
|
159
|
+
className || value === false ?
|
160
|
+
"" :
|
161
|
+
dataPriv.get( this, "__className__" ) || ""
|
162
|
+
);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
} );
|
166
|
+
},
|
167
|
+
|
168
|
+
hasClass: function( selector ) {
|
169
|
+
var className, elem,
|
170
|
+
i = 0;
|
171
|
+
|
172
|
+
className = " " + selector + " ";
|
173
|
+
while ( ( elem = this[ i++ ] ) ) {
|
174
|
+
if ( elem.nodeType === 1 &&
|
175
|
+
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
176
|
+
return true;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
return false;
|
181
|
+
}
|
182
|
+
} );
|
183
|
+
|
184
|
+
} );
|
@@ -0,0 +1,142 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../core/access",
|
4
|
+
"./support",
|
5
|
+
"../selector"
|
6
|
+
], function( jQuery, access, support ) {
|
7
|
+
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
var rfocusable = /^(?:input|select|textarea|button)$/i,
|
11
|
+
rclickable = /^(?:a|area)$/i;
|
12
|
+
|
13
|
+
jQuery.fn.extend( {
|
14
|
+
prop: function( name, value ) {
|
15
|
+
return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
16
|
+
},
|
17
|
+
|
18
|
+
removeProp: function( name ) {
|
19
|
+
return this.each( function() {
|
20
|
+
delete this[ jQuery.propFix[ name ] || name ];
|
21
|
+
} );
|
22
|
+
}
|
23
|
+
} );
|
24
|
+
|
25
|
+
jQuery.extend( {
|
26
|
+
prop: function( elem, name, value ) {
|
27
|
+
var ret, hooks,
|
28
|
+
nType = elem.nodeType;
|
29
|
+
|
30
|
+
// Don't get/set properties on text, comment and attribute nodes
|
31
|
+
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
|
35
|
+
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
36
|
+
|
37
|
+
// Fix name and attach hooks
|
38
|
+
name = jQuery.propFix[ name ] || name;
|
39
|
+
hooks = jQuery.propHooks[ name ];
|
40
|
+
}
|
41
|
+
|
42
|
+
if ( value !== undefined ) {
|
43
|
+
if ( hooks && "set" in hooks &&
|
44
|
+
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
45
|
+
return ret;
|
46
|
+
}
|
47
|
+
|
48
|
+
return ( elem[ name ] = value );
|
49
|
+
}
|
50
|
+
|
51
|
+
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
52
|
+
return ret;
|
53
|
+
}
|
54
|
+
|
55
|
+
return elem[ name ];
|
56
|
+
},
|
57
|
+
|
58
|
+
propHooks: {
|
59
|
+
tabIndex: {
|
60
|
+
get: function( elem ) {
|
61
|
+
|
62
|
+
// Support: IE <=9 - 11 only
|
63
|
+
// elem.tabIndex doesn't always return the
|
64
|
+
// correct value when it hasn't been explicitly set
|
65
|
+
// Use proper attribute retrieval (trac-12072)
|
66
|
+
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
67
|
+
|
68
|
+
if ( tabindex ) {
|
69
|
+
return parseInt( tabindex, 10 );
|
70
|
+
}
|
71
|
+
|
72
|
+
if (
|
73
|
+
rfocusable.test( elem.nodeName ) ||
|
74
|
+
rclickable.test( elem.nodeName ) &&
|
75
|
+
elem.href
|
76
|
+
) {
|
77
|
+
return 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
return -1;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
},
|
84
|
+
|
85
|
+
propFix: {
|
86
|
+
"for": "htmlFor",
|
87
|
+
"class": "className"
|
88
|
+
}
|
89
|
+
} );
|
90
|
+
|
91
|
+
// Support: IE <=11 only
|
92
|
+
// Accessing the selectedIndex property
|
93
|
+
// forces the browser to respect setting selected
|
94
|
+
// on the option
|
95
|
+
// The getter ensures a default option is selected
|
96
|
+
// when in an optgroup
|
97
|
+
// eslint rule "no-unused-expressions" is disabled for this code
|
98
|
+
// since it considers such accessions noop
|
99
|
+
if ( !support.optSelected ) {
|
100
|
+
jQuery.propHooks.selected = {
|
101
|
+
get: function( elem ) {
|
102
|
+
|
103
|
+
/* eslint no-unused-expressions: "off" */
|
104
|
+
|
105
|
+
var parent = elem.parentNode;
|
106
|
+
if ( parent && parent.parentNode ) {
|
107
|
+
parent.parentNode.selectedIndex;
|
108
|
+
}
|
109
|
+
return null;
|
110
|
+
},
|
111
|
+
set: function( elem ) {
|
112
|
+
|
113
|
+
/* eslint no-unused-expressions: "off" */
|
114
|
+
|
115
|
+
var parent = elem.parentNode;
|
116
|
+
if ( parent ) {
|
117
|
+
parent.selectedIndex;
|
118
|
+
|
119
|
+
if ( parent.parentNode ) {
|
120
|
+
parent.parentNode.selectedIndex;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
};
|
125
|
+
}
|
126
|
+
|
127
|
+
jQuery.each( [
|
128
|
+
"tabIndex",
|
129
|
+
"readOnly",
|
130
|
+
"maxLength",
|
131
|
+
"cellSpacing",
|
132
|
+
"cellPadding",
|
133
|
+
"rowSpan",
|
134
|
+
"colSpan",
|
135
|
+
"useMap",
|
136
|
+
"frameBorder",
|
137
|
+
"contentEditable"
|
138
|
+
], function() {
|
139
|
+
jQuery.propFix[ this.toLowerCase() ] = this;
|
140
|
+
} );
|
141
|
+
|
142
|
+
} );
|
@@ -0,0 +1,33 @@
|
|
1
|
+
define( [
|
2
|
+
"../var/document",
|
3
|
+
"../var/support"
|
4
|
+
], function( document, support ) {
|
5
|
+
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
( function() {
|
9
|
+
var input = document.createElement( "input" ),
|
10
|
+
select = document.createElement( "select" ),
|
11
|
+
opt = select.appendChild( document.createElement( "option" ) );
|
12
|
+
|
13
|
+
input.type = "checkbox";
|
14
|
+
|
15
|
+
// Support: Android <=4.3 only
|
16
|
+
// Default value for a checkbox should be "on"
|
17
|
+
support.checkOn = input.value !== "";
|
18
|
+
|
19
|
+
// Support: IE <=11 only
|
20
|
+
// Must access selectedIndex to make default options select
|
21
|
+
support.optSelected = opt.selected;
|
22
|
+
|
23
|
+
// Support: IE <=11 only
|
24
|
+
// An input loses its value after becoming a radio
|
25
|
+
input = document.createElement( "input" );
|
26
|
+
input.value = "t";
|
27
|
+
input.type = "radio";
|
28
|
+
support.radioValue = input.value === "t";
|
29
|
+
} )();
|
30
|
+
|
31
|
+
return support;
|
32
|
+
|
33
|
+
} );
|
@@ -0,0 +1,191 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../core/stripAndCollapse",
|
4
|
+
"./support",
|
5
|
+
"../core/nodeName",
|
6
|
+
"../var/isFunction",
|
7
|
+
|
8
|
+
"../core/init"
|
9
|
+
], function( jQuery, stripAndCollapse, support, nodeName, isFunction ) {
|
10
|
+
|
11
|
+
"use strict";
|
12
|
+
|
13
|
+
var rreturn = /\r/g;
|
14
|
+
|
15
|
+
jQuery.fn.extend( {
|
16
|
+
val: function( value ) {
|
17
|
+
var hooks, ret, valueIsFunction,
|
18
|
+
elem = this[ 0 ];
|
19
|
+
|
20
|
+
if ( !arguments.length ) {
|
21
|
+
if ( elem ) {
|
22
|
+
hooks = jQuery.valHooks[ elem.type ] ||
|
23
|
+
jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
24
|
+
|
25
|
+
if ( hooks &&
|
26
|
+
"get" in hooks &&
|
27
|
+
( ret = hooks.get( elem, "value" ) ) !== undefined
|
28
|
+
) {
|
29
|
+
return ret;
|
30
|
+
}
|
31
|
+
|
32
|
+
ret = elem.value;
|
33
|
+
|
34
|
+
// Handle most common string cases
|
35
|
+
if ( typeof ret === "string" ) {
|
36
|
+
return ret.replace( rreturn, "" );
|
37
|
+
}
|
38
|
+
|
39
|
+
// Handle cases where value is null/undef or number
|
40
|
+
return ret == null ? "" : ret;
|
41
|
+
}
|
42
|
+
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
|
46
|
+
valueIsFunction = isFunction( value );
|
47
|
+
|
48
|
+
return this.each( function( i ) {
|
49
|
+
var val;
|
50
|
+
|
51
|
+
if ( this.nodeType !== 1 ) {
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
|
55
|
+
if ( valueIsFunction ) {
|
56
|
+
val = value.call( this, i, jQuery( this ).val() );
|
57
|
+
} else {
|
58
|
+
val = value;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Treat null/undefined as ""; convert numbers to string
|
62
|
+
if ( val == null ) {
|
63
|
+
val = "";
|
64
|
+
|
65
|
+
} else if ( typeof val === "number" ) {
|
66
|
+
val += "";
|
67
|
+
|
68
|
+
} else if ( Array.isArray( val ) ) {
|
69
|
+
val = jQuery.map( val, function( value ) {
|
70
|
+
return value == null ? "" : value + "";
|
71
|
+
} );
|
72
|
+
}
|
73
|
+
|
74
|
+
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
|
75
|
+
|
76
|
+
// If set returns undefined, fall back to normal setting
|
77
|
+
if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
|
78
|
+
this.value = val;
|
79
|
+
}
|
80
|
+
} );
|
81
|
+
}
|
82
|
+
} );
|
83
|
+
|
84
|
+
jQuery.extend( {
|
85
|
+
valHooks: {
|
86
|
+
option: {
|
87
|
+
get: function( elem ) {
|
88
|
+
|
89
|
+
var val = jQuery.find.attr( elem, "value" );
|
90
|
+
return val != null ?
|
91
|
+
val :
|
92
|
+
|
93
|
+
// Support: IE <=10 - 11 only
|
94
|
+
// option.text throws exceptions (trac-14686, trac-14858)
|
95
|
+
// Strip and collapse whitespace
|
96
|
+
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
97
|
+
stripAndCollapse( jQuery.text( elem ) );
|
98
|
+
}
|
99
|
+
},
|
100
|
+
select: {
|
101
|
+
get: function( elem ) {
|
102
|
+
var value, option, i,
|
103
|
+
options = elem.options,
|
104
|
+
index = elem.selectedIndex,
|
105
|
+
one = elem.type === "select-one",
|
106
|
+
values = one ? null : [],
|
107
|
+
max = one ? index + 1 : options.length;
|
108
|
+
|
109
|
+
if ( index < 0 ) {
|
110
|
+
i = max;
|
111
|
+
|
112
|
+
} else {
|
113
|
+
i = one ? index : 0;
|
114
|
+
}
|
115
|
+
|
116
|
+
// Loop through all the selected options
|
117
|
+
for ( ; i < max; i++ ) {
|
118
|
+
option = options[ i ];
|
119
|
+
|
120
|
+
// Support: IE <=9 only
|
121
|
+
// IE8-9 doesn't update selected after form reset (trac-2551)
|
122
|
+
if ( ( option.selected || i === index ) &&
|
123
|
+
|
124
|
+
// Don't return options that are disabled or in a disabled optgroup
|
125
|
+
!option.disabled &&
|
126
|
+
( !option.parentNode.disabled ||
|
127
|
+
!nodeName( option.parentNode, "optgroup" ) ) ) {
|
128
|
+
|
129
|
+
// Get the specific value for the option
|
130
|
+
value = jQuery( option ).val();
|
131
|
+
|
132
|
+
// We don't need an array for one selects
|
133
|
+
if ( one ) {
|
134
|
+
return value;
|
135
|
+
}
|
136
|
+
|
137
|
+
// Multi-Selects return an array
|
138
|
+
values.push( value );
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
return values;
|
143
|
+
},
|
144
|
+
|
145
|
+
set: function( elem, value ) {
|
146
|
+
var optionSet, option,
|
147
|
+
options = elem.options,
|
148
|
+
values = jQuery.makeArray( value ),
|
149
|
+
i = options.length;
|
150
|
+
|
151
|
+
while ( i-- ) {
|
152
|
+
option = options[ i ];
|
153
|
+
|
154
|
+
/* eslint-disable no-cond-assign */
|
155
|
+
|
156
|
+
if ( option.selected =
|
157
|
+
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
158
|
+
) {
|
159
|
+
optionSet = true;
|
160
|
+
}
|
161
|
+
|
162
|
+
/* eslint-enable no-cond-assign */
|
163
|
+
}
|
164
|
+
|
165
|
+
// Force browsers to behave consistently when non-matching value is set
|
166
|
+
if ( !optionSet ) {
|
167
|
+
elem.selectedIndex = -1;
|
168
|
+
}
|
169
|
+
return values;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
} );
|
174
|
+
|
175
|
+
// Radios and checkboxes getter/setter
|
176
|
+
jQuery.each( [ "radio", "checkbox" ], function() {
|
177
|
+
jQuery.valHooks[ this ] = {
|
178
|
+
set: function( elem, value ) {
|
179
|
+
if ( Array.isArray( value ) ) {
|
180
|
+
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
181
|
+
}
|
182
|
+
}
|
183
|
+
};
|
184
|
+
if ( !support.checkOn ) {
|
185
|
+
jQuery.valHooks[ this ].get = function( elem ) {
|
186
|
+
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
|
187
|
+
};
|
188
|
+
}
|
189
|
+
} );
|
190
|
+
|
191
|
+
} );
|