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,480 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"./core/isAttached",
|
4
|
-
"./var/flat",
|
5
|
-
"./var/isFunction",
|
6
|
-
"./var/push",
|
7
|
-
"./var/rcheckableType",
|
8
|
-
"./core/access",
|
9
|
-
"./manipulation/var/rtagName",
|
10
|
-
"./manipulation/var/rscriptType",
|
11
|
-
"./manipulation/wrapMap",
|
12
|
-
"./manipulation/getAll",
|
13
|
-
"./manipulation/setGlobalEval",
|
14
|
-
"./manipulation/buildFragment",
|
15
|
-
"./manipulation/support",
|
16
|
-
|
17
|
-
"./data/var/dataPriv",
|
18
|
-
"./data/var/dataUser",
|
19
|
-
"./data/var/acceptData",
|
20
|
-
"./core/DOMEval",
|
21
|
-
"./core/nodeName",
|
22
|
-
|
23
|
-
"./core/init",
|
24
|
-
"./traversing",
|
25
|
-
"./selector",
|
26
|
-
"./event"
|
27
|
-
], function( jQuery, isAttached, flat, isFunction, push, rcheckableType,
|
28
|
-
access, rtagName, rscriptType,
|
29
|
-
wrapMap, getAll, setGlobalEval, buildFragment, support,
|
30
|
-
dataPriv, dataUser, acceptData, DOMEval, nodeName ) {
|
31
|
-
|
32
|
-
"use strict";
|
33
|
-
|
34
|
-
var
|
35
|
-
|
36
|
-
// Support: IE <=10 - 11, Edge 12 - 13 only
|
37
|
-
// In IE/Edge using regex groups here causes severe slowdowns.
|
38
|
-
// See https://connect.microsoft.com/IE/feedback/details/1736512/
|
39
|
-
rnoInnerhtml = /<script|<style|<link/i,
|
40
|
-
|
41
|
-
// checked="checked" or checked
|
42
|
-
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
43
|
-
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
44
|
-
|
45
|
-
// Prefer a tbody over its parent table for containing new rows
|
46
|
-
function manipulationTarget( elem, content ) {
|
47
|
-
if ( nodeName( elem, "table" ) &&
|
48
|
-
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
49
|
-
|
50
|
-
return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
|
51
|
-
}
|
52
|
-
|
53
|
-
return elem;
|
54
|
-
}
|
55
|
-
|
56
|
-
// Replace/restore the type attribute of script elements for safe DOM manipulation
|
57
|
-
function disableScript( elem ) {
|
58
|
-
elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
|
59
|
-
return elem;
|
60
|
-
}
|
61
|
-
function restoreScript( elem ) {
|
62
|
-
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
|
63
|
-
elem.type = elem.type.slice( 5 );
|
64
|
-
} else {
|
65
|
-
elem.removeAttribute( "type" );
|
66
|
-
}
|
67
|
-
|
68
|
-
return elem;
|
69
|
-
}
|
70
|
-
|
71
|
-
function cloneCopyEvent( src, dest ) {
|
72
|
-
var i, l, type, pdataOld, udataOld, udataCur, events;
|
73
|
-
|
74
|
-
if ( dest.nodeType !== 1 ) {
|
75
|
-
return;
|
76
|
-
}
|
77
|
-
|
78
|
-
// 1. Copy private data: events, handlers, etc.
|
79
|
-
if ( dataPriv.hasData( src ) ) {
|
80
|
-
pdataOld = dataPriv.get( src );
|
81
|
-
events = pdataOld.events;
|
82
|
-
|
83
|
-
if ( events ) {
|
84
|
-
dataPriv.remove( dest, "handle events" );
|
85
|
-
|
86
|
-
for ( type in events ) {
|
87
|
-
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
88
|
-
jQuery.event.add( dest, type, events[ type ][ i ] );
|
89
|
-
}
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
// 2. Copy user data
|
95
|
-
if ( dataUser.hasData( src ) ) {
|
96
|
-
udataOld = dataUser.access( src );
|
97
|
-
udataCur = jQuery.extend( {}, udataOld );
|
98
|
-
|
99
|
-
dataUser.set( dest, udataCur );
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
// Fix IE bugs, see support tests
|
104
|
-
function fixInput( src, dest ) {
|
105
|
-
var nodeName = dest.nodeName.toLowerCase();
|
106
|
-
|
107
|
-
// Fails to persist the checked state of a cloned checkbox or radio button.
|
108
|
-
if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
109
|
-
dest.checked = src.checked;
|
110
|
-
|
111
|
-
// Fails to return the selected option to the default selected state when cloning options
|
112
|
-
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
113
|
-
dest.defaultValue = src.defaultValue;
|
114
|
-
}
|
115
|
-
}
|
116
|
-
|
117
|
-
function domManip( collection, args, callback, ignored ) {
|
118
|
-
|
119
|
-
// Flatten any nested arrays
|
120
|
-
args = flat( args );
|
121
|
-
|
122
|
-
var fragment, first, scripts, hasScripts, node, doc,
|
123
|
-
i = 0,
|
124
|
-
l = collection.length,
|
125
|
-
iNoClone = l - 1,
|
126
|
-
value = args[ 0 ],
|
127
|
-
valueIsFunction = isFunction( value );
|
128
|
-
|
129
|
-
// We can't cloneNode fragments that contain checked, in WebKit
|
130
|
-
if ( valueIsFunction ||
|
131
|
-
( l > 1 && typeof value === "string" &&
|
132
|
-
!support.checkClone && rchecked.test( value ) ) ) {
|
133
|
-
return collection.each( function( index ) {
|
134
|
-
var self = collection.eq( index );
|
135
|
-
if ( valueIsFunction ) {
|
136
|
-
args[ 0 ] = value.call( this, index, self.html() );
|
137
|
-
}
|
138
|
-
domManip( self, args, callback, ignored );
|
139
|
-
} );
|
140
|
-
}
|
141
|
-
|
142
|
-
if ( l ) {
|
143
|
-
fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
|
144
|
-
first = fragment.firstChild;
|
145
|
-
|
146
|
-
if ( fragment.childNodes.length === 1 ) {
|
147
|
-
fragment = first;
|
148
|
-
}
|
149
|
-
|
150
|
-
// Require either new content or an interest in ignored elements to invoke the callback
|
151
|
-
if ( first || ignored ) {
|
152
|
-
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
153
|
-
hasScripts = scripts.length;
|
154
|
-
|
155
|
-
// Use the original fragment for the last item
|
156
|
-
// instead of the first because it can end up
|
157
|
-
// being emptied incorrectly in certain situations (#8070).
|
158
|
-
for ( ; i < l; i++ ) {
|
159
|
-
node = fragment;
|
160
|
-
|
161
|
-
if ( i !== iNoClone ) {
|
162
|
-
node = jQuery.clone( node, true, true );
|
163
|
-
|
164
|
-
// Keep references to cloned scripts for later restoration
|
165
|
-
if ( hasScripts ) {
|
166
|
-
|
167
|
-
// Support: Android <=4.0 only, PhantomJS 1 only
|
168
|
-
// push.apply(_, arraylike) throws on ancient WebKit
|
169
|
-
jQuery.merge( scripts, getAll( node, "script" ) );
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
callback.call( collection[ i ], node, i );
|
174
|
-
}
|
175
|
-
|
176
|
-
if ( hasScripts ) {
|
177
|
-
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
178
|
-
|
179
|
-
// Reenable scripts
|
180
|
-
jQuery.map( scripts, restoreScript );
|
181
|
-
|
182
|
-
// Evaluate executable scripts on first document insertion
|
183
|
-
for ( i = 0; i < hasScripts; i++ ) {
|
184
|
-
node = scripts[ i ];
|
185
|
-
if ( rscriptType.test( node.type || "" ) &&
|
186
|
-
!dataPriv.access( node, "globalEval" ) &&
|
187
|
-
jQuery.contains( doc, node ) ) {
|
188
|
-
|
189
|
-
if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
|
190
|
-
|
191
|
-
// Optional AJAX dependency, but won't run scripts if not present
|
192
|
-
if ( jQuery._evalUrl && !node.noModule ) {
|
193
|
-
jQuery._evalUrl( node.src, {
|
194
|
-
nonce: node.nonce || node.getAttribute( "nonce" )
|
195
|
-
}, doc );
|
196
|
-
}
|
197
|
-
} else {
|
198
|
-
DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
|
199
|
-
}
|
200
|
-
}
|
201
|
-
}
|
202
|
-
}
|
203
|
-
}
|
204
|
-
}
|
205
|
-
|
206
|
-
return collection;
|
207
|
-
}
|
208
|
-
|
209
|
-
function remove( elem, selector, keepData ) {
|
210
|
-
var node,
|
211
|
-
nodes = selector ? jQuery.filter( selector, elem ) : elem,
|
212
|
-
i = 0;
|
213
|
-
|
214
|
-
for ( ; ( node = nodes[ i ] ) != null; i++ ) {
|
215
|
-
if ( !keepData && node.nodeType === 1 ) {
|
216
|
-
jQuery.cleanData( getAll( node ) );
|
217
|
-
}
|
218
|
-
|
219
|
-
if ( node.parentNode ) {
|
220
|
-
if ( keepData && isAttached( node ) ) {
|
221
|
-
setGlobalEval( getAll( node, "script" ) );
|
222
|
-
}
|
223
|
-
node.parentNode.removeChild( node );
|
224
|
-
}
|
225
|
-
}
|
226
|
-
|
227
|
-
return elem;
|
228
|
-
}
|
229
|
-
|
230
|
-
jQuery.extend( {
|
231
|
-
htmlPrefilter: function( html ) {
|
232
|
-
return html;
|
233
|
-
},
|
234
|
-
|
235
|
-
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
236
|
-
var i, l, srcElements, destElements,
|
237
|
-
clone = elem.cloneNode( true ),
|
238
|
-
inPage = isAttached( elem );
|
239
|
-
|
240
|
-
// Fix IE cloning issues
|
241
|
-
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
242
|
-
!jQuery.isXMLDoc( elem ) ) {
|
243
|
-
|
244
|
-
// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
|
245
|
-
destElements = getAll( clone );
|
246
|
-
srcElements = getAll( elem );
|
247
|
-
|
248
|
-
for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
249
|
-
fixInput( srcElements[ i ], destElements[ i ] );
|
250
|
-
}
|
251
|
-
}
|
252
|
-
|
253
|
-
// Copy the events from the original to the clone
|
254
|
-
if ( dataAndEvents ) {
|
255
|
-
if ( deepDataAndEvents ) {
|
256
|
-
srcElements = srcElements || getAll( elem );
|
257
|
-
destElements = destElements || getAll( clone );
|
258
|
-
|
259
|
-
for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
260
|
-
cloneCopyEvent( srcElements[ i ], destElements[ i ] );
|
261
|
-
}
|
262
|
-
} else {
|
263
|
-
cloneCopyEvent( elem, clone );
|
264
|
-
}
|
265
|
-
}
|
266
|
-
|
267
|
-
// Preserve script evaluation history
|
268
|
-
destElements = getAll( clone, "script" );
|
269
|
-
if ( destElements.length > 0 ) {
|
270
|
-
setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
|
271
|
-
}
|
272
|
-
|
273
|
-
// Return the cloned set
|
274
|
-
return clone;
|
275
|
-
},
|
276
|
-
|
277
|
-
cleanData: function( elems ) {
|
278
|
-
var data, elem, type,
|
279
|
-
special = jQuery.event.special,
|
280
|
-
i = 0;
|
281
|
-
|
282
|
-
for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
|
283
|
-
if ( acceptData( elem ) ) {
|
284
|
-
if ( ( data = elem[ dataPriv.expando ] ) ) {
|
285
|
-
if ( data.events ) {
|
286
|
-
for ( type in data.events ) {
|
287
|
-
if ( special[ type ] ) {
|
288
|
-
jQuery.event.remove( elem, type );
|
289
|
-
|
290
|
-
// This is a shortcut to avoid jQuery.event.remove's overhead
|
291
|
-
} else {
|
292
|
-
jQuery.removeEvent( elem, type, data.handle );
|
293
|
-
}
|
294
|
-
}
|
295
|
-
}
|
296
|
-
|
297
|
-
// Support: Chrome <=35 - 45+
|
298
|
-
// Assign undefined instead of using delete, see Data#remove
|
299
|
-
elem[ dataPriv.expando ] = undefined;
|
300
|
-
}
|
301
|
-
if ( elem[ dataUser.expando ] ) {
|
302
|
-
|
303
|
-
// Support: Chrome <=35 - 45+
|
304
|
-
// Assign undefined instead of using delete, see Data#remove
|
305
|
-
elem[ dataUser.expando ] = undefined;
|
306
|
-
}
|
307
|
-
}
|
308
|
-
}
|
309
|
-
}
|
310
|
-
} );
|
311
|
-
|
312
|
-
jQuery.fn.extend( {
|
313
|
-
detach: function( selector ) {
|
314
|
-
return remove( this, selector, true );
|
315
|
-
},
|
316
|
-
|
317
|
-
remove: function( selector ) {
|
318
|
-
return remove( this, selector );
|
319
|
-
},
|
320
|
-
|
321
|
-
text: function( value ) {
|
322
|
-
return access( this, function( value ) {
|
323
|
-
return value === undefined ?
|
324
|
-
jQuery.text( this ) :
|
325
|
-
this.empty().each( function() {
|
326
|
-
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
327
|
-
this.textContent = value;
|
328
|
-
}
|
329
|
-
} );
|
330
|
-
}, null, value, arguments.length );
|
331
|
-
},
|
332
|
-
|
333
|
-
append: function() {
|
334
|
-
return domManip( this, arguments, function( elem ) {
|
335
|
-
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
336
|
-
var target = manipulationTarget( this, elem );
|
337
|
-
target.appendChild( elem );
|
338
|
-
}
|
339
|
-
} );
|
340
|
-
},
|
341
|
-
|
342
|
-
prepend: function() {
|
343
|
-
return domManip( this, arguments, function( elem ) {
|
344
|
-
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
345
|
-
var target = manipulationTarget( this, elem );
|
346
|
-
target.insertBefore( elem, target.firstChild );
|
347
|
-
}
|
348
|
-
} );
|
349
|
-
},
|
350
|
-
|
351
|
-
before: function() {
|
352
|
-
return domManip( this, arguments, function( elem ) {
|
353
|
-
if ( this.parentNode ) {
|
354
|
-
this.parentNode.insertBefore( elem, this );
|
355
|
-
}
|
356
|
-
} );
|
357
|
-
},
|
358
|
-
|
359
|
-
after: function() {
|
360
|
-
return domManip( this, arguments, function( elem ) {
|
361
|
-
if ( this.parentNode ) {
|
362
|
-
this.parentNode.insertBefore( elem, this.nextSibling );
|
363
|
-
}
|
364
|
-
} );
|
365
|
-
},
|
366
|
-
|
367
|
-
empty: function() {
|
368
|
-
var elem,
|
369
|
-
i = 0;
|
370
|
-
|
371
|
-
for ( ; ( elem = this[ i ] ) != null; i++ ) {
|
372
|
-
if ( elem.nodeType === 1 ) {
|
373
|
-
|
374
|
-
// Prevent memory leaks
|
375
|
-
jQuery.cleanData( getAll( elem, false ) );
|
376
|
-
|
377
|
-
// Remove any remaining nodes
|
378
|
-
elem.textContent = "";
|
379
|
-
}
|
380
|
-
}
|
381
|
-
|
382
|
-
return this;
|
383
|
-
},
|
384
|
-
|
385
|
-
clone: function( dataAndEvents, deepDataAndEvents ) {
|
386
|
-
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
387
|
-
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
388
|
-
|
389
|
-
return this.map( function() {
|
390
|
-
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
391
|
-
} );
|
392
|
-
},
|
393
|
-
|
394
|
-
html: function( value ) {
|
395
|
-
return access( this, function( value ) {
|
396
|
-
var elem = this[ 0 ] || {},
|
397
|
-
i = 0,
|
398
|
-
l = this.length;
|
399
|
-
|
400
|
-
if ( value === undefined && elem.nodeType === 1 ) {
|
401
|
-
return elem.innerHTML;
|
402
|
-
}
|
403
|
-
|
404
|
-
// See if we can take a shortcut and just use innerHTML
|
405
|
-
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
406
|
-
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
|
407
|
-
|
408
|
-
value = jQuery.htmlPrefilter( value );
|
409
|
-
|
410
|
-
try {
|
411
|
-
for ( ; i < l; i++ ) {
|
412
|
-
elem = this[ i ] || {};
|
413
|
-
|
414
|
-
// Remove element nodes and prevent memory leaks
|
415
|
-
if ( elem.nodeType === 1 ) {
|
416
|
-
jQuery.cleanData( getAll( elem, false ) );
|
417
|
-
elem.innerHTML = value;
|
418
|
-
}
|
419
|
-
}
|
420
|
-
|
421
|
-
elem = 0;
|
422
|
-
|
423
|
-
// If using innerHTML throws an exception, use the fallback method
|
424
|
-
} catch ( e ) {}
|
425
|
-
}
|
426
|
-
|
427
|
-
if ( elem ) {
|
428
|
-
this.empty().append( value );
|
429
|
-
}
|
430
|
-
}, null, value, arguments.length );
|
431
|
-
},
|
432
|
-
|
433
|
-
replaceWith: function() {
|
434
|
-
var ignored = [];
|
435
|
-
|
436
|
-
// Make the changes, replacing each non-ignored context element with the new content
|
437
|
-
return domManip( this, arguments, function( elem ) {
|
438
|
-
var parent = this.parentNode;
|
439
|
-
|
440
|
-
if ( jQuery.inArray( this, ignored ) < 0 ) {
|
441
|
-
jQuery.cleanData( getAll( this ) );
|
442
|
-
if ( parent ) {
|
443
|
-
parent.replaceChild( elem, this );
|
444
|
-
}
|
445
|
-
}
|
446
|
-
|
447
|
-
// Force callback invocation
|
448
|
-
}, ignored );
|
449
|
-
}
|
450
|
-
} );
|
451
|
-
|
452
|
-
jQuery.each( {
|
453
|
-
appendTo: "append",
|
454
|
-
prependTo: "prepend",
|
455
|
-
insertBefore: "before",
|
456
|
-
insertAfter: "after",
|
457
|
-
replaceAll: "replaceWith"
|
458
|
-
}, function( name, original ) {
|
459
|
-
jQuery.fn[ name ] = function( selector ) {
|
460
|
-
var elems,
|
461
|
-
ret = [],
|
462
|
-
insert = jQuery( selector ),
|
463
|
-
last = insert.length - 1,
|
464
|
-
i = 0;
|
465
|
-
|
466
|
-
for ( ; i <= last; i++ ) {
|
467
|
-
elems = i === last ? this : this.clone( true );
|
468
|
-
jQuery( insert[ i ] )[ original ]( elems );
|
469
|
-
|
470
|
-
// Support: Android <=4.0 only, PhantomJS 1 only
|
471
|
-
// .get() because push.apply(_, arraylike) throws on ancient WebKit
|
472
|
-
push.apply( ret, elems.get() );
|
473
|
-
}
|
474
|
-
|
475
|
-
return this.pushStack( ret );
|
476
|
-
};
|
477
|
-
} );
|
478
|
-
|
479
|
-
return jQuery;
|
480
|
-
} );
|
@@ -1,238 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"./core/access",
|
4
|
-
"./var/documentElement",
|
5
|
-
"./var/isFunction",
|
6
|
-
"./css/var/rnumnonpx",
|
7
|
-
"./css/curCSS",
|
8
|
-
"./css/addGetHookIf",
|
9
|
-
"./css/support",
|
10
|
-
"./var/isWindow",
|
11
|
-
"./core/init",
|
12
|
-
"./css",
|
13
|
-
"./selector" // contains
|
14
|
-
], function( jQuery, access, documentElement, isFunction, rnumnonpx,
|
15
|
-
curCSS, addGetHookIf, support, isWindow ) {
|
16
|
-
|
17
|
-
"use strict";
|
18
|
-
|
19
|
-
jQuery.offset = {
|
20
|
-
setOffset: function( elem, options, i ) {
|
21
|
-
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
22
|
-
position = jQuery.css( elem, "position" ),
|
23
|
-
curElem = jQuery( elem ),
|
24
|
-
props = {};
|
25
|
-
|
26
|
-
// Set position first, in-case top/left are set even on static elem
|
27
|
-
if ( position === "static" ) {
|
28
|
-
elem.style.position = "relative";
|
29
|
-
}
|
30
|
-
|
31
|
-
curOffset = curElem.offset();
|
32
|
-
curCSSTop = jQuery.css( elem, "top" );
|
33
|
-
curCSSLeft = jQuery.css( elem, "left" );
|
34
|
-
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
|
35
|
-
( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
|
36
|
-
|
37
|
-
// Need to be able to calculate position if either
|
38
|
-
// top or left is auto and position is either absolute or fixed
|
39
|
-
if ( calculatePosition ) {
|
40
|
-
curPosition = curElem.position();
|
41
|
-
curTop = curPosition.top;
|
42
|
-
curLeft = curPosition.left;
|
43
|
-
|
44
|
-
} else {
|
45
|
-
curTop = parseFloat( curCSSTop ) || 0;
|
46
|
-
curLeft = parseFloat( curCSSLeft ) || 0;
|
47
|
-
}
|
48
|
-
|
49
|
-
if ( isFunction( options ) ) {
|
50
|
-
|
51
|
-
// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
|
52
|
-
options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
|
53
|
-
}
|
54
|
-
|
55
|
-
if ( options.top != null ) {
|
56
|
-
props.top = ( options.top - curOffset.top ) + curTop;
|
57
|
-
}
|
58
|
-
if ( options.left != null ) {
|
59
|
-
props.left = ( options.left - curOffset.left ) + curLeft;
|
60
|
-
}
|
61
|
-
|
62
|
-
if ( "using" in options ) {
|
63
|
-
options.using.call( elem, props );
|
64
|
-
|
65
|
-
} else {
|
66
|
-
if ( typeof props.top === "number" ) {
|
67
|
-
props.top += "px";
|
68
|
-
}
|
69
|
-
if ( typeof props.left === "number" ) {
|
70
|
-
props.left += "px";
|
71
|
-
}
|
72
|
-
curElem.css( props );
|
73
|
-
}
|
74
|
-
}
|
75
|
-
};
|
76
|
-
|
77
|
-
jQuery.fn.extend( {
|
78
|
-
|
79
|
-
// offset() relates an element's border box to the document origin
|
80
|
-
offset: function( options ) {
|
81
|
-
|
82
|
-
// Preserve chaining for setter
|
83
|
-
if ( arguments.length ) {
|
84
|
-
return options === undefined ?
|
85
|
-
this :
|
86
|
-
this.each( function( i ) {
|
87
|
-
jQuery.offset.setOffset( this, options, i );
|
88
|
-
} );
|
89
|
-
}
|
90
|
-
|
91
|
-
var rect, win,
|
92
|
-
elem = this[ 0 ];
|
93
|
-
|
94
|
-
if ( !elem ) {
|
95
|
-
return;
|
96
|
-
}
|
97
|
-
|
98
|
-
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
|
99
|
-
// Support: IE <=11 only
|
100
|
-
// Running getBoundingClientRect on a
|
101
|
-
// disconnected node in IE throws an error
|
102
|
-
if ( !elem.getClientRects().length ) {
|
103
|
-
return { top: 0, left: 0 };
|
104
|
-
}
|
105
|
-
|
106
|
-
// Get document-relative position by adding viewport scroll to viewport-relative gBCR
|
107
|
-
rect = elem.getBoundingClientRect();
|
108
|
-
win = elem.ownerDocument.defaultView;
|
109
|
-
return {
|
110
|
-
top: rect.top + win.pageYOffset,
|
111
|
-
left: rect.left + win.pageXOffset
|
112
|
-
};
|
113
|
-
},
|
114
|
-
|
115
|
-
// position() relates an element's margin box to its offset parent's padding box
|
116
|
-
// This corresponds to the behavior of CSS absolute positioning
|
117
|
-
position: function() {
|
118
|
-
if ( !this[ 0 ] ) {
|
119
|
-
return;
|
120
|
-
}
|
121
|
-
|
122
|
-
var offsetParent, offset, doc,
|
123
|
-
elem = this[ 0 ],
|
124
|
-
parentOffset = { top: 0, left: 0 };
|
125
|
-
|
126
|
-
// position:fixed elements are offset from the viewport, which itself always has zero offset
|
127
|
-
if ( jQuery.css( elem, "position" ) === "fixed" ) {
|
128
|
-
|
129
|
-
// Assume position:fixed implies availability of getBoundingClientRect
|
130
|
-
offset = elem.getBoundingClientRect();
|
131
|
-
|
132
|
-
} else {
|
133
|
-
offset = this.offset();
|
134
|
-
|
135
|
-
// Account for the *real* offset parent, which can be the document or its root element
|
136
|
-
// when a statically positioned element is identified
|
137
|
-
doc = elem.ownerDocument;
|
138
|
-
offsetParent = elem.offsetParent || doc.documentElement;
|
139
|
-
while ( offsetParent &&
|
140
|
-
( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
|
141
|
-
jQuery.css( offsetParent, "position" ) === "static" ) {
|
142
|
-
|
143
|
-
offsetParent = offsetParent.parentNode;
|
144
|
-
}
|
145
|
-
if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
|
146
|
-
|
147
|
-
// Incorporate borders into its offset, since they are outside its content origin
|
148
|
-
parentOffset = jQuery( offsetParent ).offset();
|
149
|
-
parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
|
150
|
-
parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
|
151
|
-
}
|
152
|
-
}
|
153
|
-
|
154
|
-
// Subtract parent offsets and element margins
|
155
|
-
return {
|
156
|
-
top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
|
157
|
-
left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
|
158
|
-
};
|
159
|
-
},
|
160
|
-
|
161
|
-
// This method will return documentElement in the following cases:
|
162
|
-
// 1) For the element inside the iframe without offsetParent, this method will return
|
163
|
-
// documentElement of the parent window
|
164
|
-
// 2) For the hidden or detached element
|
165
|
-
// 3) For body or html element, i.e. in case of the html node - it will return itself
|
166
|
-
//
|
167
|
-
// but those exceptions were never presented as a real life use-cases
|
168
|
-
// and might be considered as more preferable results.
|
169
|
-
//
|
170
|
-
// This logic, however, is not guaranteed and can change at any point in the future
|
171
|
-
offsetParent: function() {
|
172
|
-
return this.map( function() {
|
173
|
-
var offsetParent = this.offsetParent;
|
174
|
-
|
175
|
-
while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
|
176
|
-
offsetParent = offsetParent.offsetParent;
|
177
|
-
}
|
178
|
-
|
179
|
-
return offsetParent || documentElement;
|
180
|
-
} );
|
181
|
-
}
|
182
|
-
} );
|
183
|
-
|
184
|
-
// Create scrollLeft and scrollTop methods
|
185
|
-
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
|
186
|
-
var top = "pageYOffset" === prop;
|
187
|
-
|
188
|
-
jQuery.fn[ method ] = function( val ) {
|
189
|
-
return access( this, function( elem, method, val ) {
|
190
|
-
|
191
|
-
// Coalesce documents and windows
|
192
|
-
var win;
|
193
|
-
if ( isWindow( elem ) ) {
|
194
|
-
win = elem;
|
195
|
-
} else if ( elem.nodeType === 9 ) {
|
196
|
-
win = elem.defaultView;
|
197
|
-
}
|
198
|
-
|
199
|
-
if ( val === undefined ) {
|
200
|
-
return win ? win[ prop ] : elem[ method ];
|
201
|
-
}
|
202
|
-
|
203
|
-
if ( win ) {
|
204
|
-
win.scrollTo(
|
205
|
-
!top ? val : win.pageXOffset,
|
206
|
-
top ? val : win.pageYOffset
|
207
|
-
);
|
208
|
-
|
209
|
-
} else {
|
210
|
-
elem[ method ] = val;
|
211
|
-
}
|
212
|
-
}, method, val, arguments.length );
|
213
|
-
};
|
214
|
-
} );
|
215
|
-
|
216
|
-
// Support: Safari <=7 - 9.1, Chrome <=37 - 49
|
217
|
-
// Add the top/left cssHooks using jQuery.fn.position
|
218
|
-
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
|
219
|
-
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
|
220
|
-
// getComputedStyle returns percent when specified for top/left/bottom/right;
|
221
|
-
// rather than make the css module depend on the offset module, just check for it here
|
222
|
-
jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
223
|
-
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
224
|
-
function( elem, computed ) {
|
225
|
-
if ( computed ) {
|
226
|
-
computed = curCSS( elem, prop );
|
227
|
-
|
228
|
-
// If curCSS returns percentage, fallback to offset
|
229
|
-
return rnumnonpx.test( computed ) ?
|
230
|
-
jQuery( elem ).position()[ prop ] + "px" :
|
231
|
-
computed;
|
232
|
-
}
|
233
|
-
}
|
234
|
-
);
|
235
|
-
} );
|
236
|
-
|
237
|
-
return jQuery;
|
238
|
-
} );
|