govuk_publishing_components 28.9.1 → 29.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js +55 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +3 -0
- data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
- data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
- data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/views/govuk_publishing_components/components/_cards.html.erb +9 -25
- data/app/views/govuk_publishing_components/components/_input.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
- data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +27 -22
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/cards.yml +12 -6
- data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/input.yml +18 -15
- data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/summary_list.yml +2 -7
- data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
- data/config/initializers/assets.rb +15 -45
- data/lib/govuk_publishing_components/presenters/attachment.rb +4 -7
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +13 -119
- data/node_modules/jquery/AUTHORS.txt +0 -266
- data/node_modules/jquery/LICENSE.txt +0 -36
- data/node_modules/jquery/README.md +0 -65
- data/node_modules/jquery/bower.json +0 -14
- data/node_modules/jquery/dist/jquery.js +0 -11008
- data/node_modules/jquery/dist/jquery.min.js +0 -5
- data/node_modules/jquery/dist/jquery.min.map +0 -1
- data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/node_modules/jquery/package.json +0 -85
- data/node_modules/jquery/src/ajax/jsonp.js +0 -100
- data/node_modules/jquery/src/ajax/load.js +0 -83
- data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
- data/node_modules/jquery/src/ajax/parseXML.js +0 -31
- data/node_modules/jquery/src/ajax/script.js +0 -95
- data/node_modules/jquery/src/ajax/var/location.js +0 -3
- data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
- data/node_modules/jquery/src/ajax/xhr.js +0 -229
- data/node_modules/jquery/src/ajax.js +0 -842
- data/node_modules/jquery/src/attributes/attr.js +0 -281
- data/node_modules/jquery/src/attributes/classes.js +0 -174
- data/node_modules/jquery/src/attributes/prop.js +0 -156
- data/node_modules/jquery/src/attributes/support.js +0 -70
- data/node_modules/jquery/src/attributes/val.js +0 -191
- data/node_modules/jquery/src/attributes.js +0 -11
- data/node_modules/jquery/src/callbacks.js +0 -232
- data/node_modules/jquery/src/core/access.js +0 -65
- data/node_modules/jquery/src/core/init.js +0 -140
- data/node_modules/jquery/src/core/parseHTML.js +0 -41
- data/node_modules/jquery/src/core/ready.js +0 -163
- data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
- data/node_modules/jquery/src/core.js +0 -529
- data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
- data/node_modules/jquery/src/css/adjustCSS.js +0 -65
- data/node_modules/jquery/src/css/curCSS.js +0 -137
- data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
- data/node_modules/jquery/src/css/showHide.js +0 -45
- data/node_modules/jquery/src/css/support.js +0 -184
- data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
- data/node_modules/jquery/src/css/var/isHidden.js +0 -16
- data/node_modules/jquery/src/css/var/rmargin.js +0 -3
- data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
- data/node_modules/jquery/src/css/var/swap.js +0 -24
- data/node_modules/jquery/src/css.js +0 -563
- data/node_modules/jquery/src/data/support.js +0 -23
- data/node_modules/jquery/src/data/var/acceptData.js +0 -20
- data/node_modules/jquery/src/data.js +0 -342
- data/node_modules/jquery/src/deferred.js +0 -159
- data/node_modules/jquery/src/deprecated.js +0 -34
- data/node_modules/jquery/src/dimensions.js +0 -56
- data/node_modules/jquery/src/effects/Tween.js +0 -121
- data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
- data/node_modules/jquery/src/effects/support.js +0 -58
- data/node_modules/jquery/src/effects.js +0 -640
- data/node_modules/jquery/src/event/ajax.js +0 -20
- data/node_modules/jquery/src/event/alias.js +0 -25
- data/node_modules/jquery/src/event/support.js +0 -28
- data/node_modules/jquery/src/event.js +0 -1134
- data/node_modules/jquery/src/exports/amd.js +0 -24
- data/node_modules/jquery/src/exports/global.js +0 -26
- data/node_modules/jquery/src/intro.js +0 -44
- data/node_modules/jquery/src/jquery.js +0 -37
- data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
- data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
- data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
- data/node_modules/jquery/src/manipulation/getAll.js +0 -33
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
- data/node_modules/jquery/src/manipulation/support.js +0 -72
- data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
- data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/node_modules/jquery/src/manipulation.js +0 -585
- data/node_modules/jquery/src/offset.js +0 -219
- data/node_modules/jquery/src/outro.js +0 -2
- data/node_modules/jquery/src/queue/delay.js +0 -22
- data/node_modules/jquery/src/queue.js +0 -144
- data/node_modules/jquery/src/selector-sizzle.js +0 -14
- data/node_modules/jquery/src/selector.js +0 -1
- data/node_modules/jquery/src/serialize.js +0 -125
- data/node_modules/jquery/src/support.js +0 -63
- data/node_modules/jquery/src/traversing/findFilter.js +0 -100
- data/node_modules/jquery/src/traversing/var/dir.js +0 -20
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
- data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
- data/node_modules/jquery/src/traversing.js +0 -179
- data/node_modules/jquery/src/var/class2type.js +0 -5
- data/node_modules/jquery/src/var/concat.js +0 -5
- data/node_modules/jquery/src/var/deletedIds.js +0 -3
- data/node_modules/jquery/src/var/document.js +0 -3
- data/node_modules/jquery/src/var/documentElement.js +0 -5
- data/node_modules/jquery/src/var/hasOwn.js +0 -5
- data/node_modules/jquery/src/var/indexOf.js +0 -5
- data/node_modules/jquery/src/var/pnum.js +0 -3
- data/node_modules/jquery/src/var/push.js +0 -5
- data/node_modules/jquery/src/var/rcssNum.js +0 -7
- data/node_modules/jquery/src/var/rnotwhite.js +0 -3
- data/node_modules/jquery/src/var/slice.js +0 -5
- data/node_modules/jquery/src/var/support.js +0 -5
- data/node_modules/jquery/src/var/toString.js +0 -5
- data/node_modules/jquery/src/wrap.js +0 -77
@@ -1,65 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../var/rcssNum"
|
4
|
-
], function( jQuery, rcssNum ) {
|
5
|
-
|
6
|
-
function adjustCSS( elem, prop, valueParts, tween ) {
|
7
|
-
var adjusted,
|
8
|
-
scale = 1,
|
9
|
-
maxIterations = 20,
|
10
|
-
currentValue = tween ?
|
11
|
-
function() { return tween.cur(); } :
|
12
|
-
function() { return jQuery.css( elem, prop, "" ); },
|
13
|
-
initial = currentValue(),
|
14
|
-
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
15
|
-
|
16
|
-
// Starting value computation is required for potential unit mismatches
|
17
|
-
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
18
|
-
rcssNum.exec( jQuery.css( elem, prop ) );
|
19
|
-
|
20
|
-
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
21
|
-
|
22
|
-
// Trust units reported by jQuery.css
|
23
|
-
unit = unit || initialInUnit[ 3 ];
|
24
|
-
|
25
|
-
// Make sure we update the tween properties later on
|
26
|
-
valueParts = valueParts || [];
|
27
|
-
|
28
|
-
// Iteratively approximate from a nonzero starting point
|
29
|
-
initialInUnit = +initial || 1;
|
30
|
-
|
31
|
-
do {
|
32
|
-
|
33
|
-
// If previous iteration zeroed out, double until we get *something*.
|
34
|
-
// Use string for doubling so we don't accidentally see scale as unchanged below
|
35
|
-
scale = scale || ".5";
|
36
|
-
|
37
|
-
// Adjust and apply
|
38
|
-
initialInUnit = initialInUnit / scale;
|
39
|
-
jQuery.style( elem, prop, initialInUnit + unit );
|
40
|
-
|
41
|
-
// Update scale, tolerating zero or NaN from tween.cur()
|
42
|
-
// Break the loop if scale is unchanged or perfect, or if we've just had enough.
|
43
|
-
} while (
|
44
|
-
scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
|
45
|
-
);
|
46
|
-
}
|
47
|
-
|
48
|
-
if ( valueParts ) {
|
49
|
-
initialInUnit = +initialInUnit || +initial || 0;
|
50
|
-
|
51
|
-
// Apply relative offset (+=/-=) if specified
|
52
|
-
adjusted = valueParts[ 1 ] ?
|
53
|
-
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
54
|
-
+valueParts[ 2 ];
|
55
|
-
if ( tween ) {
|
56
|
-
tween.unit = unit;
|
57
|
-
tween.start = initialInUnit;
|
58
|
-
tween.end = adjusted;
|
59
|
-
}
|
60
|
-
}
|
61
|
-
return adjusted;
|
62
|
-
}
|
63
|
-
|
64
|
-
return adjustCSS;
|
65
|
-
} );
|
@@ -1,137 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"exports",
|
3
|
-
"../core",
|
4
|
-
"../var/documentElement",
|
5
|
-
"./var/rnumnonpx",
|
6
|
-
"./var/rmargin",
|
7
|
-
"./support",
|
8
|
-
"../selector" // contains
|
9
|
-
], function( exports, jQuery, documentElement, rnumnonpx, rmargin, support ) {
|
10
|
-
|
11
|
-
var getStyles, curCSS,
|
12
|
-
rposition = /^(top|right|bottom|left)$/;
|
13
|
-
|
14
|
-
if ( window.getComputedStyle ) {
|
15
|
-
getStyles = function( elem ) {
|
16
|
-
|
17
|
-
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
|
18
|
-
// IE throws on elements created in popups
|
19
|
-
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
20
|
-
var view = elem.ownerDocument.defaultView;
|
21
|
-
|
22
|
-
if ( !view || !view.opener ) {
|
23
|
-
view = window;
|
24
|
-
}
|
25
|
-
|
26
|
-
return view.getComputedStyle( elem );
|
27
|
-
};
|
28
|
-
|
29
|
-
curCSS = function( elem, name, computed ) {
|
30
|
-
var width, minWidth, maxWidth, ret,
|
31
|
-
style = elem.style;
|
32
|
-
|
33
|
-
computed = computed || getStyles( elem );
|
34
|
-
|
35
|
-
// getPropertyValue is only needed for .css('filter') in IE9, see #12537
|
36
|
-
ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
|
37
|
-
|
38
|
-
// Support: Opera 12.1x only
|
39
|
-
// Fall back to style even without computed
|
40
|
-
// computed is undefined for elems on document fragments
|
41
|
-
if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
42
|
-
ret = jQuery.style( elem, name );
|
43
|
-
}
|
44
|
-
|
45
|
-
if ( computed ) {
|
46
|
-
|
47
|
-
// A tribute to the "awesome hack by Dean Edwards"
|
48
|
-
// Chrome < 17 and Safari 5.0 uses "computed value"
|
49
|
-
// instead of "used value" for margin-right
|
50
|
-
// Safari 5.1.7 (at least) returns percentage for a larger set of values,
|
51
|
-
// but width seems to be reliably pixels
|
52
|
-
// this is against the CSSOM draft spec:
|
53
|
-
// http://dev.w3.org/csswg/cssom/#resolved-values
|
54
|
-
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
55
|
-
|
56
|
-
// Remember the original values
|
57
|
-
width = style.width;
|
58
|
-
minWidth = style.minWidth;
|
59
|
-
maxWidth = style.maxWidth;
|
60
|
-
|
61
|
-
// Put in the new values to get a computed value out
|
62
|
-
style.minWidth = style.maxWidth = style.width = ret;
|
63
|
-
ret = computed.width;
|
64
|
-
|
65
|
-
// Revert the changed values
|
66
|
-
style.width = width;
|
67
|
-
style.minWidth = minWidth;
|
68
|
-
style.maxWidth = maxWidth;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
// Support: IE
|
73
|
-
// IE returns zIndex value as an integer.
|
74
|
-
return ret === undefined ?
|
75
|
-
ret :
|
76
|
-
ret + "";
|
77
|
-
};
|
78
|
-
} else if ( documentElement.currentStyle ) {
|
79
|
-
getStyles = function( elem ) {
|
80
|
-
return elem.currentStyle;
|
81
|
-
};
|
82
|
-
|
83
|
-
curCSS = function( elem, name, computed ) {
|
84
|
-
var left, rs, rsLeft, ret,
|
85
|
-
style = elem.style;
|
86
|
-
|
87
|
-
computed = computed || getStyles( elem );
|
88
|
-
ret = computed ? computed[ name ] : undefined;
|
89
|
-
|
90
|
-
// Avoid setting ret to empty string here
|
91
|
-
// so we don't default to auto
|
92
|
-
if ( ret == null && style && style[ name ] ) {
|
93
|
-
ret = style[ name ];
|
94
|
-
}
|
95
|
-
|
96
|
-
// From the awesome hack by Dean Edwards
|
97
|
-
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
|
98
|
-
|
99
|
-
// If we're not dealing with a regular pixel number
|
100
|
-
// but a number that has a weird ending, we need to convert it to pixels
|
101
|
-
// but not position css attributes, as those are
|
102
|
-
// proportional to the parent element instead
|
103
|
-
// and we can't measure the parent instead because it
|
104
|
-
// might trigger a "stacking dolls" problem
|
105
|
-
if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
|
106
|
-
|
107
|
-
// Remember the original values
|
108
|
-
left = style.left;
|
109
|
-
rs = elem.runtimeStyle;
|
110
|
-
rsLeft = rs && rs.left;
|
111
|
-
|
112
|
-
// Put in the new values to get a computed value out
|
113
|
-
if ( rsLeft ) {
|
114
|
-
rs.left = elem.currentStyle.left;
|
115
|
-
}
|
116
|
-
style.left = name === "fontSize" ? "1em" : ret;
|
117
|
-
ret = style.pixelLeft + "px";
|
118
|
-
|
119
|
-
// Revert the changed values
|
120
|
-
style.left = left;
|
121
|
-
if ( rsLeft ) {
|
122
|
-
rs.left = rsLeft;
|
123
|
-
}
|
124
|
-
}
|
125
|
-
|
126
|
-
// Support: IE
|
127
|
-
// IE returns zIndex value as an integer.
|
128
|
-
return ret === undefined ?
|
129
|
-
ret :
|
130
|
-
ret + "" || "auto";
|
131
|
-
};
|
132
|
-
}
|
133
|
-
|
134
|
-
exports.getStyles = getStyles;
|
135
|
-
exports.curCSS = curCSS;
|
136
|
-
|
137
|
-
} );
|
@@ -1,72 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../var/document",
|
4
|
-
"../manipulation" // appendTo
|
5
|
-
], function( jQuery, document ) {
|
6
|
-
|
7
|
-
var iframe,
|
8
|
-
elemdisplay = {
|
9
|
-
|
10
|
-
// Support: Firefox
|
11
|
-
// We have to pre-define these values for FF (#10227)
|
12
|
-
HTML: "block",
|
13
|
-
BODY: "block"
|
14
|
-
};
|
15
|
-
|
16
|
-
/**
|
17
|
-
* Retrieve the actual display of a element
|
18
|
-
* @param {String} name nodeName of the element
|
19
|
-
* @param {Object} doc Document object
|
20
|
-
*/
|
21
|
-
|
22
|
-
// Called only from within defaultDisplay
|
23
|
-
function actualDisplay( name, doc ) {
|
24
|
-
var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
25
|
-
|
26
|
-
display = jQuery.css( elem[ 0 ], "display" );
|
27
|
-
|
28
|
-
// We don't have any data stored on the element,
|
29
|
-
// so use "detach" method as fast way to get rid of the element
|
30
|
-
elem.detach();
|
31
|
-
|
32
|
-
return display;
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Try to determine the default display value of an element
|
37
|
-
* @param {String} nodeName
|
38
|
-
*/
|
39
|
-
function defaultDisplay( nodeName ) {
|
40
|
-
var doc = document,
|
41
|
-
display = elemdisplay[ nodeName ];
|
42
|
-
|
43
|
-
if ( !display ) {
|
44
|
-
display = actualDisplay( nodeName, doc );
|
45
|
-
|
46
|
-
// If the simple way fails, read from inside an iframe
|
47
|
-
if ( display === "none" || !display ) {
|
48
|
-
|
49
|
-
// Use the already-created iframe if possible
|
50
|
-
iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
|
51
|
-
.appendTo( doc.documentElement );
|
52
|
-
|
53
|
-
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
|
54
|
-
doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
|
55
|
-
|
56
|
-
// Support: IE
|
57
|
-
doc.write();
|
58
|
-
doc.close();
|
59
|
-
|
60
|
-
display = actualDisplay( nodeName, doc );
|
61
|
-
iframe.detach();
|
62
|
-
}
|
63
|
-
|
64
|
-
// Store the correct default display
|
65
|
-
elemdisplay[ nodeName ] = display;
|
66
|
-
}
|
67
|
-
|
68
|
-
return display;
|
69
|
-
}
|
70
|
-
|
71
|
-
return defaultDisplay;
|
72
|
-
} );
|
@@ -1,42 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../var/document",
|
4
|
-
"./support",
|
5
|
-
"../selector",
|
6
|
-
"../css"
|
7
|
-
], function( jQuery, document, support ) {
|
8
|
-
|
9
|
-
function getDisplay( elem ) {
|
10
|
-
return elem.style && elem.style.display || jQuery.css( elem, "display" );
|
11
|
-
}
|
12
|
-
|
13
|
-
function filterHidden( elem ) {
|
14
|
-
|
15
|
-
// Disconnected elements are considered hidden
|
16
|
-
if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {
|
17
|
-
return true;
|
18
|
-
}
|
19
|
-
while ( elem && elem.nodeType === 1 ) {
|
20
|
-
if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) {
|
21
|
-
return true;
|
22
|
-
}
|
23
|
-
elem = elem.parentNode;
|
24
|
-
}
|
25
|
-
return false;
|
26
|
-
}
|
27
|
-
|
28
|
-
jQuery.expr.filters.hidden = function( elem ) {
|
29
|
-
|
30
|
-
// Support: Opera <= 12.12
|
31
|
-
// Opera reports offsetWidths and offsetHeights less than zero on some elements
|
32
|
-
return support.reliableHiddenOffsets() ?
|
33
|
-
( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
|
34
|
-
!elem.getClientRects().length ) :
|
35
|
-
filterHidden( elem );
|
36
|
-
};
|
37
|
-
|
38
|
-
jQuery.expr.filters.visible = function( elem ) {
|
39
|
-
return !jQuery.expr.filters.hidden( elem );
|
40
|
-
};
|
41
|
-
|
42
|
-
} );
|
@@ -1,45 +0,0 @@
|
|
1
|
-
define( [], function() {
|
2
|
-
function showHide( elements, show ) {
|
3
|
-
var display, elem,
|
4
|
-
values = [],
|
5
|
-
index = 0,
|
6
|
-
length = elements.length;
|
7
|
-
|
8
|
-
// Determine new display value for elements that need to change
|
9
|
-
for ( ; index < length; index++ ) {
|
10
|
-
elem = elements[ index ];
|
11
|
-
if ( !elem.style ) {
|
12
|
-
continue;
|
13
|
-
}
|
14
|
-
|
15
|
-
display = elem.style.display;
|
16
|
-
if ( show ) {
|
17
|
-
if ( display === "none" ) {
|
18
|
-
|
19
|
-
// Restore a pre-hide() value if we have one
|
20
|
-
values[ index ] = jQuery._data( elem, "display" ) || "";
|
21
|
-
}
|
22
|
-
} else {
|
23
|
-
if ( display !== "none" ) {
|
24
|
-
values[ index ] = "none";
|
25
|
-
|
26
|
-
// Remember the value we're replacing
|
27
|
-
jQuery._data( elem, "display", display );
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
// Set the display of the elements in a second loop
|
33
|
-
// to avoid the constant reflow
|
34
|
-
for ( index = 0; index < length; index++ ) {
|
35
|
-
if ( values[ index ] != null ) {
|
36
|
-
elements[ index ].style.display = values[ index ];
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
return elements;
|
41
|
-
}
|
42
|
-
|
43
|
-
return showHide;
|
44
|
-
|
45
|
-
} );
|
@@ -1,184 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../var/document",
|
4
|
-
"../var/documentElement",
|
5
|
-
"../var/support"
|
6
|
-
], function( jQuery, document, documentElement, support ) {
|
7
|
-
|
8
|
-
( function() {
|
9
|
-
var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,
|
10
|
-
reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,
|
11
|
-
container = document.createElement( "div" ),
|
12
|
-
div = document.createElement( "div" );
|
13
|
-
|
14
|
-
// Finish early in limited (non-browser) environments
|
15
|
-
if ( !div.style ) {
|
16
|
-
return;
|
17
|
-
}
|
18
|
-
|
19
|
-
div.style.cssText = "float:left;opacity:.5";
|
20
|
-
|
21
|
-
// Support: IE<9
|
22
|
-
// Make sure that element opacity exists (as opposed to filter)
|
23
|
-
support.opacity = div.style.opacity === "0.5";
|
24
|
-
|
25
|
-
// Verify style float existence
|
26
|
-
// (IE uses styleFloat instead of cssFloat)
|
27
|
-
support.cssFloat = !!div.style.cssFloat;
|
28
|
-
|
29
|
-
div.style.backgroundClip = "content-box";
|
30
|
-
div.cloneNode( true ).style.backgroundClip = "";
|
31
|
-
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
32
|
-
|
33
|
-
container = document.createElement( "div" );
|
34
|
-
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
|
35
|
-
"padding:0;margin-top:1px;position:absolute";
|
36
|
-
div.innerHTML = "";
|
37
|
-
container.appendChild( div );
|
38
|
-
|
39
|
-
// Support: Firefox<29, Android 2.3
|
40
|
-
// Vendor-prefix box-sizing
|
41
|
-
support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
|
42
|
-
div.style.WebkitBoxSizing === "";
|
43
|
-
|
44
|
-
jQuery.extend( support, {
|
45
|
-
reliableHiddenOffsets: function() {
|
46
|
-
if ( pixelPositionVal == null ) {
|
47
|
-
computeStyleTests();
|
48
|
-
}
|
49
|
-
return reliableHiddenOffsetsVal;
|
50
|
-
},
|
51
|
-
|
52
|
-
boxSizingReliable: function() {
|
53
|
-
|
54
|
-
// We're checking for pixelPositionVal here instead of boxSizingReliableVal
|
55
|
-
// since that compresses better and they're computed together anyway.
|
56
|
-
if ( pixelPositionVal == null ) {
|
57
|
-
computeStyleTests();
|
58
|
-
}
|
59
|
-
return boxSizingReliableVal;
|
60
|
-
},
|
61
|
-
|
62
|
-
pixelMarginRight: function() {
|
63
|
-
|
64
|
-
// Support: Android 4.0-4.3
|
65
|
-
if ( pixelPositionVal == null ) {
|
66
|
-
computeStyleTests();
|
67
|
-
}
|
68
|
-
return pixelMarginRightVal;
|
69
|
-
},
|
70
|
-
|
71
|
-
pixelPosition: function() {
|
72
|
-
if ( pixelPositionVal == null ) {
|
73
|
-
computeStyleTests();
|
74
|
-
}
|
75
|
-
return pixelPositionVal;
|
76
|
-
},
|
77
|
-
|
78
|
-
reliableMarginRight: function() {
|
79
|
-
|
80
|
-
// Support: Android 2.3
|
81
|
-
if ( pixelPositionVal == null ) {
|
82
|
-
computeStyleTests();
|
83
|
-
}
|
84
|
-
return reliableMarginRightVal;
|
85
|
-
},
|
86
|
-
|
87
|
-
reliableMarginLeft: function() {
|
88
|
-
|
89
|
-
// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
|
90
|
-
if ( pixelPositionVal == null ) {
|
91
|
-
computeStyleTests();
|
92
|
-
}
|
93
|
-
return reliableMarginLeftVal;
|
94
|
-
}
|
95
|
-
} );
|
96
|
-
|
97
|
-
function computeStyleTests() {
|
98
|
-
var contents, divStyle,
|
99
|
-
documentElement = document.documentElement;
|
100
|
-
|
101
|
-
// Setup
|
102
|
-
documentElement.appendChild( container );
|
103
|
-
|
104
|
-
div.style.cssText =
|
105
|
-
|
106
|
-
// Support: Android 2.3
|
107
|
-
// Vendor-prefix box-sizing
|
108
|
-
"-webkit-box-sizing:border-box;box-sizing:border-box;" +
|
109
|
-
"position:relative;display:block;" +
|
110
|
-
"margin:auto;border:1px;padding:1px;" +
|
111
|
-
"top:1%;width:50%";
|
112
|
-
|
113
|
-
// Support: IE<9
|
114
|
-
// Assume reasonable values in the absence of getComputedStyle
|
115
|
-
pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;
|
116
|
-
pixelMarginRightVal = reliableMarginRightVal = true;
|
117
|
-
|
118
|
-
// Check for getComputedStyle so that this code is not run in IE<9.
|
119
|
-
if ( window.getComputedStyle ) {
|
120
|
-
divStyle = window.getComputedStyle( div );
|
121
|
-
pixelPositionVal = ( divStyle || {} ).top !== "1%";
|
122
|
-
reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
|
123
|
-
boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px";
|
124
|
-
|
125
|
-
// Support: Android 4.0 - 4.3 only
|
126
|
-
// Some styles come back with percentage values, even though they shouldn't
|
127
|
-
div.style.marginRight = "50%";
|
128
|
-
pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";
|
129
|
-
|
130
|
-
// Support: Android 2.3 only
|
131
|
-
// Div with explicit width and no margin-right incorrectly
|
132
|
-
// gets computed margin-right based on width of container (#3333)
|
133
|
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
134
|
-
contents = div.appendChild( document.createElement( "div" ) );
|
135
|
-
|
136
|
-
// Reset CSS: box-sizing; display; margin; border; padding
|
137
|
-
contents.style.cssText = div.style.cssText =
|
138
|
-
|
139
|
-
// Support: Android 2.3
|
140
|
-
// Vendor-prefix box-sizing
|
141
|
-
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
142
|
-
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
|
143
|
-
contents.style.marginRight = contents.style.width = "0";
|
144
|
-
div.style.width = "1px";
|
145
|
-
|
146
|
-
reliableMarginRightVal =
|
147
|
-
!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );
|
148
|
-
|
149
|
-
div.removeChild( contents );
|
150
|
-
}
|
151
|
-
|
152
|
-
// Support: IE6-8
|
153
|
-
// First check that getClientRects works as expected
|
154
|
-
// Check if table cells still have offsetWidth/Height when they are set
|
155
|
-
// to display:none and there are still other visible table cells in a
|
156
|
-
// table row; if so, offsetWidth/Height are not reliable for use when
|
157
|
-
// determining if an element has been hidden directly using
|
158
|
-
// display:none (it is still safe to use offsets if a parent element is
|
159
|
-
// hidden; don safety goggles and see bug #4512 for more information).
|
160
|
-
div.style.display = "none";
|
161
|
-
reliableHiddenOffsetsVal = div.getClientRects().length === 0;
|
162
|
-
if ( reliableHiddenOffsetsVal ) {
|
163
|
-
div.style.display = "";
|
164
|
-
div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
|
165
|
-
div.childNodes[ 0 ].style.borderCollapse = "separate";
|
166
|
-
contents = div.getElementsByTagName( "td" );
|
167
|
-
contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
|
168
|
-
reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
|
169
|
-
if ( reliableHiddenOffsetsVal ) {
|
170
|
-
contents[ 0 ].style.display = "";
|
171
|
-
contents[ 1 ].style.display = "none";
|
172
|
-
reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
// Teardown
|
177
|
-
documentElement.removeChild( container );
|
178
|
-
}
|
179
|
-
|
180
|
-
} )();
|
181
|
-
|
182
|
-
return support;
|
183
|
-
|
184
|
-
} );
|
@@ -1,16 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../../core",
|
3
|
-
"../../selector"
|
4
|
-
|
5
|
-
// css is assumed
|
6
|
-
], function( jQuery ) {
|
7
|
-
|
8
|
-
return function( elem, el ) {
|
9
|
-
|
10
|
-
// isHidden might be called from jQuery#filter function;
|
11
|
-
// in that case, element will be second argument
|
12
|
-
elem = el || elem;
|
13
|
-
return jQuery.css( elem, "display" ) === "none" ||
|
14
|
-
!jQuery.contains( elem.ownerDocument, elem );
|
15
|
-
};
|
16
|
-
} );
|
@@ -1,24 +0,0 @@
|
|
1
|
-
define( function() {
|
2
|
-
|
3
|
-
// A method for quickly swapping in/out CSS properties to get correct calculations.
|
4
|
-
return function( elem, options, callback, args ) {
|
5
|
-
var ret, name,
|
6
|
-
old = {};
|
7
|
-
|
8
|
-
// Remember the old values, and insert the new ones
|
9
|
-
for ( name in options ) {
|
10
|
-
old[ name ] = elem.style[ name ];
|
11
|
-
elem.style[ name ] = options[ name ];
|
12
|
-
}
|
13
|
-
|
14
|
-
ret = callback.apply( elem, args || [] );
|
15
|
-
|
16
|
-
// Revert the old values
|
17
|
-
for ( name in options ) {
|
18
|
-
elem.style[ name ] = old[ name ];
|
19
|
-
}
|
20
|
-
|
21
|
-
return ret;
|
22
|
-
};
|
23
|
-
|
24
|
-
} );
|