trusty-cms 4.2.2 → 4.3.2
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 +98 -89
- data/app/assets/config/trusty-cms/manifest.js +7 -0
- data/app/assets/javascripts/admin/custom_file_upload.js +7 -0
- data/app/controllers/admin/assets_controller.rb +1 -1
- data/app/models/page.rb +2 -2
- data/app/views/admin/assets/new.html.haml +2 -0
- data/config/database.yml +4 -0
- data/config/initializers/assets.rb +0 -4
- data/coverage/index.html +155 -155
- data/lib/trusty_cms.rb +1 -1
- data/node_modules/hosted-git-info/CHANGELOG.md +10 -0
- data/node_modules/hosted-git-info/index.js +2 -2
- data/node_modules/hosted-git-info/package.json +1 -1
- data/node_modules/lodash/README.md +2 -2
- data/node_modules/lodash/_baseClone.js +2 -1
- data/node_modules/lodash/_baseOrderBy.js +17 -2
- data/node_modules/lodash/_baseSet.js +4 -0
- data/node_modules/lodash/_baseSortedIndexBy.js +7 -4
- data/node_modules/lodash/_baseTrim.js +19 -0
- data/node_modules/lodash/_equalArrays.js +5 -4
- data/node_modules/lodash/_equalObjects.js +5 -4
- data/node_modules/lodash/_trimmedEndIndex.js +19 -0
- data/node_modules/lodash/core.js +48 -6
- data/node_modules/lodash/core.min.js +9 -9
- data/node_modules/lodash/filter.js +4 -0
- data/node_modules/lodash/flake.lock +40 -0
- data/node_modules/lodash/flake.nix +20 -0
- data/node_modules/lodash/lodash.js +59 -11
- data/node_modules/lodash/lodash.min.js +126 -125
- data/node_modules/lodash/matches.js +7 -0
- data/node_modules/lodash/matchesProperty.js +7 -0
- data/node_modules/lodash/overEvery.js +4 -0
- data/node_modules/lodash/overSome.js +7 -0
- data/node_modules/lodash/package.json +1 -1
- data/node_modules/lodash/parseInt.js +1 -1
- data/node_modules/lodash/release.md +48 -0
- data/node_modules/lodash/sortBy.js +3 -3
- data/node_modules/lodash/template.js +24 -5
- data/node_modules/lodash/toNumber.js +3 -5
- data/node_modules/lodash/trim.js +2 -4
- data/node_modules/lodash/trimEnd.js +3 -5
- data/node_modules/lodash/trimStart.js +1 -1
- data/spec/dummy/log/development.log +9 -163
- data/spec/dummy/log/test.log +536 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +333 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +43 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +11008 -0
- 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 +559 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +1312 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +18706 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +7 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +13 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +886 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +5 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +443 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +5 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/package.json +33 -0
- data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +109 -0
- data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +20 -0
- data/spec/dummy/node_modules/jquery-ujs/README.md +86 -0
- data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +23 -0
- data/spec/dummy/node_modules/jquery-ujs/bower.json +19 -0
- data/spec/dummy/node_modules/jquery-ujs/package.json +26 -0
- data/spec/dummy/node_modules/jquery-ujs/src/rails.js +555 -0
- data/spec/dummy/node_modules/jquery/AUTHORS.txt +327 -0
- data/spec/dummy/node_modules/jquery/LICENSE.txt +20 -0
- data/spec/dummy/node_modules/jquery/README.md +62 -0
- data/spec/dummy/node_modules/jquery/bower.json +14 -0
- data/spec/dummy/node_modules/jquery/dist/jquery.js +10872 -0
- data/spec/dummy/node_modules/jquery/dist/jquery.min.js +2 -0
- data/spec/dummy/node_modules/jquery/dist/jquery.min.map +1 -0
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +8777 -0
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +2 -0
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +1 -0
- data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +2478 -0
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/spec/dummy/node_modules/jquery/package.json +117 -0
- data/spec/dummy/node_modules/jquery/src/ajax.js +873 -0
- data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +103 -0
- data/spec/dummy/node_modules/jquery/src/ajax/load.js +77 -0
- data/spec/dummy/node_modules/jquery/src/ajax/script.js +74 -0
- data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +5 -0
- data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +5 -0
- data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +5 -0
- data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +170 -0
- data/spec/dummy/node_modules/jquery/src/attributes.js +13 -0
- data/spec/dummy/node_modules/jquery/src/attributes/attr.js +141 -0
- data/spec/dummy/node_modules/jquery/src/attributes/classes.js +186 -0
- data/spec/dummy/node_modules/jquery/src/attributes/prop.js +143 -0
- data/spec/dummy/node_modules/jquery/src/attributes/support.js +33 -0
- data/spec/dummy/node_modules/jquery/src/attributes/val.js +191 -0
- data/spec/dummy/node_modules/jquery/src/callbacks.js +236 -0
- data/spec/dummy/node_modules/jquery/src/core.js +400 -0
- data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +43 -0
- data/spec/dummy/node_modules/jquery/src/core/access.js +72 -0
- data/spec/dummy/node_modules/jquery/src/core/camelCase.js +23 -0
- data/spec/dummy/node_modules/jquery/src/core/init.js +129 -0
- data/spec/dummy/node_modules/jquery/src/core/isAttached.js +26 -0
- data/spec/dummy/node_modules/jquery/src/core/nodeName.js +13 -0
- data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +65 -0
- data/spec/dummy/node_modules/jquery/src/core/parseXML.js +30 -0
- data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +97 -0
- data/spec/dummy/node_modules/jquery/src/core/ready.js +86 -0
- data/spec/dummy/node_modules/jquery/src/core/readyException.js +13 -0
- data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +14 -0
- data/spec/dummy/node_modules/jquery/src/core/support.js +20 -0
- data/spec/dummy/node_modules/jquery/src/core/toType.js +20 -0
- data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +7 -0
- data/spec/dummy/node_modules/jquery/src/css.js +494 -0
- data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +26 -0
- data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +74 -0
- data/spec/dummy/node_modules/jquery/src/css/curCSS.js +65 -0
- data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +42 -0
- data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/spec/dummy/node_modules/jquery/src/css/showHide.js +105 -0
- data/spec/dummy/node_modules/jquery/src/css/support.js +133 -0
- data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +5 -0
- data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +17 -0
- data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +7 -0
- data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +7 -0
- data/spec/dummy/node_modules/jquery/src/css/var/swap.js +26 -0
- data/spec/dummy/node_modules/jquery/src/data.js +180 -0
- data/spec/dummy/node_modules/jquery/src/data/Data.js +162 -0
- data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +19 -0
- data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +7 -0
- data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +7 -0
- data/spec/dummy/node_modules/jquery/src/deferred.js +399 -0
- data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +21 -0
- data/spec/dummy/node_modules/jquery/src/deprecated.js +87 -0
- data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +22 -0
- data/spec/dummy/node_modules/jquery/src/deprecated/event.js +48 -0
- data/spec/dummy/node_modules/jquery/src/dimensions.js +57 -0
- data/spec/dummy/node_modules/jquery/src/effects.js +701 -0
- data/spec/dummy/node_modules/jquery/src/effects/Tween.js +125 -0
- data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +15 -0
- data/spec/dummy/node_modules/jquery/src/event.js +892 -0
- data/spec/dummy/node_modules/jquery/src/event/focusin.js +58 -0
- data/spec/dummy/node_modules/jquery/src/event/support.js +11 -0
- data/spec/dummy/node_modules/jquery/src/event/trigger.js +201 -0
- data/spec/dummy/node_modules/jquery/src/exports/amd.js +26 -0
- data/spec/dummy/node_modules/jquery/src/exports/global.js +34 -0
- data/spec/dummy/node_modules/jquery/src/jquery.js +41 -0
- data/spec/dummy/node_modules/jquery/src/manipulation.js +480 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +32 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +106 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +32 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/support.js +41 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +8 -0
- data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +30 -0
- data/spec/dummy/node_modules/jquery/src/offset.js +238 -0
- data/spec/dummy/node_modules/jquery/src/queue.js +145 -0
- data/spec/dummy/node_modules/jquery/src/queue/delay.js +24 -0
- data/spec/dummy/node_modules/jquery/src/selector-native.js +241 -0
- data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +19 -0
- data/spec/dummy/node_modules/jquery/src/selector.js +3 -0
- data/spec/dummy/node_modules/jquery/src/serialize.js +136 -0
- data/spec/dummy/node_modules/jquery/src/traversing.js +198 -0
- data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +97 -0
- data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +22 -0
- data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +17 -0
- data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/arr.js +5 -0
- data/spec/dummy/node_modules/jquery/src/var/class2type.js +6 -0
- data/spec/dummy/node_modules/jquery/src/var/document.js +5 -0
- data/spec/dummy/node_modules/jquery/src/var/documentElement.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/flat.js +16 -0
- data/spec/dummy/node_modules/jquery/src/var/fnToString.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/getProto.js +5 -0
- data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/indexOf.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/isFunction.js +13 -0
- data/spec/dummy/node_modules/jquery/src/var/isWindow.js +8 -0
- data/spec/dummy/node_modules/jquery/src/var/pnum.js +5 -0
- data/spec/dummy/node_modules/jquery/src/var/push.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +5 -0
- data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +9 -0
- data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +8 -0
- data/spec/dummy/node_modules/jquery/src/var/slice.js +7 -0
- data/spec/dummy/node_modules/jquery/src/var/support.js +6 -0
- data/spec/dummy/node_modules/jquery/src/var/toString.js +7 -0
- data/spec/dummy/node_modules/jquery/src/wrap.js +78 -0
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +5 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -0
- data/trusty_cms.gemspec +3 -2
- data/yarn.lock +9 -9
- metadata +354 -50
@@ -0,0 +1,58 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../data/var/dataPriv",
|
4
|
+
"./support",
|
5
|
+
|
6
|
+
"../event",
|
7
|
+
"./trigger"
|
8
|
+
], function( jQuery, dataPriv, support ) {
|
9
|
+
|
10
|
+
"use strict";
|
11
|
+
|
12
|
+
// Support: Firefox <=44
|
13
|
+
// Firefox doesn't have focus(in | out) events
|
14
|
+
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
15
|
+
//
|
16
|
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
17
|
+
// focus(in | out) events fire after focus & blur events,
|
18
|
+
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
19
|
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
20
|
+
if ( !support.focusin ) {
|
21
|
+
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
22
|
+
|
23
|
+
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
24
|
+
var handler = function( event ) {
|
25
|
+
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
26
|
+
};
|
27
|
+
|
28
|
+
jQuery.event.special[ fix ] = {
|
29
|
+
setup: function() {
|
30
|
+
|
31
|
+
// Handle: regular nodes (via `this.ownerDocument`), window
|
32
|
+
// (via `this.document`) & document (via `this`).
|
33
|
+
var doc = this.ownerDocument || this.document || this,
|
34
|
+
attaches = dataPriv.access( doc, fix );
|
35
|
+
|
36
|
+
if ( !attaches ) {
|
37
|
+
doc.addEventListener( orig, handler, true );
|
38
|
+
}
|
39
|
+
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
40
|
+
},
|
41
|
+
teardown: function() {
|
42
|
+
var doc = this.ownerDocument || this.document || this,
|
43
|
+
attaches = dataPriv.access( doc, fix ) - 1;
|
44
|
+
|
45
|
+
if ( !attaches ) {
|
46
|
+
doc.removeEventListener( orig, handler, true );
|
47
|
+
dataPriv.remove( doc, fix );
|
48
|
+
|
49
|
+
} else {
|
50
|
+
dataPriv.access( doc, fix, attaches );
|
51
|
+
}
|
52
|
+
}
|
53
|
+
};
|
54
|
+
} );
|
55
|
+
}
|
56
|
+
|
57
|
+
return jQuery;
|
58
|
+
} );
|
@@ -0,0 +1,201 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../var/document",
|
4
|
+
"../data/var/dataPriv",
|
5
|
+
"../data/var/acceptData",
|
6
|
+
"../var/hasOwn",
|
7
|
+
"../var/isFunction",
|
8
|
+
"../var/isWindow",
|
9
|
+
"../event"
|
10
|
+
], function( jQuery, document, dataPriv, acceptData, hasOwn, isFunction, isWindow ) {
|
11
|
+
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
15
|
+
stopPropagationCallback = function( e ) {
|
16
|
+
e.stopPropagation();
|
17
|
+
};
|
18
|
+
|
19
|
+
jQuery.extend( jQuery.event, {
|
20
|
+
|
21
|
+
trigger: function( event, data, elem, onlyHandlers ) {
|
22
|
+
|
23
|
+
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
|
24
|
+
eventPath = [ elem || document ],
|
25
|
+
type = hasOwn.call( event, "type" ) ? event.type : event,
|
26
|
+
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
|
27
|
+
|
28
|
+
cur = lastElement = tmp = elem = elem || document;
|
29
|
+
|
30
|
+
// Don't do events on text and comment nodes
|
31
|
+
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
|
35
|
+
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
36
|
+
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
|
40
|
+
if ( type.indexOf( "." ) > -1 ) {
|
41
|
+
|
42
|
+
// Namespaced trigger; create a regexp to match event type in handle()
|
43
|
+
namespaces = type.split( "." );
|
44
|
+
type = namespaces.shift();
|
45
|
+
namespaces.sort();
|
46
|
+
}
|
47
|
+
ontype = type.indexOf( ":" ) < 0 && "on" + type;
|
48
|
+
|
49
|
+
// Caller can pass in a jQuery.Event object, Object, or just an event type string
|
50
|
+
event = event[ jQuery.expando ] ?
|
51
|
+
event :
|
52
|
+
new jQuery.Event( type, typeof event === "object" && event );
|
53
|
+
|
54
|
+
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
|
55
|
+
event.isTrigger = onlyHandlers ? 2 : 3;
|
56
|
+
event.namespace = namespaces.join( "." );
|
57
|
+
event.rnamespace = event.namespace ?
|
58
|
+
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
|
59
|
+
null;
|
60
|
+
|
61
|
+
// Clean up the event in case it is being reused
|
62
|
+
event.result = undefined;
|
63
|
+
if ( !event.target ) {
|
64
|
+
event.target = elem;
|
65
|
+
}
|
66
|
+
|
67
|
+
// Clone any incoming data and prepend the event, creating the handler arg list
|
68
|
+
data = data == null ?
|
69
|
+
[ event ] :
|
70
|
+
jQuery.makeArray( data, [ event ] );
|
71
|
+
|
72
|
+
// Allow special events to draw outside the lines
|
73
|
+
special = jQuery.event.special[ type ] || {};
|
74
|
+
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
|
75
|
+
return;
|
76
|
+
}
|
77
|
+
|
78
|
+
// Determine event propagation path in advance, per W3C events spec (#9951)
|
79
|
+
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
80
|
+
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
|
81
|
+
|
82
|
+
bubbleType = special.delegateType || type;
|
83
|
+
if ( !rfocusMorph.test( bubbleType + type ) ) {
|
84
|
+
cur = cur.parentNode;
|
85
|
+
}
|
86
|
+
for ( ; cur; cur = cur.parentNode ) {
|
87
|
+
eventPath.push( cur );
|
88
|
+
tmp = cur;
|
89
|
+
}
|
90
|
+
|
91
|
+
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
92
|
+
if ( tmp === ( elem.ownerDocument || document ) ) {
|
93
|
+
eventPath.push( tmp.defaultView || tmp.parentWindow || window );
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
// Fire handlers on the event path
|
98
|
+
i = 0;
|
99
|
+
while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
|
100
|
+
lastElement = cur;
|
101
|
+
event.type = i > 1 ?
|
102
|
+
bubbleType :
|
103
|
+
special.bindType || type;
|
104
|
+
|
105
|
+
// jQuery handler
|
106
|
+
handle = (
|
107
|
+
dataPriv.get( cur, "events" ) || Object.create( null )
|
108
|
+
)[ event.type ] &&
|
109
|
+
dataPriv.get( cur, "handle" );
|
110
|
+
if ( handle ) {
|
111
|
+
handle.apply( cur, data );
|
112
|
+
}
|
113
|
+
|
114
|
+
// Native handler
|
115
|
+
handle = ontype && cur[ ontype ];
|
116
|
+
if ( handle && handle.apply && acceptData( cur ) ) {
|
117
|
+
event.result = handle.apply( cur, data );
|
118
|
+
if ( event.result === false ) {
|
119
|
+
event.preventDefault();
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
event.type = type;
|
124
|
+
|
125
|
+
// If nobody prevented the default action, do it now
|
126
|
+
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
127
|
+
|
128
|
+
if ( ( !special._default ||
|
129
|
+
special._default.apply( eventPath.pop(), data ) === false ) &&
|
130
|
+
acceptData( elem ) ) {
|
131
|
+
|
132
|
+
// Call a native DOM method on the target with the same name as the event.
|
133
|
+
// Don't do default actions on window, that's where global variables be (#6170)
|
134
|
+
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
|
135
|
+
|
136
|
+
// Don't re-trigger an onFOO event when we call its FOO() method
|
137
|
+
tmp = elem[ ontype ];
|
138
|
+
|
139
|
+
if ( tmp ) {
|
140
|
+
elem[ ontype ] = null;
|
141
|
+
}
|
142
|
+
|
143
|
+
// Prevent re-triggering of the same event, since we already bubbled it above
|
144
|
+
jQuery.event.triggered = type;
|
145
|
+
|
146
|
+
if ( event.isPropagationStopped() ) {
|
147
|
+
lastElement.addEventListener( type, stopPropagationCallback );
|
148
|
+
}
|
149
|
+
|
150
|
+
elem[ type ]();
|
151
|
+
|
152
|
+
if ( event.isPropagationStopped() ) {
|
153
|
+
lastElement.removeEventListener( type, stopPropagationCallback );
|
154
|
+
}
|
155
|
+
|
156
|
+
jQuery.event.triggered = undefined;
|
157
|
+
|
158
|
+
if ( tmp ) {
|
159
|
+
elem[ ontype ] = tmp;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
return event.result;
|
166
|
+
},
|
167
|
+
|
168
|
+
// Piggyback on a donor event to simulate a different one
|
169
|
+
// Used only for `focus(in | out)` events
|
170
|
+
simulate: function( type, elem, event ) {
|
171
|
+
var e = jQuery.extend(
|
172
|
+
new jQuery.Event(),
|
173
|
+
event,
|
174
|
+
{
|
175
|
+
type: type,
|
176
|
+
isSimulated: true
|
177
|
+
}
|
178
|
+
);
|
179
|
+
|
180
|
+
jQuery.event.trigger( e, null, elem );
|
181
|
+
}
|
182
|
+
|
183
|
+
} );
|
184
|
+
|
185
|
+
jQuery.fn.extend( {
|
186
|
+
|
187
|
+
trigger: function( type, data ) {
|
188
|
+
return this.each( function() {
|
189
|
+
jQuery.event.trigger( type, data, this );
|
190
|
+
} );
|
191
|
+
},
|
192
|
+
triggerHandler: function( type, data ) {
|
193
|
+
var elem = this[ 0 ];
|
194
|
+
if ( elem ) {
|
195
|
+
return jQuery.event.trigger( type, data, elem, true );
|
196
|
+
}
|
197
|
+
}
|
198
|
+
} );
|
199
|
+
|
200
|
+
return jQuery;
|
201
|
+
} );
|
@@ -0,0 +1,26 @@
|
|
1
|
+
define( [
|
2
|
+
"../core"
|
3
|
+
], function( jQuery ) {
|
4
|
+
|
5
|
+
"use strict";
|
6
|
+
|
7
|
+
// Register as a named AMD module, since jQuery can be concatenated with other
|
8
|
+
// files that may use define, but not via a proper concatenation script that
|
9
|
+
// understands anonymous AMD modules. A named AMD is safest and most robust
|
10
|
+
// way to register. Lowercase jquery is used because AMD module names are
|
11
|
+
// derived from file names, and jQuery is normally delivered in a lowercase
|
12
|
+
// file name. Do this after creating the global so that if an AMD module wants
|
13
|
+
// to call noConflict to hide this version of jQuery, it will work.
|
14
|
+
|
15
|
+
// Note that for maximum portability, libraries that are not jQuery should
|
16
|
+
// declare themselves as anonymous modules, and avoid setting a global if an
|
17
|
+
// AMD loader is present. jQuery is a special case. For more information, see
|
18
|
+
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
|
19
|
+
|
20
|
+
if ( typeof define === "function" && define.amd ) {
|
21
|
+
define( "jquery", [], function() {
|
22
|
+
return jQuery;
|
23
|
+
} );
|
24
|
+
}
|
25
|
+
|
26
|
+
} );
|
@@ -0,0 +1,34 @@
|
|
1
|
+
define( [
|
2
|
+
"../core"
|
3
|
+
], function( jQuery ) {
|
4
|
+
|
5
|
+
"use strict";
|
6
|
+
|
7
|
+
var
|
8
|
+
|
9
|
+
// Map over jQuery in case of overwrite
|
10
|
+
_jQuery = window.jQuery,
|
11
|
+
|
12
|
+
// Map over the $ in case of overwrite
|
13
|
+
_$ = window.$;
|
14
|
+
|
15
|
+
jQuery.noConflict = function( deep ) {
|
16
|
+
if ( window.$ === jQuery ) {
|
17
|
+
window.$ = _$;
|
18
|
+
}
|
19
|
+
|
20
|
+
if ( deep && window.jQuery === jQuery ) {
|
21
|
+
window.jQuery = _jQuery;
|
22
|
+
}
|
23
|
+
|
24
|
+
return jQuery;
|
25
|
+
};
|
26
|
+
|
27
|
+
// Expose jQuery and $ identifiers, even in AMD
|
28
|
+
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
29
|
+
// and CommonJS for browser emulators (#13566)
|
30
|
+
if ( typeof noGlobal === "undefined" ) {
|
31
|
+
window.jQuery = window.$ = jQuery;
|
32
|
+
}
|
33
|
+
|
34
|
+
} );
|
@@ -0,0 +1,41 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./selector",
|
4
|
+
"./traversing",
|
5
|
+
"./callbacks",
|
6
|
+
"./deferred",
|
7
|
+
"./deferred/exceptionHook",
|
8
|
+
"./core/ready",
|
9
|
+
"./data",
|
10
|
+
"./queue",
|
11
|
+
"./queue/delay",
|
12
|
+
"./attributes",
|
13
|
+
"./event",
|
14
|
+
"./event/focusin",
|
15
|
+
"./manipulation",
|
16
|
+
"./manipulation/_evalUrl",
|
17
|
+
"./wrap",
|
18
|
+
"./css",
|
19
|
+
"./css/hiddenVisibleSelectors",
|
20
|
+
"./serialize",
|
21
|
+
"./ajax",
|
22
|
+
"./ajax/xhr",
|
23
|
+
"./ajax/script",
|
24
|
+
"./ajax/jsonp",
|
25
|
+
"./ajax/load",
|
26
|
+
"./core/parseXML",
|
27
|
+
"./core/parseHTML",
|
28
|
+
"./effects",
|
29
|
+
"./effects/animatedSelector",
|
30
|
+
"./offset",
|
31
|
+
"./dimensions",
|
32
|
+
"./deprecated",
|
33
|
+
"./exports/amd",
|
34
|
+
"./exports/global"
|
35
|
+
], function( jQuery ) {
|
36
|
+
|
37
|
+
"use strict";
|
38
|
+
|
39
|
+
return jQuery;
|
40
|
+
|
41
|
+
} );
|
@@ -0,0 +1,480 @@
|
|
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
|
+
} );
|