trusty-cms 4.3.4 → 5.0.0
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 +22 -12
- data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
- data/app/controllers/admin/assets_controller.rb +5 -1
- data/app/models/asset.rb +39 -48
- data/app/models/asset_type.rb +6 -2
- data/app/views/admin/assets/edit.html.haml +5 -3
- data/config/database.yml +2 -2
- data/config/locales/en.yml +1 -0
- data/coverage/index.html +1 -1
- data/lib/trusty_cms/deprecation.rb +13 -0
- data/lib/trusty_cms.rb +1 -1
- data/node_modules/path-parse/index.js +17 -35
- data/node_modules/path-parse/package.json +1 -1
- data/node_modules/postcss/CHANGELOG.md +27 -0
- data/node_modules/postcss/README.md +21 -0
- data/node_modules/postcss/lib/at-rule.js +2 -4
- data/node_modules/postcss/lib/comment.js +2 -4
- data/node_modules/postcss/lib/container.js +27 -122
- data/node_modules/postcss/lib/css-syntax-error.js +5 -7
- data/node_modules/postcss/lib/declaration.js +2 -4
- data/node_modules/postcss/lib/input.js +3 -5
- data/node_modules/postcss/lib/lazy-result.js +10 -17
- data/node_modules/postcss/lib/map-generator.js +10 -17
- data/node_modules/postcss/lib/node.js +2 -4
- data/node_modules/postcss/lib/parser.js +2 -4
- data/node_modules/postcss/lib/postcss.d.ts +25 -19
- data/node_modules/postcss/lib/previous-map.js +17 -6
- data/node_modules/postcss/lib/processor.js +16 -15
- data/node_modules/postcss/lib/result.js +2 -4
- data/node_modules/postcss/lib/root.js +10 -17
- data/node_modules/postcss/lib/rule.js +2 -4
- data/node_modules/postcss/lib/stringifier.js +2 -4
- data/node_modules/postcss/lib/warning.js +2 -4
- data/node_modules/postcss/package.json +16 -12
- data/spec/dummy/log/test.log +542 -443
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
- data/trusty_cms.gemspec +2 -1
- data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
- metadata +31 -307
- data/config/initializers/interpolation.rb +0 -6
- data/node_modules/path-parse/test.js +0 -77
- data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
- data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
- data/node_modules/postcss/docs/api/index.html +0 -22716
- data/spec/dummy/log/development.log +0 -158
- data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
- data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
- data/spec/dummy/node_modules/jquery/README.md +0 -62
- data/spec/dummy/node_modules/jquery/bower.json +0 -14
- data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
- data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
- data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/spec/dummy/node_modules/jquery/package.json +0 -117
- data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
- data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
- data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
- data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
- data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
- data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
- data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
- data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
- data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
- data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
- data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
- data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
- data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
- data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
- data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
- data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
- data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
- data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
- data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
- data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
- data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
- data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
- data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
- data/spec/dummy/node_modules/jquery/src/core.js +0 -400
- data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
- data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
- data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
- data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
- data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
- data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
- data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
- data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
- data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css.js +0 -494
- data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
- data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
- data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data.js +0 -180
- data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
- data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
- data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
- data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
- data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
- data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
- data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
- data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
- data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
- data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
- data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
- data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
- data/spec/dummy/node_modules/jquery/src/event.js +0 -892
- data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
- data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
- data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
- data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
- data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
- data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
- data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
- data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
- data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
- data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
- data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
- data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
- data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
- data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
- data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
- data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
- data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
- data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
- data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
- data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
- data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
- data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
- data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
- data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
- data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
- data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
- data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
- data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
- data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
- data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
- data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
- data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -1,24 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../queue",
|
4
|
-
"../effects" // Delay is optional because of this dependency
|
5
|
-
], function( jQuery ) {
|
6
|
-
|
7
|
-
"use strict";
|
8
|
-
|
9
|
-
// Based off of the plugin by Clint Helfers, with permission.
|
10
|
-
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
|
11
|
-
jQuery.fn.delay = function( time, type ) {
|
12
|
-
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
13
|
-
type = type || "fx";
|
14
|
-
|
15
|
-
return this.queue( type, function( next, hooks ) {
|
16
|
-
var timeout = window.setTimeout( next, time );
|
17
|
-
hooks.stop = function() {
|
18
|
-
window.clearTimeout( timeout );
|
19
|
-
};
|
20
|
-
} );
|
21
|
-
};
|
22
|
-
|
23
|
-
return jQuery.fn.delay;
|
24
|
-
} );
|
@@ -1,145 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"./data/var/dataPriv",
|
4
|
-
"./deferred",
|
5
|
-
"./callbacks"
|
6
|
-
], function( jQuery, dataPriv ) {
|
7
|
-
|
8
|
-
"use strict";
|
9
|
-
|
10
|
-
jQuery.extend( {
|
11
|
-
queue: function( elem, type, data ) {
|
12
|
-
var queue;
|
13
|
-
|
14
|
-
if ( elem ) {
|
15
|
-
type = ( type || "fx" ) + "queue";
|
16
|
-
queue = dataPriv.get( elem, type );
|
17
|
-
|
18
|
-
// Speed up dequeue by getting out quickly if this is just a lookup
|
19
|
-
if ( data ) {
|
20
|
-
if ( !queue || Array.isArray( data ) ) {
|
21
|
-
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
22
|
-
} else {
|
23
|
-
queue.push( data );
|
24
|
-
}
|
25
|
-
}
|
26
|
-
return queue || [];
|
27
|
-
}
|
28
|
-
},
|
29
|
-
|
30
|
-
dequeue: function( elem, type ) {
|
31
|
-
type = type || "fx";
|
32
|
-
|
33
|
-
var queue = jQuery.queue( elem, type ),
|
34
|
-
startLength = queue.length,
|
35
|
-
fn = queue.shift(),
|
36
|
-
hooks = jQuery._queueHooks( elem, type ),
|
37
|
-
next = function() {
|
38
|
-
jQuery.dequeue( elem, type );
|
39
|
-
};
|
40
|
-
|
41
|
-
// If the fx queue is dequeued, always remove the progress sentinel
|
42
|
-
if ( fn === "inprogress" ) {
|
43
|
-
fn = queue.shift();
|
44
|
-
startLength--;
|
45
|
-
}
|
46
|
-
|
47
|
-
if ( fn ) {
|
48
|
-
|
49
|
-
// Add a progress sentinel to prevent the fx queue from being
|
50
|
-
// automatically dequeued
|
51
|
-
if ( type === "fx" ) {
|
52
|
-
queue.unshift( "inprogress" );
|
53
|
-
}
|
54
|
-
|
55
|
-
// Clear up the last queue stop function
|
56
|
-
delete hooks.stop;
|
57
|
-
fn.call( elem, next, hooks );
|
58
|
-
}
|
59
|
-
|
60
|
-
if ( !startLength && hooks ) {
|
61
|
-
hooks.empty.fire();
|
62
|
-
}
|
63
|
-
},
|
64
|
-
|
65
|
-
// Not public - generate a queueHooks object, or return the current one
|
66
|
-
_queueHooks: function( elem, type ) {
|
67
|
-
var key = type + "queueHooks";
|
68
|
-
return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
|
69
|
-
empty: jQuery.Callbacks( "once memory" ).add( function() {
|
70
|
-
dataPriv.remove( elem, [ type + "queue", key ] );
|
71
|
-
} )
|
72
|
-
} );
|
73
|
-
}
|
74
|
-
} );
|
75
|
-
|
76
|
-
jQuery.fn.extend( {
|
77
|
-
queue: function( type, data ) {
|
78
|
-
var setter = 2;
|
79
|
-
|
80
|
-
if ( typeof type !== "string" ) {
|
81
|
-
data = type;
|
82
|
-
type = "fx";
|
83
|
-
setter--;
|
84
|
-
}
|
85
|
-
|
86
|
-
if ( arguments.length < setter ) {
|
87
|
-
return jQuery.queue( this[ 0 ], type );
|
88
|
-
}
|
89
|
-
|
90
|
-
return data === undefined ?
|
91
|
-
this :
|
92
|
-
this.each( function() {
|
93
|
-
var queue = jQuery.queue( this, type, data );
|
94
|
-
|
95
|
-
// Ensure a hooks for this queue
|
96
|
-
jQuery._queueHooks( this, type );
|
97
|
-
|
98
|
-
if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
|
99
|
-
jQuery.dequeue( this, type );
|
100
|
-
}
|
101
|
-
} );
|
102
|
-
},
|
103
|
-
dequeue: function( type ) {
|
104
|
-
return this.each( function() {
|
105
|
-
jQuery.dequeue( this, type );
|
106
|
-
} );
|
107
|
-
},
|
108
|
-
clearQueue: function( type ) {
|
109
|
-
return this.queue( type || "fx", [] );
|
110
|
-
},
|
111
|
-
|
112
|
-
// Get a promise resolved when queues of a certain type
|
113
|
-
// are emptied (fx is the type by default)
|
114
|
-
promise: function( type, obj ) {
|
115
|
-
var tmp,
|
116
|
-
count = 1,
|
117
|
-
defer = jQuery.Deferred(),
|
118
|
-
elements = this,
|
119
|
-
i = this.length,
|
120
|
-
resolve = function() {
|
121
|
-
if ( !( --count ) ) {
|
122
|
-
defer.resolveWith( elements, [ elements ] );
|
123
|
-
}
|
124
|
-
};
|
125
|
-
|
126
|
-
if ( typeof type !== "string" ) {
|
127
|
-
obj = type;
|
128
|
-
type = undefined;
|
129
|
-
}
|
130
|
-
type = type || "fx";
|
131
|
-
|
132
|
-
while ( i-- ) {
|
133
|
-
tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
|
134
|
-
if ( tmp && tmp.empty ) {
|
135
|
-
count++;
|
136
|
-
tmp.empty.add( resolve );
|
137
|
-
}
|
138
|
-
}
|
139
|
-
resolve();
|
140
|
-
return defer.promise( obj );
|
141
|
-
}
|
142
|
-
} );
|
143
|
-
|
144
|
-
return jQuery;
|
145
|
-
} );
|
@@ -1,241 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"./var/document",
|
4
|
-
"./var/documentElement",
|
5
|
-
"./var/hasOwn",
|
6
|
-
"./var/indexOf"
|
7
|
-
], function( jQuery, document, documentElement, hasOwn, indexOf ) {
|
8
|
-
|
9
|
-
"use strict";
|
10
|
-
|
11
|
-
/*
|
12
|
-
* Optional (non-Sizzle) selector module for custom builds.
|
13
|
-
*
|
14
|
-
* Note that this DOES NOT SUPPORT many documented jQuery
|
15
|
-
* features in exchange for its smaller size:
|
16
|
-
*
|
17
|
-
* Attribute not equal selector
|
18
|
-
* Positional selectors (:first; :eq(n); :odd; etc.)
|
19
|
-
* Type selectors (:input; :checkbox; :button; etc.)
|
20
|
-
* State-based selectors (:animated; :visible; :hidden; etc.)
|
21
|
-
* :has(selector)
|
22
|
-
* :not(complex selector)
|
23
|
-
* custom selectors via Sizzle extensions
|
24
|
-
* Leading combinators (e.g., $collection.find("> *"))
|
25
|
-
* Reliable functionality on XML fragments
|
26
|
-
* Requiring all parts of a selector to match elements under context
|
27
|
-
* (e.g., $div.find("div > *") now matches children of $div)
|
28
|
-
* Matching against non-elements
|
29
|
-
* Reliable sorting of disconnected nodes
|
30
|
-
* querySelectorAll bug fixes (e.g., unreliable :focus on WebKit)
|
31
|
-
*
|
32
|
-
* If any of these are unacceptable tradeoffs, either use Sizzle or
|
33
|
-
* customize this stub for the project's specific needs.
|
34
|
-
*/
|
35
|
-
|
36
|
-
var hasDuplicate, sortInput,
|
37
|
-
rhtmlSuffix = /HTML$/i,
|
38
|
-
sortStable = jQuery.expando.split( "" ).sort( sortOrder ).join( "" ) === jQuery.expando,
|
39
|
-
matches = documentElement.matches ||
|
40
|
-
documentElement.webkitMatchesSelector ||
|
41
|
-
documentElement.mozMatchesSelector ||
|
42
|
-
documentElement.oMatchesSelector ||
|
43
|
-
documentElement.msMatchesSelector,
|
44
|
-
|
45
|
-
// CSS string/identifier serialization
|
46
|
-
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
47
|
-
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
|
48
|
-
fcssescape = function( ch, asCodePoint ) {
|
49
|
-
if ( asCodePoint ) {
|
50
|
-
|
51
|
-
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
52
|
-
if ( ch === "\0" ) {
|
53
|
-
return "\uFFFD";
|
54
|
-
}
|
55
|
-
|
56
|
-
// Control characters and (dependent upon position) numbers get escaped as code points
|
57
|
-
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
58
|
-
}
|
59
|
-
|
60
|
-
// Other potentially-special ASCII characters get backslash-escaped
|
61
|
-
return "\\" + ch;
|
62
|
-
};
|
63
|
-
|
64
|
-
function sortOrder( a, b ) {
|
65
|
-
|
66
|
-
// Flag for duplicate removal
|
67
|
-
if ( a === b ) {
|
68
|
-
hasDuplicate = true;
|
69
|
-
return 0;
|
70
|
-
}
|
71
|
-
|
72
|
-
// Sort on method existence if only one input has compareDocumentPosition
|
73
|
-
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
|
74
|
-
if ( compare ) {
|
75
|
-
return compare;
|
76
|
-
}
|
77
|
-
|
78
|
-
// Calculate position if both inputs belong to the same document
|
79
|
-
compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
|
80
|
-
a.compareDocumentPosition( b ) :
|
81
|
-
|
82
|
-
// Otherwise we know they are disconnected
|
83
|
-
1;
|
84
|
-
|
85
|
-
// Disconnected nodes
|
86
|
-
if ( compare & 1 ) {
|
87
|
-
|
88
|
-
// Choose the first element that is related to our preferred document
|
89
|
-
if ( a === document || a.ownerDocument === document &&
|
90
|
-
jQuery.contains( document, a ) ) {
|
91
|
-
return -1;
|
92
|
-
}
|
93
|
-
if ( b === document || b.ownerDocument === document &&
|
94
|
-
jQuery.contains( document, b ) ) {
|
95
|
-
return 1;
|
96
|
-
}
|
97
|
-
|
98
|
-
// Maintain original order
|
99
|
-
return sortInput ?
|
100
|
-
( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
|
101
|
-
0;
|
102
|
-
}
|
103
|
-
|
104
|
-
return compare & 4 ? -1 : 1;
|
105
|
-
}
|
106
|
-
|
107
|
-
function uniqueSort( results ) {
|
108
|
-
var elem,
|
109
|
-
duplicates = [],
|
110
|
-
j = 0,
|
111
|
-
i = 0;
|
112
|
-
|
113
|
-
hasDuplicate = false;
|
114
|
-
sortInput = !sortStable && results.slice( 0 );
|
115
|
-
results.sort( sortOrder );
|
116
|
-
|
117
|
-
if ( hasDuplicate ) {
|
118
|
-
while ( ( elem = results[ i++ ] ) ) {
|
119
|
-
if ( elem === results[ i ] ) {
|
120
|
-
j = duplicates.push( i );
|
121
|
-
}
|
122
|
-
}
|
123
|
-
while ( j-- ) {
|
124
|
-
results.splice( duplicates[ j ], 1 );
|
125
|
-
}
|
126
|
-
}
|
127
|
-
|
128
|
-
// Clear input after sorting to release objects
|
129
|
-
// See https://github.com/jquery/sizzle/pull/225
|
130
|
-
sortInput = null;
|
131
|
-
|
132
|
-
return results;
|
133
|
-
}
|
134
|
-
|
135
|
-
function escape( sel ) {
|
136
|
-
return ( sel + "" ).replace( rcssescape, fcssescape );
|
137
|
-
}
|
138
|
-
|
139
|
-
jQuery.extend( {
|
140
|
-
uniqueSort: uniqueSort,
|
141
|
-
unique: uniqueSort,
|
142
|
-
escapeSelector: escape,
|
143
|
-
find: function( selector, context, results, seed ) {
|
144
|
-
var elem, nodeType,
|
145
|
-
i = 0;
|
146
|
-
|
147
|
-
results = results || [];
|
148
|
-
context = context || document;
|
149
|
-
|
150
|
-
// Same basic safeguard as Sizzle
|
151
|
-
if ( !selector || typeof selector !== "string" ) {
|
152
|
-
return results;
|
153
|
-
}
|
154
|
-
|
155
|
-
// Early return if context is not an element or document
|
156
|
-
if ( ( nodeType = context.nodeType ) !== 1 && nodeType !== 9 ) {
|
157
|
-
return [];
|
158
|
-
}
|
159
|
-
|
160
|
-
if ( seed ) {
|
161
|
-
while ( ( elem = seed[ i++ ] ) ) {
|
162
|
-
if ( jQuery.find.matchesSelector( elem, selector ) ) {
|
163
|
-
results.push( elem );
|
164
|
-
}
|
165
|
-
}
|
166
|
-
} else {
|
167
|
-
jQuery.merge( results, context.querySelectorAll( selector ) );
|
168
|
-
}
|
169
|
-
|
170
|
-
return results;
|
171
|
-
},
|
172
|
-
text: function( elem ) {
|
173
|
-
var node,
|
174
|
-
ret = "",
|
175
|
-
i = 0,
|
176
|
-
nodeType = elem.nodeType;
|
177
|
-
|
178
|
-
if ( !nodeType ) {
|
179
|
-
|
180
|
-
// If no nodeType, this is expected to be an array
|
181
|
-
while ( ( node = elem[ i++ ] ) ) {
|
182
|
-
|
183
|
-
// Do not traverse comment nodes
|
184
|
-
ret += jQuery.text( node );
|
185
|
-
}
|
186
|
-
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
187
|
-
|
188
|
-
// Use textContent for elements
|
189
|
-
return elem.textContent;
|
190
|
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
191
|
-
return elem.nodeValue;
|
192
|
-
}
|
193
|
-
|
194
|
-
// Do not include comment or processing instruction nodes
|
195
|
-
|
196
|
-
return ret;
|
197
|
-
},
|
198
|
-
contains: function( a, b ) {
|
199
|
-
var adown = a.nodeType === 9 ? a.documentElement : a,
|
200
|
-
bup = b && b.parentNode;
|
201
|
-
return a === bup || !!( bup && bup.nodeType === 1 && adown.contains( bup ) );
|
202
|
-
},
|
203
|
-
isXMLDoc: function( elem ) {
|
204
|
-
var namespace = elem.namespaceURI,
|
205
|
-
documentElement = ( elem.ownerDocument || elem ).documentElement;
|
206
|
-
|
207
|
-
// Assume HTML when documentElement doesn't yet exist, such as inside
|
208
|
-
// document fragments.
|
209
|
-
return !rhtmlSuffix.test( namespace ||
|
210
|
-
documentElement && documentElement.nodeName ||
|
211
|
-
"HTML" );
|
212
|
-
},
|
213
|
-
expr: {
|
214
|
-
attrHandle: {},
|
215
|
-
match: {
|
216
|
-
bool: new RegExp( "^(?:checked|selected|async|autofocus|autoplay|controls|defer" +
|
217
|
-
"|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", "i" ),
|
218
|
-
needsContext: /^[\x20\t\r\n\f]*[>+~]/
|
219
|
-
}
|
220
|
-
}
|
221
|
-
} );
|
222
|
-
|
223
|
-
jQuery.extend( jQuery.find, {
|
224
|
-
matches: function( expr, elements ) {
|
225
|
-
return jQuery.find( expr, null, null, elements );
|
226
|
-
},
|
227
|
-
matchesSelector: function( elem, expr ) {
|
228
|
-
return matches.call( elem, expr );
|
229
|
-
},
|
230
|
-
attr: function( elem, name ) {
|
231
|
-
var fn = jQuery.expr.attrHandle[ name.toLowerCase() ],
|
232
|
-
|
233
|
-
// Don't get fooled by Object.prototype properties (jQuery #13807)
|
234
|
-
value = fn && hasOwn.call( jQuery.expr.attrHandle, name.toLowerCase() ) ?
|
235
|
-
fn( elem, name, jQuery.isXMLDoc( elem ) ) :
|
236
|
-
undefined;
|
237
|
-
return value !== undefined ? value : elem.getAttribute( name );
|
238
|
-
}
|
239
|
-
} );
|
240
|
-
|
241
|
-
} );
|
@@ -1,19 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"../external/sizzle/dist/sizzle"
|
4
|
-
], function( jQuery, Sizzle ) {
|
5
|
-
|
6
|
-
"use strict";
|
7
|
-
|
8
|
-
jQuery.find = Sizzle;
|
9
|
-
jQuery.expr = Sizzle.selectors;
|
10
|
-
|
11
|
-
// Deprecated
|
12
|
-
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
13
|
-
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
|
14
|
-
jQuery.text = Sizzle.getText;
|
15
|
-
jQuery.isXMLDoc = Sizzle.isXML;
|
16
|
-
jQuery.contains = Sizzle.contains;
|
17
|
-
jQuery.escapeSelector = Sizzle.escape;
|
18
|
-
|
19
|
-
} );
|
@@ -1,136 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./core",
|
3
|
-
"./core/toType",
|
4
|
-
"./var/rcheckableType",
|
5
|
-
"./var/isFunction",
|
6
|
-
"./core/init",
|
7
|
-
"./traversing", // filter
|
8
|
-
"./attributes/prop"
|
9
|
-
], function( jQuery, toType, rcheckableType, isFunction ) {
|
10
|
-
|
11
|
-
"use strict";
|
12
|
-
|
13
|
-
var
|
14
|
-
rbracket = /\[\]$/,
|
15
|
-
rCRLF = /\r?\n/g,
|
16
|
-
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
|
17
|
-
rsubmittable = /^(?:input|select|textarea|keygen)/i;
|
18
|
-
|
19
|
-
function buildParams( prefix, obj, traditional, add ) {
|
20
|
-
var name;
|
21
|
-
|
22
|
-
if ( Array.isArray( obj ) ) {
|
23
|
-
|
24
|
-
// Serialize array item.
|
25
|
-
jQuery.each( obj, function( i, v ) {
|
26
|
-
if ( traditional || rbracket.test( prefix ) ) {
|
27
|
-
|
28
|
-
// Treat each array item as a scalar.
|
29
|
-
add( prefix, v );
|
30
|
-
|
31
|
-
} else {
|
32
|
-
|
33
|
-
// Item is non-scalar (array or object), encode its numeric index.
|
34
|
-
buildParams(
|
35
|
-
prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
|
36
|
-
v,
|
37
|
-
traditional,
|
38
|
-
add
|
39
|
-
);
|
40
|
-
}
|
41
|
-
} );
|
42
|
-
|
43
|
-
} else if ( !traditional && toType( obj ) === "object" ) {
|
44
|
-
|
45
|
-
// Serialize object item.
|
46
|
-
for ( name in obj ) {
|
47
|
-
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
48
|
-
}
|
49
|
-
|
50
|
-
} else {
|
51
|
-
|
52
|
-
// Serialize scalar item.
|
53
|
-
add( prefix, obj );
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
// Serialize an array of form elements or a set of
|
58
|
-
// key/values into a query string
|
59
|
-
jQuery.param = function( a, traditional ) {
|
60
|
-
var prefix,
|
61
|
-
s = [],
|
62
|
-
add = function( key, valueOrFunction ) {
|
63
|
-
|
64
|
-
// If value is a function, invoke it and use its return value
|
65
|
-
var value = isFunction( valueOrFunction ) ?
|
66
|
-
valueOrFunction() :
|
67
|
-
valueOrFunction;
|
68
|
-
|
69
|
-
s[ s.length ] = encodeURIComponent( key ) + "=" +
|
70
|
-
encodeURIComponent( value == null ? "" : value );
|
71
|
-
};
|
72
|
-
|
73
|
-
if ( a == null ) {
|
74
|
-
return "";
|
75
|
-
}
|
76
|
-
|
77
|
-
// If an array was passed in, assume that it is an array of form elements.
|
78
|
-
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
79
|
-
|
80
|
-
// Serialize the form elements
|
81
|
-
jQuery.each( a, function() {
|
82
|
-
add( this.name, this.value );
|
83
|
-
} );
|
84
|
-
|
85
|
-
} else {
|
86
|
-
|
87
|
-
// If traditional, encode the "old" way (the way 1.3.2 or older
|
88
|
-
// did it), otherwise encode params recursively.
|
89
|
-
for ( prefix in a ) {
|
90
|
-
buildParams( prefix, a[ prefix ], traditional, add );
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
// Return the resulting serialization
|
95
|
-
return s.join( "&" );
|
96
|
-
};
|
97
|
-
|
98
|
-
jQuery.fn.extend( {
|
99
|
-
serialize: function() {
|
100
|
-
return jQuery.param( this.serializeArray() );
|
101
|
-
},
|
102
|
-
serializeArray: function() {
|
103
|
-
return this.map( function() {
|
104
|
-
|
105
|
-
// Can add propHook for "elements" to filter or add form elements
|
106
|
-
var elements = jQuery.prop( this, "elements" );
|
107
|
-
return elements ? jQuery.makeArray( elements ) : this;
|
108
|
-
} )
|
109
|
-
.filter( function() {
|
110
|
-
var type = this.type;
|
111
|
-
|
112
|
-
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
113
|
-
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
114
|
-
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
115
|
-
( this.checked || !rcheckableType.test( type ) );
|
116
|
-
} )
|
117
|
-
.map( function( _i, elem ) {
|
118
|
-
var val = jQuery( this ).val();
|
119
|
-
|
120
|
-
if ( val == null ) {
|
121
|
-
return null;
|
122
|
-
}
|
123
|
-
|
124
|
-
if ( Array.isArray( val ) ) {
|
125
|
-
return jQuery.map( val, function( val ) {
|
126
|
-
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
127
|
-
} );
|
128
|
-
}
|
129
|
-
|
130
|
-
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
131
|
-
} ).get();
|
132
|
-
}
|
133
|
-
} );
|
134
|
-
|
135
|
-
return jQuery;
|
136
|
-
} );
|
@@ -1,97 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../var/indexOf",
|
4
|
-
"../var/isFunction",
|
5
|
-
"./var/rneedsContext",
|
6
|
-
"../selector"
|
7
|
-
], function( jQuery, indexOf, isFunction, rneedsContext ) {
|
8
|
-
|
9
|
-
"use strict";
|
10
|
-
|
11
|
-
// Implement the identical functionality for filter and not
|
12
|
-
function winnow( elements, qualifier, not ) {
|
13
|
-
if ( isFunction( qualifier ) ) {
|
14
|
-
return jQuery.grep( elements, function( elem, i ) {
|
15
|
-
return !!qualifier.call( elem, i, elem ) !== not;
|
16
|
-
} );
|
17
|
-
}
|
18
|
-
|
19
|
-
// Single element
|
20
|
-
if ( qualifier.nodeType ) {
|
21
|
-
return jQuery.grep( elements, function( elem ) {
|
22
|
-
return ( elem === qualifier ) !== not;
|
23
|
-
} );
|
24
|
-
}
|
25
|
-
|
26
|
-
// Arraylike of elements (jQuery, arguments, Array)
|
27
|
-
if ( typeof qualifier !== "string" ) {
|
28
|
-
return jQuery.grep( elements, function( elem ) {
|
29
|
-
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
30
|
-
} );
|
31
|
-
}
|
32
|
-
|
33
|
-
// Filtered directly for both simple and complex selectors
|
34
|
-
return jQuery.filter( qualifier, elements, not );
|
35
|
-
}
|
36
|
-
|
37
|
-
jQuery.filter = function( expr, elems, not ) {
|
38
|
-
var elem = elems[ 0 ];
|
39
|
-
|
40
|
-
if ( not ) {
|
41
|
-
expr = ":not(" + expr + ")";
|
42
|
-
}
|
43
|
-
|
44
|
-
if ( elems.length === 1 && elem.nodeType === 1 ) {
|
45
|
-
return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
|
46
|
-
}
|
47
|
-
|
48
|
-
return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
49
|
-
return elem.nodeType === 1;
|
50
|
-
} ) );
|
51
|
-
};
|
52
|
-
|
53
|
-
jQuery.fn.extend( {
|
54
|
-
find: function( selector ) {
|
55
|
-
var i, ret,
|
56
|
-
len = this.length,
|
57
|
-
self = this;
|
58
|
-
|
59
|
-
if ( typeof selector !== "string" ) {
|
60
|
-
return this.pushStack( jQuery( selector ).filter( function() {
|
61
|
-
for ( i = 0; i < len; i++ ) {
|
62
|
-
if ( jQuery.contains( self[ i ], this ) ) {
|
63
|
-
return true;
|
64
|
-
}
|
65
|
-
}
|
66
|
-
} ) );
|
67
|
-
}
|
68
|
-
|
69
|
-
ret = this.pushStack( [] );
|
70
|
-
|
71
|
-
for ( i = 0; i < len; i++ ) {
|
72
|
-
jQuery.find( selector, self[ i ], ret );
|
73
|
-
}
|
74
|
-
|
75
|
-
return len > 1 ? jQuery.uniqueSort( ret ) : ret;
|
76
|
-
},
|
77
|
-
filter: function( selector ) {
|
78
|
-
return this.pushStack( winnow( this, selector || [], false ) );
|
79
|
-
},
|
80
|
-
not: function( selector ) {
|
81
|
-
return this.pushStack( winnow( this, selector || [], true ) );
|
82
|
-
},
|
83
|
-
is: function( selector ) {
|
84
|
-
return !!winnow(
|
85
|
-
this,
|
86
|
-
|
87
|
-
// If this is a positional/relative selector, check membership in the returned set
|
88
|
-
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
89
|
-
typeof selector === "string" && rneedsContext.test( selector ) ?
|
90
|
-
jQuery( selector ) :
|
91
|
-
selector || [],
|
92
|
-
false
|
93
|
-
).length;
|
94
|
-
}
|
95
|
-
} );
|
96
|
-
|
97
|
-
} );
|
@@ -1,22 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../../core"
|
3
|
-
], function( jQuery ) {
|
4
|
-
|
5
|
-
"use strict";
|
6
|
-
|
7
|
-
return function( elem, dir, until ) {
|
8
|
-
var matched = [],
|
9
|
-
truncate = until !== undefined;
|
10
|
-
|
11
|
-
while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
|
12
|
-
if ( elem.nodeType === 1 ) {
|
13
|
-
if ( truncate && jQuery( elem ).is( until ) ) {
|
14
|
-
break;
|
15
|
-
}
|
16
|
-
matched.push( elem );
|
17
|
-
}
|
18
|
-
}
|
19
|
-
return matched;
|
20
|
-
};
|
21
|
-
|
22
|
-
} );
|