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.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +87 -77
  4. data/app/assets/javascripts/ckeditor/config.js +2 -2
  5. data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
  6. data/app/controllers/admin/assets_controller.rb +5 -1
  7. data/app/models/asset.rb +39 -48
  8. data/app/models/asset_type.rb +6 -2
  9. data/app/views/admin/assets/edit.html.haml +5 -3
  10. data/config/database.yml +2 -2
  11. data/config/locales/en.yml +1 -0
  12. data/coverage/index.html +1 -1
  13. data/lib/trusty_cms/deprecation.rb +13 -0
  14. data/lib/trusty_cms.rb +1 -1
  15. data/node_modules/path-parse/index.js +17 -35
  16. data/node_modules/path-parse/package.json +1 -1
  17. data/node_modules/postcss/CHANGELOG.md +27 -0
  18. data/node_modules/postcss/README.md +21 -0
  19. data/node_modules/postcss/lib/at-rule.js +2 -4
  20. data/node_modules/postcss/lib/comment.js +2 -4
  21. data/node_modules/postcss/lib/container.js +27 -122
  22. data/node_modules/postcss/lib/css-syntax-error.js +5 -7
  23. data/node_modules/postcss/lib/declaration.js +2 -4
  24. data/node_modules/postcss/lib/input.js +3 -5
  25. data/node_modules/postcss/lib/lazy-result.js +10 -17
  26. data/node_modules/postcss/lib/map-generator.js +10 -17
  27. data/node_modules/postcss/lib/node.js +2 -4
  28. data/node_modules/postcss/lib/parser.js +2 -4
  29. data/node_modules/postcss/lib/postcss.d.ts +25 -19
  30. data/node_modules/postcss/lib/previous-map.js +17 -6
  31. data/node_modules/postcss/lib/processor.js +16 -15
  32. data/node_modules/postcss/lib/result.js +2 -4
  33. data/node_modules/postcss/lib/root.js +10 -17
  34. data/node_modules/postcss/lib/rule.js +2 -4
  35. data/node_modules/postcss/lib/stringifier.js +2 -4
  36. data/node_modules/postcss/lib/warning.js +2 -4
  37. data/node_modules/postcss/package.json +16 -12
  38. data/spec/dummy/log/test.log +542 -443
  39. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  40. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
  41. data/trusty_cms.gemspec +2 -1
  42. data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
  43. data/yarn.lock +3 -3
  44. metadata +31 -307
  45. data/config/initializers/interpolation.rb +0 -6
  46. data/node_modules/path-parse/test.js +0 -77
  47. data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
  48. data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
  49. data/node_modules/postcss/docs/api/index.html +0 -22716
  50. data/spec/dummy/log/development.log +0 -158
  51. data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
  52. data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
  53. data/spec/dummy/node_modules/jquery/README.md +0 -62
  54. data/spec/dummy/node_modules/jquery/bower.json +0 -14
  55. data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
  56. data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
  57. data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
  58. data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
  59. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
  60. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
  61. data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  62. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
  63. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  64. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  65. data/spec/dummy/node_modules/jquery/package.json +0 -117
  66. data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
  67. data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
  68. data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
  69. data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
  70. data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  71. data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
  72. data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
  73. data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
  74. data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
  75. data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
  76. data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
  77. data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
  78. data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
  79. data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
  80. data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
  81. data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
  82. data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
  83. data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
  84. data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
  85. data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
  86. data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
  87. data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
  88. data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
  89. data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
  90. data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
  91. data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
  92. data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
  93. data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
  94. data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
  95. data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
  96. data/spec/dummy/node_modules/jquery/src/core.js +0 -400
  97. data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
  98. data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
  99. data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
  100. data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
  101. data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  102. data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
  103. data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
  104. data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
  105. data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
  106. data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  107. data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
  108. data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
  109. data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
  110. data/spec/dummy/node_modules/jquery/src/css.js +0 -494
  111. data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
  112. data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
  113. data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
  114. data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
  115. data/spec/dummy/node_modules/jquery/src/data.js +0 -180
  116. data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
  117. data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
  118. data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
  119. data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
  120. data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
  121. data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
  122. data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
  123. data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
  124. data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
  125. data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
  126. data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
  127. data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
  128. data/spec/dummy/node_modules/jquery/src/event.js +0 -892
  129. data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
  130. data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
  131. data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
  132. data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
  133. data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
  134. data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
  135. data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
  136. data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
  137. data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
  138. data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
  139. data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  140. data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
  141. data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
  142. data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
  143. data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
  144. data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
  145. data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
  146. data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
  147. data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
  148. data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
  149. data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
  150. data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
  151. data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
  152. data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
  153. data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
  154. data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
  155. data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
  156. data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
  157. data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
  158. data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
  159. data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
  160. data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
  161. data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
  162. data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
  163. data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
  164. data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
  165. data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
  166. data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
  167. data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
  168. data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
  169. data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
  170. data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
  171. data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
  172. data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
  173. data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
  174. data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
  175. data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
  176. data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
  177. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
  178. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
  179. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
  180. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
  181. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
  182. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
  183. data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
  184. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
  185. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
  186. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
  187. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
  188. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
  189. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
  190. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
  191. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
  192. data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
  193. data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
  194. data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
  195. data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
  196. data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
  197. data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
  198. data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
  199. data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -1,58 +0,0 @@
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
- } );
@@ -1,11 +0,0 @@
1
- define( [
2
- "../var/support"
3
- ], function( support ) {
4
-
5
- "use strict";
6
-
7
- support.focusin = "onfocusin" in window;
8
-
9
- return support;
10
-
11
- } );
@@ -1,201 +0,0 @@
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
- } );