trusty-cms 4.3.3 → 5.0.1
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 +87 -77
- data/app/assets/javascripts/ckeditor/config.js +2 -2
- 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
- data/yarn.lock +3 -3
- 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,494 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"./core/access",
|
4
|
-
"./core/camelCase",
|
5
|
-
"./core/nodeName",
|
6
|
-
"./var/rcssNum",
|
7
|
-
"./css/var/rnumnonpx",
|
8
|
-
"./css/var/cssExpand",
|
9
|
-
"./css/var/getStyles",
|
10
|
-
"./css/var/swap",
|
11
|
-
"./css/curCSS",
|
12
|
-
"./css/adjustCSS",
|
13
|
-
"./css/addGetHookIf",
|
14
|
-
"./css/support",
|
15
|
-
"./css/finalPropName",
|
16
|
-
|
17
|
-
"./core/init",
|
18
|
-
"./core/ready",
|
19
|
-
"./selector" // contains
|
20
|
-
], function( jQuery, access, camelCase, nodeName, rcssNum, rnumnonpx, cssExpand,
|
21
|
-
getStyles, swap, curCSS, adjustCSS, addGetHookIf, support, finalPropName ) {
|
22
|
-
|
23
|
-
"use strict";
|
24
|
-
|
25
|
-
var
|
26
|
-
|
27
|
-
// Swappable if display is none or starts with table
|
28
|
-
// except "table", "table-cell", or "table-caption"
|
29
|
-
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
30
|
-
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
31
|
-
rcustomProp = /^--/,
|
32
|
-
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
33
|
-
cssNormalTransform = {
|
34
|
-
letterSpacing: "0",
|
35
|
-
fontWeight: "400"
|
36
|
-
};
|
37
|
-
|
38
|
-
function setPositiveNumber( _elem, value, subtract ) {
|
39
|
-
|
40
|
-
// Any relative (+/-) values have already been
|
41
|
-
// normalized at this point
|
42
|
-
var matches = rcssNum.exec( value );
|
43
|
-
return matches ?
|
44
|
-
|
45
|
-
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
46
|
-
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
47
|
-
value;
|
48
|
-
}
|
49
|
-
|
50
|
-
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
51
|
-
var i = dimension === "width" ? 1 : 0,
|
52
|
-
extra = 0,
|
53
|
-
delta = 0;
|
54
|
-
|
55
|
-
// Adjustment may not be necessary
|
56
|
-
if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
57
|
-
return 0;
|
58
|
-
}
|
59
|
-
|
60
|
-
for ( ; i < 4; i += 2 ) {
|
61
|
-
|
62
|
-
// Both box models exclude margin
|
63
|
-
if ( box === "margin" ) {
|
64
|
-
delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
|
65
|
-
}
|
66
|
-
|
67
|
-
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
|
68
|
-
if ( !isBorderBox ) {
|
69
|
-
|
70
|
-
// Add padding
|
71
|
-
delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
72
|
-
|
73
|
-
// For "border" or "margin", add border
|
74
|
-
if ( box !== "padding" ) {
|
75
|
-
delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
76
|
-
|
77
|
-
// But still keep track of it otherwise
|
78
|
-
} else {
|
79
|
-
extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
80
|
-
}
|
81
|
-
|
82
|
-
// If we get here with a border-box (content + padding + border), we're seeking "content" or
|
83
|
-
// "padding" or "margin"
|
84
|
-
} else {
|
85
|
-
|
86
|
-
// For "content", subtract padding
|
87
|
-
if ( box === "content" ) {
|
88
|
-
delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
89
|
-
}
|
90
|
-
|
91
|
-
// For "content" or "padding", subtract border
|
92
|
-
if ( box !== "margin" ) {
|
93
|
-
delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
94
|
-
}
|
95
|
-
}
|
96
|
-
}
|
97
|
-
|
98
|
-
// Account for positive content-box scroll gutter when requested by providing computedVal
|
99
|
-
if ( !isBorderBox && computedVal >= 0 ) {
|
100
|
-
|
101
|
-
// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
|
102
|
-
// Assuming integer scroll gutter, subtract the rest and round down
|
103
|
-
delta += Math.max( 0, Math.ceil(
|
104
|
-
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
105
|
-
computedVal -
|
106
|
-
delta -
|
107
|
-
extra -
|
108
|
-
0.5
|
109
|
-
|
110
|
-
// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
|
111
|
-
// Use an explicit zero to avoid NaN (gh-3964)
|
112
|
-
) ) || 0;
|
113
|
-
}
|
114
|
-
|
115
|
-
return delta;
|
116
|
-
}
|
117
|
-
|
118
|
-
function getWidthOrHeight( elem, dimension, extra ) {
|
119
|
-
|
120
|
-
// Start with computed style
|
121
|
-
var styles = getStyles( elem ),
|
122
|
-
|
123
|
-
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
|
124
|
-
// Fake content-box until we know it's needed to know the true value.
|
125
|
-
boxSizingNeeded = !support.boxSizingReliable() || extra,
|
126
|
-
isBorderBox = boxSizingNeeded &&
|
127
|
-
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
128
|
-
valueIsBorderBox = isBorderBox,
|
129
|
-
|
130
|
-
val = curCSS( elem, dimension, styles ),
|
131
|
-
offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
|
132
|
-
|
133
|
-
// Support: Firefox <=54
|
134
|
-
// Return a confounding non-pixel value or feign ignorance, as appropriate.
|
135
|
-
if ( rnumnonpx.test( val ) ) {
|
136
|
-
if ( !extra ) {
|
137
|
-
return val;
|
138
|
-
}
|
139
|
-
val = "auto";
|
140
|
-
}
|
141
|
-
|
142
|
-
|
143
|
-
// Support: IE 9 - 11 only
|
144
|
-
// Use offsetWidth/offsetHeight for when box sizing is unreliable.
|
145
|
-
// In those cases, the computed value can be trusted to be border-box.
|
146
|
-
if ( ( !support.boxSizingReliable() && isBorderBox ||
|
147
|
-
|
148
|
-
// Support: IE 10 - 11+, Edge 15 - 18+
|
149
|
-
// IE/Edge misreport `getComputedStyle` of table rows with width/height
|
150
|
-
// set in CSS while `offset*` properties report correct values.
|
151
|
-
// Interestingly, in some cases IE 9 doesn't suffer from this issue.
|
152
|
-
!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
|
153
|
-
|
154
|
-
// Fall back to offsetWidth/offsetHeight when value is "auto"
|
155
|
-
// This happens for inline elements with no explicit setting (gh-3571)
|
156
|
-
val === "auto" ||
|
157
|
-
|
158
|
-
// Support: Android <=4.1 - 4.3 only
|
159
|
-
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
|
160
|
-
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
|
161
|
-
|
162
|
-
// Make sure the element is visible & connected
|
163
|
-
elem.getClientRects().length ) {
|
164
|
-
|
165
|
-
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
166
|
-
|
167
|
-
// Where available, offsetWidth/offsetHeight approximate border box dimensions.
|
168
|
-
// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
|
169
|
-
// retrieved value as a content box dimension.
|
170
|
-
valueIsBorderBox = offsetProp in elem;
|
171
|
-
if ( valueIsBorderBox ) {
|
172
|
-
val = elem[ offsetProp ];
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
// Normalize "" and auto
|
177
|
-
val = parseFloat( val ) || 0;
|
178
|
-
|
179
|
-
// Adjust for the element's box model
|
180
|
-
return ( val +
|
181
|
-
boxModelAdjustment(
|
182
|
-
elem,
|
183
|
-
dimension,
|
184
|
-
extra || ( isBorderBox ? "border" : "content" ),
|
185
|
-
valueIsBorderBox,
|
186
|
-
styles,
|
187
|
-
|
188
|
-
// Provide the current computed size to request scroll gutter calculation (gh-3589)
|
189
|
-
val
|
190
|
-
)
|
191
|
-
) + "px";
|
192
|
-
}
|
193
|
-
|
194
|
-
jQuery.extend( {
|
195
|
-
|
196
|
-
// Add in style property hooks for overriding the default
|
197
|
-
// behavior of getting and setting a style property
|
198
|
-
cssHooks: {
|
199
|
-
opacity: {
|
200
|
-
get: function( elem, computed ) {
|
201
|
-
if ( computed ) {
|
202
|
-
|
203
|
-
// We should always get a number back from opacity
|
204
|
-
var ret = curCSS( elem, "opacity" );
|
205
|
-
return ret === "" ? "1" : ret;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
}
|
209
|
-
},
|
210
|
-
|
211
|
-
// Don't automatically add "px" to these possibly-unitless properties
|
212
|
-
cssNumber: {
|
213
|
-
"animationIterationCount": true,
|
214
|
-
"columnCount": true,
|
215
|
-
"fillOpacity": true,
|
216
|
-
"flexGrow": true,
|
217
|
-
"flexShrink": true,
|
218
|
-
"fontWeight": true,
|
219
|
-
"gridArea": true,
|
220
|
-
"gridColumn": true,
|
221
|
-
"gridColumnEnd": true,
|
222
|
-
"gridColumnStart": true,
|
223
|
-
"gridRow": true,
|
224
|
-
"gridRowEnd": true,
|
225
|
-
"gridRowStart": true,
|
226
|
-
"lineHeight": true,
|
227
|
-
"opacity": true,
|
228
|
-
"order": true,
|
229
|
-
"orphans": true,
|
230
|
-
"widows": true,
|
231
|
-
"zIndex": true,
|
232
|
-
"zoom": true
|
233
|
-
},
|
234
|
-
|
235
|
-
// Add in properties whose names you wish to fix before
|
236
|
-
// setting or getting the value
|
237
|
-
cssProps: {},
|
238
|
-
|
239
|
-
// Get and set the style property on a DOM Node
|
240
|
-
style: function( elem, name, value, extra ) {
|
241
|
-
|
242
|
-
// Don't set styles on text and comment nodes
|
243
|
-
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
244
|
-
return;
|
245
|
-
}
|
246
|
-
|
247
|
-
// Make sure that we're working with the right name
|
248
|
-
var ret, type, hooks,
|
249
|
-
origName = camelCase( name ),
|
250
|
-
isCustomProp = rcustomProp.test( name ),
|
251
|
-
style = elem.style;
|
252
|
-
|
253
|
-
// Make sure that we're working with the right name. We don't
|
254
|
-
// want to query the value if it is a CSS custom property
|
255
|
-
// since they are user-defined.
|
256
|
-
if ( !isCustomProp ) {
|
257
|
-
name = finalPropName( origName );
|
258
|
-
}
|
259
|
-
|
260
|
-
// Gets hook for the prefixed version, then unprefixed version
|
261
|
-
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
262
|
-
|
263
|
-
// Check if we're setting a value
|
264
|
-
if ( value !== undefined ) {
|
265
|
-
type = typeof value;
|
266
|
-
|
267
|
-
// Convert "+=" or "-=" to relative numbers (#7345)
|
268
|
-
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
269
|
-
value = adjustCSS( elem, name, ret );
|
270
|
-
|
271
|
-
// Fixes bug #9237
|
272
|
-
type = "number";
|
273
|
-
}
|
274
|
-
|
275
|
-
// Make sure that null and NaN values aren't set (#7116)
|
276
|
-
if ( value == null || value !== value ) {
|
277
|
-
return;
|
278
|
-
}
|
279
|
-
|
280
|
-
// If a number was passed in, add the unit (except for certain CSS properties)
|
281
|
-
// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
|
282
|
-
// "px" to a few hardcoded values.
|
283
|
-
if ( type === "number" && !isCustomProp ) {
|
284
|
-
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
285
|
-
}
|
286
|
-
|
287
|
-
// background-* props affect original clone's values
|
288
|
-
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
289
|
-
style[ name ] = "inherit";
|
290
|
-
}
|
291
|
-
|
292
|
-
// If a hook was provided, use that value, otherwise just set the specified value
|
293
|
-
if ( !hooks || !( "set" in hooks ) ||
|
294
|
-
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
295
|
-
|
296
|
-
if ( isCustomProp ) {
|
297
|
-
style.setProperty( name, value );
|
298
|
-
} else {
|
299
|
-
style[ name ] = value;
|
300
|
-
}
|
301
|
-
}
|
302
|
-
|
303
|
-
} else {
|
304
|
-
|
305
|
-
// If a hook was provided get the non-computed value from there
|
306
|
-
if ( hooks && "get" in hooks &&
|
307
|
-
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
308
|
-
|
309
|
-
return ret;
|
310
|
-
}
|
311
|
-
|
312
|
-
// Otherwise just get the value from the style object
|
313
|
-
return style[ name ];
|
314
|
-
}
|
315
|
-
},
|
316
|
-
|
317
|
-
css: function( elem, name, extra, styles ) {
|
318
|
-
var val, num, hooks,
|
319
|
-
origName = camelCase( name ),
|
320
|
-
isCustomProp = rcustomProp.test( name );
|
321
|
-
|
322
|
-
// Make sure that we're working with the right name. We don't
|
323
|
-
// want to modify the value if it is a CSS custom property
|
324
|
-
// since they are user-defined.
|
325
|
-
if ( !isCustomProp ) {
|
326
|
-
name = finalPropName( origName );
|
327
|
-
}
|
328
|
-
|
329
|
-
// Try prefixed name followed by the unprefixed name
|
330
|
-
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
331
|
-
|
332
|
-
// If a hook was provided get the computed value from there
|
333
|
-
if ( hooks && "get" in hooks ) {
|
334
|
-
val = hooks.get( elem, true, extra );
|
335
|
-
}
|
336
|
-
|
337
|
-
// Otherwise, if a way to get the computed value exists, use that
|
338
|
-
if ( val === undefined ) {
|
339
|
-
val = curCSS( elem, name, styles );
|
340
|
-
}
|
341
|
-
|
342
|
-
// Convert "normal" to computed value
|
343
|
-
if ( val === "normal" && name in cssNormalTransform ) {
|
344
|
-
val = cssNormalTransform[ name ];
|
345
|
-
}
|
346
|
-
|
347
|
-
// Make numeric if forced or a qualifier was provided and val looks numeric
|
348
|
-
if ( extra === "" || extra ) {
|
349
|
-
num = parseFloat( val );
|
350
|
-
return extra === true || isFinite( num ) ? num || 0 : val;
|
351
|
-
}
|
352
|
-
|
353
|
-
return val;
|
354
|
-
}
|
355
|
-
} );
|
356
|
-
|
357
|
-
jQuery.each( [ "height", "width" ], function( _i, dimension ) {
|
358
|
-
jQuery.cssHooks[ dimension ] = {
|
359
|
-
get: function( elem, computed, extra ) {
|
360
|
-
if ( computed ) {
|
361
|
-
|
362
|
-
// Certain elements can have dimension info if we invisibly show them
|
363
|
-
// but it must have a current display style that would benefit
|
364
|
-
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
365
|
-
|
366
|
-
// Support: Safari 8+
|
367
|
-
// Table columns in Safari have non-zero offsetWidth & zero
|
368
|
-
// getBoundingClientRect().width unless display is changed.
|
369
|
-
// Support: IE <=11 only
|
370
|
-
// Running getBoundingClientRect on a disconnected node
|
371
|
-
// in IE throws an error.
|
372
|
-
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
373
|
-
swap( elem, cssShow, function() {
|
374
|
-
return getWidthOrHeight( elem, dimension, extra );
|
375
|
-
} ) :
|
376
|
-
getWidthOrHeight( elem, dimension, extra );
|
377
|
-
}
|
378
|
-
},
|
379
|
-
|
380
|
-
set: function( elem, value, extra ) {
|
381
|
-
var matches,
|
382
|
-
styles = getStyles( elem ),
|
383
|
-
|
384
|
-
// Only read styles.position if the test has a chance to fail
|
385
|
-
// to avoid forcing a reflow.
|
386
|
-
scrollboxSizeBuggy = !support.scrollboxSize() &&
|
387
|
-
styles.position === "absolute",
|
388
|
-
|
389
|
-
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
|
390
|
-
boxSizingNeeded = scrollboxSizeBuggy || extra,
|
391
|
-
isBorderBox = boxSizingNeeded &&
|
392
|
-
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
393
|
-
subtract = extra ?
|
394
|
-
boxModelAdjustment(
|
395
|
-
elem,
|
396
|
-
dimension,
|
397
|
-
extra,
|
398
|
-
isBorderBox,
|
399
|
-
styles
|
400
|
-
) :
|
401
|
-
0;
|
402
|
-
|
403
|
-
// Account for unreliable border-box dimensions by comparing offset* to computed and
|
404
|
-
// faking a content-box to get border and padding (gh-3699)
|
405
|
-
if ( isBorderBox && scrollboxSizeBuggy ) {
|
406
|
-
subtract -= Math.ceil(
|
407
|
-
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
408
|
-
parseFloat( styles[ dimension ] ) -
|
409
|
-
boxModelAdjustment( elem, dimension, "border", false, styles ) -
|
410
|
-
0.5
|
411
|
-
);
|
412
|
-
}
|
413
|
-
|
414
|
-
// Convert to pixels if value adjustment is needed
|
415
|
-
if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
416
|
-
( matches[ 3 ] || "px" ) !== "px" ) {
|
417
|
-
|
418
|
-
elem.style[ dimension ] = value;
|
419
|
-
value = jQuery.css( elem, dimension );
|
420
|
-
}
|
421
|
-
|
422
|
-
return setPositiveNumber( elem, value, subtract );
|
423
|
-
}
|
424
|
-
};
|
425
|
-
} );
|
426
|
-
|
427
|
-
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
428
|
-
function( elem, computed ) {
|
429
|
-
if ( computed ) {
|
430
|
-
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
431
|
-
elem.getBoundingClientRect().left -
|
432
|
-
swap( elem, { marginLeft: 0 }, function() {
|
433
|
-
return elem.getBoundingClientRect().left;
|
434
|
-
} )
|
435
|
-
) + "px";
|
436
|
-
}
|
437
|
-
}
|
438
|
-
);
|
439
|
-
|
440
|
-
// These hooks are used by animate to expand properties
|
441
|
-
jQuery.each( {
|
442
|
-
margin: "",
|
443
|
-
padding: "",
|
444
|
-
border: "Width"
|
445
|
-
}, function( prefix, suffix ) {
|
446
|
-
jQuery.cssHooks[ prefix + suffix ] = {
|
447
|
-
expand: function( value ) {
|
448
|
-
var i = 0,
|
449
|
-
expanded = {},
|
450
|
-
|
451
|
-
// Assumes a single number if not a string
|
452
|
-
parts = typeof value === "string" ? value.split( " " ) : [ value ];
|
453
|
-
|
454
|
-
for ( ; i < 4; i++ ) {
|
455
|
-
expanded[ prefix + cssExpand[ i ] + suffix ] =
|
456
|
-
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
457
|
-
}
|
458
|
-
|
459
|
-
return expanded;
|
460
|
-
}
|
461
|
-
};
|
462
|
-
|
463
|
-
if ( prefix !== "margin" ) {
|
464
|
-
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
465
|
-
}
|
466
|
-
} );
|
467
|
-
|
468
|
-
jQuery.fn.extend( {
|
469
|
-
css: function( name, value ) {
|
470
|
-
return access( this, function( elem, name, value ) {
|
471
|
-
var styles, len,
|
472
|
-
map = {},
|
473
|
-
i = 0;
|
474
|
-
|
475
|
-
if ( Array.isArray( name ) ) {
|
476
|
-
styles = getStyles( elem );
|
477
|
-
len = name.length;
|
478
|
-
|
479
|
-
for ( ; i < len; i++ ) {
|
480
|
-
map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
|
481
|
-
}
|
482
|
-
|
483
|
-
return map;
|
484
|
-
}
|
485
|
-
|
486
|
-
return value !== undefined ?
|
487
|
-
jQuery.style( elem, name, value ) :
|
488
|
-
jQuery.css( elem, name );
|
489
|
-
}, name, value, arguments.length > 1 );
|
490
|
-
}
|
491
|
-
} );
|
492
|
-
|
493
|
-
return jQuery;
|
494
|
-
} );
|
@@ -1,162 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../core/camelCase",
|
4
|
-
"../var/rnothtmlwhite",
|
5
|
-
"./var/acceptData"
|
6
|
-
], function( jQuery, camelCase, rnothtmlwhite, acceptData ) {
|
7
|
-
|
8
|
-
"use strict";
|
9
|
-
|
10
|
-
function Data() {
|
11
|
-
this.expando = jQuery.expando + Data.uid++;
|
12
|
-
}
|
13
|
-
|
14
|
-
Data.uid = 1;
|
15
|
-
|
16
|
-
Data.prototype = {
|
17
|
-
|
18
|
-
cache: function( owner ) {
|
19
|
-
|
20
|
-
// Check if the owner object already has a cache
|
21
|
-
var value = owner[ this.expando ];
|
22
|
-
|
23
|
-
// If not, create one
|
24
|
-
if ( !value ) {
|
25
|
-
value = Object.create( null );
|
26
|
-
|
27
|
-
// We can accept data for non-element nodes in modern browsers,
|
28
|
-
// but we should not, see #8335.
|
29
|
-
// Always return an empty object.
|
30
|
-
if ( acceptData( owner ) ) {
|
31
|
-
|
32
|
-
// If it is a node unlikely to be stringify-ed or looped over
|
33
|
-
// use plain assignment
|
34
|
-
if ( owner.nodeType ) {
|
35
|
-
owner[ this.expando ] = value;
|
36
|
-
|
37
|
-
// Otherwise secure it in a non-enumerable property
|
38
|
-
// configurable must be true to allow the property to be
|
39
|
-
// deleted when data is removed
|
40
|
-
} else {
|
41
|
-
Object.defineProperty( owner, this.expando, {
|
42
|
-
value: value,
|
43
|
-
configurable: true
|
44
|
-
} );
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
return value;
|
50
|
-
},
|
51
|
-
set: function( owner, data, value ) {
|
52
|
-
var prop,
|
53
|
-
cache = this.cache( owner );
|
54
|
-
|
55
|
-
// Handle: [ owner, key, value ] args
|
56
|
-
// Always use camelCase key (gh-2257)
|
57
|
-
if ( typeof data === "string" ) {
|
58
|
-
cache[ camelCase( data ) ] = value;
|
59
|
-
|
60
|
-
// Handle: [ owner, { properties } ] args
|
61
|
-
} else {
|
62
|
-
|
63
|
-
// Copy the properties one-by-one to the cache object
|
64
|
-
for ( prop in data ) {
|
65
|
-
cache[ camelCase( prop ) ] = data[ prop ];
|
66
|
-
}
|
67
|
-
}
|
68
|
-
return cache;
|
69
|
-
},
|
70
|
-
get: function( owner, key ) {
|
71
|
-
return key === undefined ?
|
72
|
-
this.cache( owner ) :
|
73
|
-
|
74
|
-
// Always use camelCase key (gh-2257)
|
75
|
-
owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
|
76
|
-
},
|
77
|
-
access: function( owner, key, value ) {
|
78
|
-
|
79
|
-
// In cases where either:
|
80
|
-
//
|
81
|
-
// 1. No key was specified
|
82
|
-
// 2. A string key was specified, but no value provided
|
83
|
-
//
|
84
|
-
// Take the "read" path and allow the get method to determine
|
85
|
-
// which value to return, respectively either:
|
86
|
-
//
|
87
|
-
// 1. The entire cache object
|
88
|
-
// 2. The data stored at the key
|
89
|
-
//
|
90
|
-
if ( key === undefined ||
|
91
|
-
( ( key && typeof key === "string" ) && value === undefined ) ) {
|
92
|
-
|
93
|
-
return this.get( owner, key );
|
94
|
-
}
|
95
|
-
|
96
|
-
// When the key is not a string, or both a key and value
|
97
|
-
// are specified, set or extend (existing objects) with either:
|
98
|
-
//
|
99
|
-
// 1. An object of properties
|
100
|
-
// 2. A key and value
|
101
|
-
//
|
102
|
-
this.set( owner, key, value );
|
103
|
-
|
104
|
-
// Since the "set" path can have two possible entry points
|
105
|
-
// return the expected data based on which path was taken[*]
|
106
|
-
return value !== undefined ? value : key;
|
107
|
-
},
|
108
|
-
remove: function( owner, key ) {
|
109
|
-
var i,
|
110
|
-
cache = owner[ this.expando ];
|
111
|
-
|
112
|
-
if ( cache === undefined ) {
|
113
|
-
return;
|
114
|
-
}
|
115
|
-
|
116
|
-
if ( key !== undefined ) {
|
117
|
-
|
118
|
-
// Support array or space separated string of keys
|
119
|
-
if ( Array.isArray( key ) ) {
|
120
|
-
|
121
|
-
// If key is an array of keys...
|
122
|
-
// We always set camelCase keys, so remove that.
|
123
|
-
key = key.map( camelCase );
|
124
|
-
} else {
|
125
|
-
key = camelCase( key );
|
126
|
-
|
127
|
-
// If a key with the spaces exists, use it.
|
128
|
-
// Otherwise, create an array by matching non-whitespace
|
129
|
-
key = key in cache ?
|
130
|
-
[ key ] :
|
131
|
-
( key.match( rnothtmlwhite ) || [] );
|
132
|
-
}
|
133
|
-
|
134
|
-
i = key.length;
|
135
|
-
|
136
|
-
while ( i-- ) {
|
137
|
-
delete cache[ key[ i ] ];
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
// Remove the expando if there's no more data
|
142
|
-
if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
143
|
-
|
144
|
-
// Support: Chrome <=35 - 45
|
145
|
-
// Webkit & Blink performance suffers when deleting properties
|
146
|
-
// from DOM nodes, so set to undefined instead
|
147
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
|
148
|
-
if ( owner.nodeType ) {
|
149
|
-
owner[ this.expando ] = undefined;
|
150
|
-
} else {
|
151
|
-
delete owner[ this.expando ];
|
152
|
-
}
|
153
|
-
}
|
154
|
-
},
|
155
|
-
hasData: function( owner ) {
|
156
|
-
var cache = owner[ this.expando ];
|
157
|
-
return cache !== undefined && !jQuery.isEmptyObject( cache );
|
158
|
-
}
|
159
|
-
};
|
160
|
-
|
161
|
-
return Data;
|
162
|
-
} );
|
@@ -1,19 +0,0 @@
|
|
1
|
-
define( function() {
|
2
|
-
|
3
|
-
"use strict";
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Determines whether an object can have data
|
7
|
-
*/
|
8
|
-
return function( owner ) {
|
9
|
-
|
10
|
-
// Accepts only:
|
11
|
-
// - Node
|
12
|
-
// - Node.ELEMENT_NODE
|
13
|
-
// - Node.DOCUMENT_NODE
|
14
|
-
// - Object
|
15
|
-
// - Any
|
16
|
-
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
17
|
-
};
|
18
|
-
|
19
|
-
} );
|