trusty-cms 4.3.4 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +25 -15
  4. data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
  5. data/app/controllers/admin/assets_controller.rb +5 -1
  6. data/app/models/asset.rb +39 -48
  7. data/app/models/asset_type.rb +6 -2
  8. data/app/views/admin/assets/edit.html.haml +5 -3
  9. data/config/database.yml +2 -2
  10. data/config/locales/en.yml +1 -0
  11. data/coverage/index.html +1 -1
  12. data/lib/trusty_cms/deprecation.rb +13 -0
  13. data/lib/trusty_cms.rb +1 -1
  14. data/node_modules/path-parse/index.js +17 -35
  15. data/node_modules/path-parse/package.json +1 -1
  16. data/node_modules/postcss/CHANGELOG.md +27 -0
  17. data/node_modules/postcss/README.md +21 -0
  18. data/node_modules/postcss/lib/at-rule.js +2 -4
  19. data/node_modules/postcss/lib/comment.js +2 -4
  20. data/node_modules/postcss/lib/container.js +27 -122
  21. data/node_modules/postcss/lib/css-syntax-error.js +5 -7
  22. data/node_modules/postcss/lib/declaration.js +2 -4
  23. data/node_modules/postcss/lib/input.js +3 -5
  24. data/node_modules/postcss/lib/lazy-result.js +10 -17
  25. data/node_modules/postcss/lib/map-generator.js +10 -17
  26. data/node_modules/postcss/lib/node.js +2 -4
  27. data/node_modules/postcss/lib/parser.js +2 -4
  28. data/node_modules/postcss/lib/postcss.d.ts +25 -19
  29. data/node_modules/postcss/lib/previous-map.js +17 -6
  30. data/node_modules/postcss/lib/processor.js +16 -15
  31. data/node_modules/postcss/lib/result.js +2 -4
  32. data/node_modules/postcss/lib/root.js +10 -17
  33. data/node_modules/postcss/lib/rule.js +2 -4
  34. data/node_modules/postcss/lib/stringifier.js +2 -4
  35. data/node_modules/postcss/lib/warning.js +2 -4
  36. data/node_modules/postcss/package.json +16 -12
  37. data/spec/dummy/log/test.log +542 -443
  38. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  39. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
  40. data/trusty_cms.gemspec +2 -1
  41. data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
  42. metadata +31 -307
  43. data/config/initializers/interpolation.rb +0 -6
  44. data/node_modules/path-parse/test.js +0 -77
  45. data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
  46. data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
  47. data/node_modules/postcss/docs/api/index.html +0 -22716
  48. data/spec/dummy/log/development.log +0 -158
  49. data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
  50. data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
  51. data/spec/dummy/node_modules/jquery/README.md +0 -62
  52. data/spec/dummy/node_modules/jquery/bower.json +0 -14
  53. data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
  54. data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
  55. data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
  56. data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
  57. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
  58. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
  59. data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  60. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
  61. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  62. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  63. data/spec/dummy/node_modules/jquery/package.json +0 -117
  64. data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
  65. data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
  66. data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
  67. data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
  68. data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  69. data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
  70. data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
  71. data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
  72. data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
  73. data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
  74. data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
  75. data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
  76. data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
  77. data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
  78. data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
  79. data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
  80. data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
  81. data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
  82. data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
  83. data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
  84. data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
  85. data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
  86. data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
  87. data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
  88. data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
  89. data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
  90. data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
  91. data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
  92. data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
  93. data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
  94. data/spec/dummy/node_modules/jquery/src/core.js +0 -400
  95. data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
  96. data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
  97. data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
  98. data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
  99. data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  100. data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
  101. data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
  102. data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
  103. data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
  104. data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  105. data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
  106. data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
  107. data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
  108. data/spec/dummy/node_modules/jquery/src/css.js +0 -494
  109. data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
  110. data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
  111. data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
  112. data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
  113. data/spec/dummy/node_modules/jquery/src/data.js +0 -180
  114. data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
  115. data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
  116. data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
  117. data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
  118. data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
  119. data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
  120. data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
  121. data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
  122. data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
  123. data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
  124. data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
  125. data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
  126. data/spec/dummy/node_modules/jquery/src/event.js +0 -892
  127. data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
  128. data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
  129. data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
  130. data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
  131. data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
  132. data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
  133. data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
  134. data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
  135. data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
  136. data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
  137. data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  138. data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
  139. data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
  140. data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
  141. data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
  142. data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
  143. data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
  144. data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
  145. data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
  146. data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
  147. data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
  148. data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
  149. data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
  150. data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
  151. data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
  152. data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
  153. data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
  154. data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
  155. data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
  156. data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
  157. data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
  158. data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
  159. data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
  160. data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
  161. data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
  162. data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
  163. data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
  164. data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
  165. data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
  166. data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
  167. data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
  168. data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
  169. data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
  170. data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
  171. data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
  172. data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
  173. data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
  174. data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
  175. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
  176. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
  177. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
  178. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
  179. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
  180. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
  181. data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
  182. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
  183. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
  184. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
  185. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
  186. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
  187. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
  188. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
  189. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
  190. data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
  191. data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
  192. data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
  193. data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
  194. data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
  195. data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
  196. data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
  197. data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -1,74 +0,0 @@
1
- define( [
2
- "../core",
3
- "../var/rcssNum"
4
- ], function( jQuery, rcssNum ) {
5
-
6
- "use strict";
7
-
8
- function adjustCSS( elem, prop, valueParts, tween ) {
9
- var adjusted, scale,
10
- maxIterations = 20,
11
- currentValue = tween ?
12
- function() {
13
- return tween.cur();
14
- } :
15
- function() {
16
- return jQuery.css( elem, prop, "" );
17
- },
18
- initial = currentValue(),
19
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
20
-
21
- // Starting value computation is required for potential unit mismatches
22
- initialInUnit = elem.nodeType &&
23
- ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
24
- rcssNum.exec( jQuery.css( elem, prop ) );
25
-
26
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
27
-
28
- // Support: Firefox <=54
29
- // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
30
- initial = initial / 2;
31
-
32
- // Trust units reported by jQuery.css
33
- unit = unit || initialInUnit[ 3 ];
34
-
35
- // Iteratively approximate from a nonzero starting point
36
- initialInUnit = +initial || 1;
37
-
38
- while ( maxIterations-- ) {
39
-
40
- // Evaluate and update our best guess (doubling guesses that zero out).
41
- // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
42
- jQuery.style( elem, prop, initialInUnit + unit );
43
- if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
44
- maxIterations = 0;
45
- }
46
- initialInUnit = initialInUnit / scale;
47
-
48
- }
49
-
50
- initialInUnit = initialInUnit * 2;
51
- jQuery.style( elem, prop, initialInUnit + unit );
52
-
53
- // Make sure we update the tween properties later on
54
- valueParts = valueParts || [];
55
- }
56
-
57
- if ( valueParts ) {
58
- initialInUnit = +initialInUnit || +initial || 0;
59
-
60
- // Apply relative offset (+=/-=) if specified
61
- adjusted = valueParts[ 1 ] ?
62
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
63
- +valueParts[ 2 ];
64
- if ( tween ) {
65
- tween.unit = unit;
66
- tween.start = initialInUnit;
67
- tween.end = adjusted;
68
- }
69
- }
70
- return adjusted;
71
- }
72
-
73
- return adjustCSS;
74
- } );
@@ -1,65 +0,0 @@
1
- define( [
2
- "../core",
3
- "../core/isAttached",
4
- "./var/rboxStyle",
5
- "./var/rnumnonpx",
6
- "./var/getStyles",
7
- "./support"
8
- ], function( jQuery, isAttached, rboxStyle, rnumnonpx, getStyles, support ) {
9
-
10
- "use strict";
11
-
12
- function curCSS( elem, name, computed ) {
13
- var width, minWidth, maxWidth, ret,
14
-
15
- // Support: Firefox 51+
16
- // Retrieving style before computed somehow
17
- // fixes an issue with getting wrong values
18
- // on detached elements
19
- style = elem.style;
20
-
21
- computed = computed || getStyles( elem );
22
-
23
- // getPropertyValue is needed for:
24
- // .css('filter') (IE 9 only, #12537)
25
- // .css('--customProperty) (#3144)
26
- if ( computed ) {
27
- ret = computed.getPropertyValue( name ) || computed[ name ];
28
-
29
- if ( ret === "" && !isAttached( elem ) ) {
30
- ret = jQuery.style( elem, name );
31
- }
32
-
33
- // A tribute to the "awesome hack by Dean Edwards"
34
- // Android Browser returns percentage for some values,
35
- // but width seems to be reliably pixels.
36
- // This is against the CSSOM draft spec:
37
- // https://drafts.csswg.org/cssom/#resolved-values
38
- if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
39
-
40
- // Remember the original values
41
- width = style.width;
42
- minWidth = style.minWidth;
43
- maxWidth = style.maxWidth;
44
-
45
- // Put in the new values to get a computed value out
46
- style.minWidth = style.maxWidth = style.width = ret;
47
- ret = computed.width;
48
-
49
- // Revert the changed values
50
- style.width = width;
51
- style.minWidth = minWidth;
52
- style.maxWidth = maxWidth;
53
- }
54
- }
55
-
56
- return ret !== undefined ?
57
-
58
- // Support: IE <=9 - 11 only
59
- // IE returns zIndex value as an integer.
60
- ret + "" :
61
- ret;
62
- }
63
-
64
- return curCSS;
65
- } );
@@ -1,42 +0,0 @@
1
- define( [
2
- "../var/document",
3
- "../core"
4
- ], function( document, jQuery ) {
5
-
6
- "use strict";
7
-
8
- var cssPrefixes = [ "Webkit", "Moz", "ms" ],
9
- emptyStyle = document.createElement( "div" ).style,
10
- vendorProps = {};
11
-
12
- // Return a vendor-prefixed property or undefined
13
- function vendorPropName( name ) {
14
-
15
- // Check for vendor prefixed names
16
- var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
17
- i = cssPrefixes.length;
18
-
19
- while ( i-- ) {
20
- name = cssPrefixes[ i ] + capName;
21
- if ( name in emptyStyle ) {
22
- return name;
23
- }
24
- }
25
- }
26
-
27
- // Return a potentially-mapped jQuery.cssProps or vendor prefixed property
28
- function finalPropName( name ) {
29
- var final = jQuery.cssProps[ name ] || vendorProps[ name ];
30
-
31
- if ( final ) {
32
- return final;
33
- }
34
- if ( name in emptyStyle ) {
35
- return name;
36
- }
37
- return vendorProps[ name ] = vendorPropName( name ) || name;
38
- }
39
-
40
- return finalPropName;
41
-
42
- } );
@@ -1,15 +0,0 @@
1
- define( [
2
- "../core",
3
- "../selector"
4
- ], function( jQuery ) {
5
-
6
- "use strict";
7
-
8
- jQuery.expr.pseudos.hidden = function( elem ) {
9
- return !jQuery.expr.pseudos.visible( elem );
10
- };
11
- jQuery.expr.pseudos.visible = function( elem ) {
12
- return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
13
- };
14
-
15
- } );
@@ -1,105 +0,0 @@
1
- define( [
2
- "../core",
3
- "../data/var/dataPriv",
4
- "../css/var/isHiddenWithinTree"
5
- ], function( jQuery, dataPriv, isHiddenWithinTree ) {
6
-
7
- "use strict";
8
-
9
- var defaultDisplayMap = {};
10
-
11
- function getDefaultDisplay( elem ) {
12
- var temp,
13
- doc = elem.ownerDocument,
14
- nodeName = elem.nodeName,
15
- display = defaultDisplayMap[ nodeName ];
16
-
17
- if ( display ) {
18
- return display;
19
- }
20
-
21
- temp = doc.body.appendChild( doc.createElement( nodeName ) );
22
- display = jQuery.css( temp, "display" );
23
-
24
- temp.parentNode.removeChild( temp );
25
-
26
- if ( display === "none" ) {
27
- display = "block";
28
- }
29
- defaultDisplayMap[ nodeName ] = display;
30
-
31
- return display;
32
- }
33
-
34
- function showHide( elements, show ) {
35
- var display, elem,
36
- values = [],
37
- index = 0,
38
- length = elements.length;
39
-
40
- // Determine new display value for elements that need to change
41
- for ( ; index < length; index++ ) {
42
- elem = elements[ index ];
43
- if ( !elem.style ) {
44
- continue;
45
- }
46
-
47
- display = elem.style.display;
48
- if ( show ) {
49
-
50
- // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
51
- // check is required in this first loop unless we have a nonempty display value (either
52
- // inline or about-to-be-restored)
53
- if ( display === "none" ) {
54
- values[ index ] = dataPriv.get( elem, "display" ) || null;
55
- if ( !values[ index ] ) {
56
- elem.style.display = "";
57
- }
58
- }
59
- if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
60
- values[ index ] = getDefaultDisplay( elem );
61
- }
62
- } else {
63
- if ( display !== "none" ) {
64
- values[ index ] = "none";
65
-
66
- // Remember what we're overwriting
67
- dataPriv.set( elem, "display", display );
68
- }
69
- }
70
- }
71
-
72
- // Set the display of the elements in a second loop to avoid constant reflow
73
- for ( index = 0; index < length; index++ ) {
74
- if ( values[ index ] != null ) {
75
- elements[ index ].style.display = values[ index ];
76
- }
77
- }
78
-
79
- return elements;
80
- }
81
-
82
- jQuery.fn.extend( {
83
- show: function() {
84
- return showHide( this, true );
85
- },
86
- hide: function() {
87
- return showHide( this );
88
- },
89
- toggle: function( state ) {
90
- if ( typeof state === "boolean" ) {
91
- return state ? this.show() : this.hide();
92
- }
93
-
94
- return this.each( function() {
95
- if ( isHiddenWithinTree( this ) ) {
96
- jQuery( this ).show();
97
- } else {
98
- jQuery( this ).hide();
99
- }
100
- } );
101
- }
102
- } );
103
-
104
- return showHide;
105
- } );
@@ -1,133 +0,0 @@
1
- define( [
2
- "../core",
3
- "../var/document",
4
- "../var/documentElement",
5
- "../var/support"
6
- ], function( jQuery, document, documentElement, support ) {
7
-
8
- "use strict";
9
-
10
- ( function() {
11
-
12
- // Executing both pixelPosition & boxSizingReliable tests require only one layout
13
- // so they're executed at the same time to save the second computation.
14
- function computeStyleTests() {
15
-
16
- // This is a singleton, we need to execute it only once
17
- if ( !div ) {
18
- return;
19
- }
20
-
21
- container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
22
- "margin-top:1px;padding:0;border:0";
23
- div.style.cssText =
24
- "position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
25
- "margin:auto;border:1px;padding:1px;" +
26
- "width:60%;top:1%";
27
- documentElement.appendChild( container ).appendChild( div );
28
-
29
- var divStyle = window.getComputedStyle( div );
30
- pixelPositionVal = divStyle.top !== "1%";
31
-
32
- // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
33
- reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
34
-
35
- // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
36
- // Some styles come back with percentage values, even though they shouldn't
37
- div.style.right = "60%";
38
- pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
39
-
40
- // Support: IE 9 - 11 only
41
- // Detect misreporting of content dimensions for box-sizing:border-box elements
42
- boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
43
-
44
- // Support: IE 9 only
45
- // Detect overflow:scroll screwiness (gh-3699)
46
- // Support: Chrome <=64
47
- // Don't get tricked when zoom affects offsetWidth (gh-4029)
48
- div.style.position = "absolute";
49
- scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
50
-
51
- documentElement.removeChild( container );
52
-
53
- // Nullify the div so it wouldn't be stored in the memory and
54
- // it will also be a sign that checks already performed
55
- div = null;
56
- }
57
-
58
- function roundPixelMeasures( measure ) {
59
- return Math.round( parseFloat( measure ) );
60
- }
61
-
62
- var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
63
- reliableTrDimensionsVal, reliableMarginLeftVal,
64
- container = document.createElement( "div" ),
65
- div = document.createElement( "div" );
66
-
67
- // Finish early in limited (non-browser) environments
68
- if ( !div.style ) {
69
- return;
70
- }
71
-
72
- // Support: IE <=9 - 11 only
73
- // Style of cloned element affects source element cloned (#8908)
74
- div.style.backgroundClip = "content-box";
75
- div.cloneNode( true ).style.backgroundClip = "";
76
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
77
-
78
- jQuery.extend( support, {
79
- boxSizingReliable: function() {
80
- computeStyleTests();
81
- return boxSizingReliableVal;
82
- },
83
- pixelBoxStyles: function() {
84
- computeStyleTests();
85
- return pixelBoxStylesVal;
86
- },
87
- pixelPosition: function() {
88
- computeStyleTests();
89
- return pixelPositionVal;
90
- },
91
- reliableMarginLeft: function() {
92
- computeStyleTests();
93
- return reliableMarginLeftVal;
94
- },
95
- scrollboxSize: function() {
96
- computeStyleTests();
97
- return scrollboxSizeVal;
98
- },
99
-
100
- // Support: IE 9 - 11+, Edge 15 - 18+
101
- // IE/Edge misreport `getComputedStyle` of table rows with width/height
102
- // set in CSS while `offset*` properties report correct values.
103
- // Behavior in IE 9 is more subtle than in newer versions & it passes
104
- // some versions of this test; make sure not to make it pass there!
105
- reliableTrDimensions: function() {
106
- var table, tr, trChild, trStyle;
107
- if ( reliableTrDimensionsVal == null ) {
108
- table = document.createElement( "table" );
109
- tr = document.createElement( "tr" );
110
- trChild = document.createElement( "div" );
111
-
112
- table.style.cssText = "position:absolute;left:-11111px";
113
- tr.style.height = "1px";
114
- trChild.style.height = "9px";
115
-
116
- documentElement
117
- .appendChild( table )
118
- .appendChild( tr )
119
- .appendChild( trChild );
120
-
121
- trStyle = window.getComputedStyle( tr );
122
- reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
123
-
124
- documentElement.removeChild( table );
125
- }
126
- return reliableTrDimensionsVal;
127
- }
128
- } );
129
- } )();
130
-
131
- return support;
132
-
133
- } );
@@ -1,5 +0,0 @@
1
- define( function() {
2
- "use strict";
3
-
4
- return [ "Top", "Right", "Bottom", "Left" ];
5
- } );
@@ -1,17 +0,0 @@
1
- define( function() {
2
- "use strict";
3
-
4
- return function( elem ) {
5
-
6
- // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
7
- // IE throws on elements created in popups
8
- // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
9
- var view = elem.ownerDocument.defaultView;
10
-
11
- if ( !view || !view.opener ) {
12
- view = window;
13
- }
14
-
15
- return view.getComputedStyle( elem );
16
- };
17
- } );
@@ -1,34 +0,0 @@
1
- define( [
2
- "../../core",
3
- "../../core/isAttached"
4
-
5
- // css is assumed
6
- ], function( jQuery, isAttached ) {
7
- "use strict";
8
-
9
- // isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or
10
- // through the CSS cascade), which is useful in deciding whether or not to make it visible.
11
- // It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways:
12
- // * A hidden ancestor does not force an element to be classified as hidden.
13
- // * Being disconnected from the document does not force an element to be classified as hidden.
14
- // These differences improve the behavior of .toggle() et al. when applied to elements that are
15
- // detached or contained within hidden ancestors (gh-2404, gh-2863).
16
- return function( elem, el ) {
17
-
18
- // isHiddenWithinTree might be called from jQuery#filter function;
19
- // in that case, element will be second argument
20
- elem = el || elem;
21
-
22
- // Inline style trumps all
23
- return elem.style.display === "none" ||
24
- elem.style.display === "" &&
25
-
26
- // Otherwise, check computed style
27
- // Support: Firefox <=43 - 45
28
- // Disconnected elements can have computed display: none, so first confirm that elem is
29
- // in the document.
30
- isAttached( elem ) &&
31
-
32
- jQuery.css( elem, "display" ) === "none";
33
- };
34
- } );
@@ -1,7 +0,0 @@
1
- define( [
2
- "./cssExpand"
3
- ], function( cssExpand ) {
4
- "use strict";
5
-
6
- return new RegExp( cssExpand.join( "|" ), "i" );
7
- } );
@@ -1,7 +0,0 @@
1
- define( [
2
- "../../var/pnum"
3
- ], function( pnum ) {
4
- "use strict";
5
-
6
- return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
7
- } );
@@ -1,26 +0,0 @@
1
- define( function() {
2
-
3
- "use strict";
4
-
5
- // A method for quickly swapping in/out CSS properties to get correct calculations.
6
- return function( elem, options, callback ) {
7
- var ret, name,
8
- old = {};
9
-
10
- // Remember the old values, and insert the new ones
11
- for ( name in options ) {
12
- old[ name ] = elem.style[ name ];
13
- elem.style[ name ] = options[ name ];
14
- }
15
-
16
- ret = callback.call( elem );
17
-
18
- // Revert the old values
19
- for ( name in options ) {
20
- elem.style[ name ] = old[ name ];
21
- }
22
-
23
- return ret;
24
- };
25
-
26
- } );