trusty-cms 4.3.4 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/Gemfile.lock +25 -15
- data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
- data/app/controllers/admin/assets_controller.rb +5 -1
- data/app/models/asset.rb +39 -48
- data/app/models/asset_type.rb +6 -2
- data/app/views/admin/assets/edit.html.haml +5 -3
- data/config/database.yml +2 -2
- data/config/locales/en.yml +1 -0
- data/coverage/index.html +1 -1
- data/lib/trusty_cms/deprecation.rb +13 -0
- data/lib/trusty_cms.rb +1 -1
- data/node_modules/path-parse/index.js +17 -35
- data/node_modules/path-parse/package.json +1 -1
- data/node_modules/postcss/CHANGELOG.md +27 -0
- data/node_modules/postcss/README.md +21 -0
- data/node_modules/postcss/lib/at-rule.js +2 -4
- data/node_modules/postcss/lib/comment.js +2 -4
- data/node_modules/postcss/lib/container.js +27 -122
- data/node_modules/postcss/lib/css-syntax-error.js +5 -7
- data/node_modules/postcss/lib/declaration.js +2 -4
- data/node_modules/postcss/lib/input.js +3 -5
- data/node_modules/postcss/lib/lazy-result.js +10 -17
- data/node_modules/postcss/lib/map-generator.js +10 -17
- data/node_modules/postcss/lib/node.js +2 -4
- data/node_modules/postcss/lib/parser.js +2 -4
- data/node_modules/postcss/lib/postcss.d.ts +25 -19
- data/node_modules/postcss/lib/previous-map.js +17 -6
- data/node_modules/postcss/lib/processor.js +16 -15
- data/node_modules/postcss/lib/result.js +2 -4
- data/node_modules/postcss/lib/root.js +10 -17
- data/node_modules/postcss/lib/rule.js +2 -4
- data/node_modules/postcss/lib/stringifier.js +2 -4
- data/node_modules/postcss/lib/warning.js +2 -4
- data/node_modules/postcss/package.json +16 -12
- data/spec/dummy/log/test.log +542 -443
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
- data/trusty_cms.gemspec +2 -1
- data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
- metadata +31 -307
- data/config/initializers/interpolation.rb +0 -6
- data/node_modules/path-parse/test.js +0 -77
- data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
- data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
- data/node_modules/postcss/docs/api/index.html +0 -22716
- data/spec/dummy/log/development.log +0 -158
- data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
- data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
- data/spec/dummy/node_modules/jquery/README.md +0 -62
- data/spec/dummy/node_modules/jquery/bower.json +0 -14
- data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
- data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
- data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/spec/dummy/node_modules/jquery/package.json +0 -117
- data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
- data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
- data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
- data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
- data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
- data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
- data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
- data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
- data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
- data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
- data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
- data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
- data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
- data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
- data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
- data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
- data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
- data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
- data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
- data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
- data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
- data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
- data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
- data/spec/dummy/node_modules/jquery/src/core.js +0 -400
- data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
- data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
- data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
- data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
- data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
- data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
- data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
- data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
- data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css.js +0 -494
- data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
- data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
- data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data.js +0 -180
- data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
- data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
- data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
- data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
- data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
- data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
- data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
- data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
- data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
- data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
- data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
- data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
- data/spec/dummy/node_modules/jquery/src/event.js +0 -892
- data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
- data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
- data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
- data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
- data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
- data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
- data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
- data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
- data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
- data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
- data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
- data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
- data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
- data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
- data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
- data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
- data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
- data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
- data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
- data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
- data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
- data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
- data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
- data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
- data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
- data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
- data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
- data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
- data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
- data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
- data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
- data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -1,141 +0,0 @@
|
|
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
|
-
} );
|
@@ -1,186 +0,0 @@
|
|
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 classes, elem, cur, curValue, clazz, j, finalValue,
|
29
|
-
i = 0;
|
30
|
-
|
31
|
-
if ( isFunction( value ) ) {
|
32
|
-
return this.each( function( j ) {
|
33
|
-
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
34
|
-
} );
|
35
|
-
}
|
36
|
-
|
37
|
-
classes = classesToArray( value );
|
38
|
-
|
39
|
-
if ( classes.length ) {
|
40
|
-
while ( ( elem = this[ i++ ] ) ) {
|
41
|
-
curValue = getClass( elem );
|
42
|
-
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
43
|
-
|
44
|
-
if ( cur ) {
|
45
|
-
j = 0;
|
46
|
-
while ( ( clazz = classes[ j++ ] ) ) {
|
47
|
-
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
|
48
|
-
cur += clazz + " ";
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
// Only assign if different to avoid unneeded rendering.
|
53
|
-
finalValue = stripAndCollapse( cur );
|
54
|
-
if ( curValue !== finalValue ) {
|
55
|
-
elem.setAttribute( "class", finalValue );
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
return this;
|
62
|
-
},
|
63
|
-
|
64
|
-
removeClass: function( value ) {
|
65
|
-
var classes, elem, cur, curValue, clazz, j, finalValue,
|
66
|
-
i = 0;
|
67
|
-
|
68
|
-
if ( isFunction( value ) ) {
|
69
|
-
return this.each( function( j ) {
|
70
|
-
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
71
|
-
} );
|
72
|
-
}
|
73
|
-
|
74
|
-
if ( !arguments.length ) {
|
75
|
-
return this.attr( "class", "" );
|
76
|
-
}
|
77
|
-
|
78
|
-
classes = classesToArray( value );
|
79
|
-
|
80
|
-
if ( classes.length ) {
|
81
|
-
while ( ( elem = this[ i++ ] ) ) {
|
82
|
-
curValue = getClass( elem );
|
83
|
-
|
84
|
-
// This expression is here for better compressibility (see addClass)
|
85
|
-
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
86
|
-
|
87
|
-
if ( cur ) {
|
88
|
-
j = 0;
|
89
|
-
while ( ( clazz = classes[ j++ ] ) ) {
|
90
|
-
|
91
|
-
// Remove *all* instances
|
92
|
-
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
|
93
|
-
cur = cur.replace( " " + clazz + " ", " " );
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
// Only assign if different to avoid unneeded rendering.
|
98
|
-
finalValue = stripAndCollapse( cur );
|
99
|
-
if ( curValue !== finalValue ) {
|
100
|
-
elem.setAttribute( "class", finalValue );
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
return this;
|
107
|
-
},
|
108
|
-
|
109
|
-
toggleClass: function( value, stateVal ) {
|
110
|
-
var type = typeof value,
|
111
|
-
isValidValue = type === "string" || Array.isArray( value );
|
112
|
-
|
113
|
-
if ( typeof stateVal === "boolean" && isValidValue ) {
|
114
|
-
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
115
|
-
}
|
116
|
-
|
117
|
-
if ( isFunction( value ) ) {
|
118
|
-
return this.each( function( i ) {
|
119
|
-
jQuery( this ).toggleClass(
|
120
|
-
value.call( this, i, getClass( this ), stateVal ),
|
121
|
-
stateVal
|
122
|
-
);
|
123
|
-
} );
|
124
|
-
}
|
125
|
-
|
126
|
-
return this.each( function() {
|
127
|
-
var className, i, self, classNames;
|
128
|
-
|
129
|
-
if ( isValidValue ) {
|
130
|
-
|
131
|
-
// Toggle individual class names
|
132
|
-
i = 0;
|
133
|
-
self = jQuery( this );
|
134
|
-
classNames = classesToArray( value );
|
135
|
-
|
136
|
-
while ( ( className = classNames[ i++ ] ) ) {
|
137
|
-
|
138
|
-
// Check each className given, space separated list
|
139
|
-
if ( self.hasClass( className ) ) {
|
140
|
-
self.removeClass( className );
|
141
|
-
} else {
|
142
|
-
self.addClass( className );
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
|
-
// Toggle whole class name
|
147
|
-
} else if ( value === undefined || type === "boolean" ) {
|
148
|
-
className = getClass( this );
|
149
|
-
if ( className ) {
|
150
|
-
|
151
|
-
// Store className if set
|
152
|
-
dataPriv.set( this, "__className__", className );
|
153
|
-
}
|
154
|
-
|
155
|
-
// If the element has a class name or if we're passed `false`,
|
156
|
-
// then remove the whole classname (if there was one, the above saved it).
|
157
|
-
// Otherwise bring back whatever was previously saved (if anything),
|
158
|
-
// falling back to the empty string if nothing was stored.
|
159
|
-
if ( this.setAttribute ) {
|
160
|
-
this.setAttribute( "class",
|
161
|
-
className || value === false ?
|
162
|
-
"" :
|
163
|
-
dataPriv.get( this, "__className__" ) || ""
|
164
|
-
);
|
165
|
-
}
|
166
|
-
}
|
167
|
-
} );
|
168
|
-
},
|
169
|
-
|
170
|
-
hasClass: function( selector ) {
|
171
|
-
var className, elem,
|
172
|
-
i = 0;
|
173
|
-
|
174
|
-
className = " " + selector + " ";
|
175
|
-
while ( ( elem = this[ i++ ] ) ) {
|
176
|
-
if ( elem.nodeType === 1 &&
|
177
|
-
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
178
|
-
return true;
|
179
|
-
}
|
180
|
-
}
|
181
|
-
|
182
|
-
return false;
|
183
|
-
}
|
184
|
-
} );
|
185
|
-
|
186
|
-
} );
|
@@ -1,143 +0,0 @@
|
|
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
|
-
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
66
|
-
// Use proper attribute retrieval(#12072)
|
67
|
-
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
68
|
-
|
69
|
-
if ( tabindex ) {
|
70
|
-
return parseInt( tabindex, 10 );
|
71
|
-
}
|
72
|
-
|
73
|
-
if (
|
74
|
-
rfocusable.test( elem.nodeName ) ||
|
75
|
-
rclickable.test( elem.nodeName ) &&
|
76
|
-
elem.href
|
77
|
-
) {
|
78
|
-
return 0;
|
79
|
-
}
|
80
|
-
|
81
|
-
return -1;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
},
|
85
|
-
|
86
|
-
propFix: {
|
87
|
-
"for": "htmlFor",
|
88
|
-
"class": "className"
|
89
|
-
}
|
90
|
-
} );
|
91
|
-
|
92
|
-
// Support: IE <=11 only
|
93
|
-
// Accessing the selectedIndex property
|
94
|
-
// forces the browser to respect setting selected
|
95
|
-
// on the option
|
96
|
-
// The getter ensures a default option is selected
|
97
|
-
// when in an optgroup
|
98
|
-
// eslint rule "no-unused-expressions" is disabled for this code
|
99
|
-
// since it considers such accessions noop
|
100
|
-
if ( !support.optSelected ) {
|
101
|
-
jQuery.propHooks.selected = {
|
102
|
-
get: function( elem ) {
|
103
|
-
|
104
|
-
/* eslint no-unused-expressions: "off" */
|
105
|
-
|
106
|
-
var parent = elem.parentNode;
|
107
|
-
if ( parent && parent.parentNode ) {
|
108
|
-
parent.parentNode.selectedIndex;
|
109
|
-
}
|
110
|
-
return null;
|
111
|
-
},
|
112
|
-
set: function( elem ) {
|
113
|
-
|
114
|
-
/* eslint no-unused-expressions: "off" */
|
115
|
-
|
116
|
-
var parent = elem.parentNode;
|
117
|
-
if ( parent ) {
|
118
|
-
parent.selectedIndex;
|
119
|
-
|
120
|
-
if ( parent.parentNode ) {
|
121
|
-
parent.parentNode.selectedIndex;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
}
|
125
|
-
};
|
126
|
-
}
|
127
|
-
|
128
|
-
jQuery.each( [
|
129
|
-
"tabIndex",
|
130
|
-
"readOnly",
|
131
|
-
"maxLength",
|
132
|
-
"cellSpacing",
|
133
|
-
"cellPadding",
|
134
|
-
"rowSpan",
|
135
|
-
"colSpan",
|
136
|
-
"useMap",
|
137
|
-
"frameBorder",
|
138
|
-
"contentEditable"
|
139
|
-
], function() {
|
140
|
-
jQuery.propFix[ this.toLowerCase() ] = this;
|
141
|
-
} );
|
142
|
-
|
143
|
-
} );
|
@@ -1,33 +0,0 @@
|
|
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
|
-
} );
|
@@ -1,191 +0,0 @@
|
|
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 (#14686, #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 (#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
|
-
} );
|