paint-rails 0.7.24 → 0.8.27.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/lib/paint-rails/version.rb +1 -1
  4. data/vendor/assets/stylesheets/bower_components/fastclick/.bower.json +1 -1
  5. data/vendor/assets/stylesheets/bower_components/fontawesome/.bower.json +1 -1
  6. data/vendor/assets/stylesheets/bower_components/foundation/.bower.json +7 -8
  7. data/vendor/assets/stylesheets/bower_components/{jquery/MIT-LICENSE.txt → foundation/LICENSE} +3 -2
  8. data/vendor/assets/stylesheets/bower_components/foundation/README.md +46 -0
  9. data/vendor/assets/stylesheets/bower_components/foundation/bower.json +2 -4
  10. data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.css +417 -162
  11. data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.css.map +1 -1
  12. data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.min.css +1 -1
  13. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation.js +386 -197
  14. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation.min.js +5 -5
  15. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.abide.js +42 -24
  16. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.accordion.js +39 -2
  17. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.alert.js +1 -1
  18. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.clearing.js +5 -5
  19. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.dropdown.js +17 -12
  20. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.equalizer.js +1 -1
  21. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.interchange.js +3 -2
  22. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.joyride.js +53 -50
  23. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.js +24 -17
  24. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.magellan.js +4 -5
  25. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.offcanvas.js +75 -2
  26. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.orbit.js +1 -1
  27. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.reveal.js +40 -16
  28. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.slider.js +21 -6
  29. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.tab.js +25 -27
  30. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.tooltip.js +24 -15
  31. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.topbar.js +11 -11
  32. data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/jquery.js +3 -4
  33. data/vendor/assets/stylesheets/bower_components/foundation/package.json +5 -1
  34. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation.scss +0 -2
  35. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/_functions.scss +2 -2
  36. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/_settings.scss +6 -3
  37. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_accordion.scss +6 -2
  38. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +2 -1
  39. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_button-groups.scss +1 -0
  40. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_buttons.scss +18 -13
  41. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_dropdown.scss +3 -2
  42. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_forms.scss +21 -23
  43. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_global.scss +73 -9
  44. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_grid.scss +15 -15
  45. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_inline-lists.scss +2 -1
  46. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_joyride.scss +1 -1
  47. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_offcanvas.scss +92 -4
  48. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_pagination.scss +1 -0
  49. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_progress-bars.scss +6 -0
  50. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_range-slider.scss +2 -2
  51. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_reveal.scss +3 -0
  52. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tabs.scss +1 -1
  53. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tooltips.scss +1 -1
  54. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_top-bar.scss +11 -3
  55. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_type.scss +73 -12
  56. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_visibility.scss +8 -75
  57. data/vendor/assets/stylesheets/bower_components/jquery-placeholder/.bower.json +1 -1
  58. data/vendor/assets/stylesheets/bower_components/jquery.cookie/.bower.json +1 -1
  59. data/vendor/assets/stylesheets/bower_components/jquery/.bower.json +7 -20
  60. data/vendor/assets/stylesheets/bower_components/jquery/AUTHORS.txt +278 -0
  61. data/vendor/assets/stylesheets/bower_components/jquery/LICENSE.txt +36 -0
  62. data/vendor/assets/stylesheets/bower_components/jquery/README.md +65 -0
  63. data/vendor/assets/stylesheets/bower_components/jquery/bower.json +2 -16
  64. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.js +2590 -1958
  65. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.min.js +4 -5
  66. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.min.map +1 -1
  67. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.slim.js +7877 -0
  68. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.slim.min.js +4 -0
  69. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.slim.min.map +1 -0
  70. data/vendor/assets/stylesheets/bower_components/jquery/sizzle/LICENSE.txt +36 -0
  71. data/vendor/assets/stylesheets/bower_components/jquery/{src/sizzle → sizzle}/dist/sizzle.js +236 -160
  72. data/vendor/assets/stylesheets/bower_components/jquery/sizzle/dist/sizzle.min.js +3 -0
  73. data/vendor/assets/stylesheets/bower_components/jquery/sizzle/dist/sizzle.min.map +1 -0
  74. data/vendor/assets/stylesheets/bower_components/jquery/src/.jshintrc +29 -0
  75. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax.js +116 -57
  76. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/jsonp.js +25 -14
  77. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/load.js +20 -12
  78. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/parseJSON.js +2 -2
  79. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/parseXML.js +4 -5
  80. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/script.js +16 -12
  81. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/var/location.js +3 -0
  82. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/var/nonce.js +2 -2
  83. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/var/rquery.js +3 -3
  84. data/vendor/assets/stylesheets/bower_components/jquery/src/ajax/xhr.js +73 -42
  85. data/vendor/assets/stylesheets/bower_components/jquery/src/attributes.js +2 -2
  86. data/vendor/assets/stylesheets/bower_components/jquery/src/attributes/attr.js +49 -48
  87. data/vendor/assets/stylesheets/bower_components/jquery/src/attributes/classes.js +86 -67
  88. data/vendor/assets/stylesheets/bower_components/jquery/src/attributes/prop.js +63 -32
  89. data/vendor/assets/stylesheets/bower_components/jquery/src/attributes/support.js +6 -5
  90. data/vendor/assets/stylesheets/bower_components/jquery/src/attributes/val.js +40 -24
  91. data/vendor/assets/stylesheets/bower_components/jquery/src/callbacks.js +114 -87
  92. data/vendor/assets/stylesheets/bower_components/jquery/src/core.js +77 -85
  93. data/vendor/assets/stylesheets/bower_components/jquery/src/core/DOMEval.js +14 -0
  94. data/vendor/assets/stylesheets/bower_components/jquery/src/core/access.js +11 -6
  95. data/vendor/assets/stylesheets/bower_components/jquery/src/core/init.js +27 -16
  96. data/vendor/assets/stylesheets/bower_components/jquery/src/core/parseHTML.js +10 -8
  97. data/vendor/assets/stylesheets/bower_components/jquery/src/core/ready.js +20 -14
  98. data/vendor/assets/stylesheets/bower_components/jquery/src/core/support.js +18 -0
  99. data/vendor/assets/stylesheets/bower_components/jquery/src/core/var/rsingleTag.js +4 -3
  100. data/vendor/assets/stylesheets/bower_components/jquery/src/css.js +120 -55
  101. data/vendor/assets/stylesheets/bower_components/jquery/src/css/addGetHookIf.js +5 -3
  102. data/vendor/assets/stylesheets/bower_components/jquery/src/css/adjustCSS.js +65 -0
  103. data/vendor/assets/stylesheets/bower_components/jquery/src/css/curCSS.js +20 -17
  104. data/vendor/assets/stylesheets/bower_components/jquery/src/css/defaultDisplay.js +16 -14
  105. data/vendor/assets/stylesheets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +9 -6
  106. data/vendor/assets/stylesheets/bower_components/jquery/src/css/showHide.js +48 -0
  107. data/vendor/assets/stylesheets/bower_components/jquery/src/css/support.js +86 -61
  108. data/vendor/assets/stylesheets/bower_components/jquery/src/css/var/cssExpand.js +2 -2
  109. data/vendor/assets/stylesheets/bower_components/jquery/src/css/var/getStyles.js +8 -5
  110. data/vendor/assets/stylesheets/bower_components/jquery/src/css/var/isHidden.js +6 -3
  111. data/vendor/assets/stylesheets/bower_components/jquery/src/css/var/rmargin.js +3 -3
  112. data/vendor/assets/stylesheets/bower_components/jquery/src/css/var/rnumnonpx.js +2 -2
  113. data/vendor/assets/stylesheets/bower_components/jquery/src/css/{swap.js → var/swap.js} +3 -7
  114. data/vendor/assets/stylesheets/bower_components/jquery/src/data.js +49 -40
  115. data/vendor/assets/stylesheets/bower_components/jquery/src/data/Data.js +93 -74
  116. data/vendor/assets/stylesheets/bower_components/jquery/src/data/support.js +23 -0
  117. data/vendor/assets/stylesheets/bower_components/jquery/src/data/var/acceptData.js +18 -0
  118. data/vendor/assets/stylesheets/bower_components/jquery/src/data/var/{data_priv.js → dataPriv.js} +2 -2
  119. data/vendor/assets/stylesheets/bower_components/jquery/src/data/var/{data_user.js → dataUser.js} +2 -2
  120. data/vendor/assets/stylesheets/bower_components/jquery/src/deferred.js +34 -25
  121. data/vendor/assets/stylesheets/bower_components/jquery/src/deferred/exceptionHook.js +19 -0
  122. data/vendor/assets/stylesheets/bower_components/jquery/src/deprecated.js +27 -8
  123. data/vendor/assets/stylesheets/bower_components/jquery/src/dimensions.js +9 -5
  124. data/vendor/assets/stylesheets/bower_components/jquery/src/effects.js +96 -115
  125. data/vendor/assets/stylesheets/bower_components/jquery/src/effects/Tween.js +14 -7
  126. data/vendor/assets/stylesheets/bower_components/jquery/src/effects/animatedSelector.js +4 -4
  127. data/vendor/assets/stylesheets/bower_components/jquery/src/effects/support.js +58 -0
  128. data/vendor/assets/stylesheets/bower_components/jquery/src/event.js +167 -325
  129. data/vendor/assets/stylesheets/bower_components/jquery/src/event/ajax.js +11 -4
  130. data/vendor/assets/stylesheets/bower_components/jquery/src/event/alias.js +11 -23
  131. data/vendor/assets/stylesheets/bower_components/jquery/src/event/focusin.js +53 -0
  132. data/vendor/assets/stylesheets/bower_components/jquery/src/event/support.js +3 -3
  133. data/vendor/assets/stylesheets/bower_components/jquery/src/event/trigger.js +199 -0
  134. data/vendor/assets/stylesheets/bower_components/jquery/src/exports/amd.js +3 -3
  135. data/vendor/assets/stylesheets/bower_components/jquery/src/exports/global.js +2 -8
  136. data/vendor/assets/stylesheets/bower_components/jquery/src/intro.js +1 -1
  137. data/vendor/assets/stylesheets/bower_components/jquery/src/jquery.js +5 -5
  138. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation.js +206 -305
  139. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/_evalUrl.js +6 -4
  140. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/buildFragment.js +102 -0
  141. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/createSafeFragment.js +20 -0
  142. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/getAll.js +21 -0
  143. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/setGlobalEval.js +20 -0
  144. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/support.js +7 -6
  145. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/var/nodeNames.js +5 -0
  146. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -3
  147. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
  148. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/var/rscriptType.js +3 -0
  149. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/var/rtagName.js +3 -0
  150. data/vendor/assets/stylesheets/bower_components/jquery/src/manipulation/wrapMap.js +27 -0
  151. data/vendor/assets/stylesheets/bower_components/jquery/src/offset.js +40 -29
  152. data/vendor/assets/stylesheets/bower_components/jquery/src/outro.js +1 -0
  153. data/vendor/assets/stylesheets/bower_components/jquery/src/queue.js +23 -22
  154. data/vendor/assets/stylesheets/bower_components/jquery/src/queue/delay.js +6 -6
  155. data/vendor/assets/stylesheets/bower_components/jquery/src/selector-native.js +107 -68
  156. data/vendor/assets/stylesheets/bower_components/jquery/src/selector-sizzle.js +5 -5
  157. data/vendor/assets/stylesheets/bower_components/jquery/src/selector.js +1 -1
  158. data/vendor/assets/stylesheets/bower_components/jquery/src/serialize.js +28 -14
  159. data/vendor/assets/stylesheets/bower_components/jquery/src/support.js +63 -0
  160. data/vendor/assets/stylesheets/bower_components/jquery/src/traversing.js +32 -56
  161. data/vendor/assets/stylesheets/bower_components/jquery/src/traversing/findFilter.js +13 -13
  162. data/vendor/assets/stylesheets/bower_components/jquery/src/traversing/var/dir.js +20 -0
  163. data/vendor/assets/stylesheets/bower_components/jquery/src/traversing/var/rneedsContext.js +2 -2
  164. data/vendor/assets/stylesheets/bower_components/jquery/src/traversing/var/siblings.js +15 -0
  165. data/vendor/assets/stylesheets/bower_components/jquery/src/var/arr.js +2 -2
  166. data/vendor/assets/stylesheets/bower_components/jquery/src/var/class2type.js +3 -2
  167. data/vendor/assets/stylesheets/bower_components/jquery/src/var/concat.js +2 -2
  168. data/vendor/assets/stylesheets/bower_components/jquery/src/var/deletedIds.js +3 -0
  169. data/vendor/assets/stylesheets/bower_components/jquery/src/var/document.js +3 -0
  170. data/vendor/assets/stylesheets/bower_components/jquery/src/var/documentElement.js +5 -0
  171. data/vendor/assets/stylesheets/bower_components/jquery/src/var/hasOwn.js +2 -2
  172. data/vendor/assets/stylesheets/bower_components/jquery/src/var/indexOf.js +2 -2
  173. data/vendor/assets/stylesheets/bower_components/jquery/src/var/pnum.js +3 -3
  174. data/vendor/assets/stylesheets/bower_components/jquery/src/var/push.js +2 -2
  175. data/vendor/assets/stylesheets/bower_components/jquery/src/var/rcssNum.js +7 -0
  176. data/vendor/assets/stylesheets/bower_components/jquery/src/var/rnotwhite.js +3 -3
  177. data/vendor/assets/stylesheets/bower_components/jquery/src/var/slice.js +2 -2
  178. data/vendor/assets/stylesheets/bower_components/jquery/src/var/support.js +3 -2
  179. data/vendor/assets/stylesheets/bower_components/jquery/src/var/toString.js +2 -2
  180. data/vendor/assets/stylesheets/bower_components/jquery/src/wrap.js +19 -19
  181. data/vendor/assets/stylesheets/bower_components/modernizr/.bower.json +2 -2
  182. data/vendor/assets/stylesheets/{Brocfile.js → paint/Brocfile.js} +0 -0
  183. data/vendor/assets/stylesheets/{Gemfile → paint/Gemfile} +0 -0
  184. data/vendor/assets/stylesheets/{Gemfile.lock → paint/Gemfile.lock} +0 -0
  185. data/vendor/assets/stylesheets/paint/bin/ci +6 -0
  186. data/vendor/assets/stylesheets/paint/bin/docs +8 -0
  187. data/vendor/assets/stylesheets/{bin → paint/bin}/lint +0 -0
  188. data/vendor/assets/stylesheets/{bin → paint/bin}/setup +0 -0
  189. data/vendor/assets/stylesheets/{circle.yml → paint/circle.yml} +0 -0
  190. data/vendor/assets/stylesheets/{components → paint/components}/_button.scss +111 -35
  191. data/vendor/assets/stylesheets/paint/components/_color.scss +162 -0
  192. data/vendor/assets/stylesheets/{components → paint/components}/_dropdown.scss +12 -6
  193. data/vendor/assets/stylesheets/{components → paint/components}/_flip-panel.scss +68 -7
  194. data/vendor/assets/stylesheets/paint/components/_form.scss +882 -0
  195. data/vendor/assets/stylesheets/{components → paint/components}/_grid.scss +34 -1
  196. data/vendor/assets/stylesheets/paint/components/_icon.scss +100 -0
  197. data/vendor/assets/stylesheets/paint/components/_label.scss +125 -0
  198. data/vendor/assets/stylesheets/{components → paint/components}/_layout.scss +61 -15
  199. data/vendor/assets/stylesheets/paint/components/_modal.scss +165 -0
  200. data/vendor/assets/stylesheets/paint/components/_navigation.scss +572 -0
  201. data/vendor/assets/stylesheets/paint/components/_notification.scss +124 -0
  202. data/vendor/assets/stylesheets/{components → paint/components}/_panel.scss +51 -16
  203. data/vendor/assets/stylesheets/{components → paint/components}/_progress-bar.scss +0 -0
  204. data/vendor/assets/stylesheets/{components → paint/components}/_quick-jump.scss +11 -13
  205. data/vendor/assets/stylesheets/paint/components/_side-panel.scss +248 -0
  206. data/vendor/assets/stylesheets/paint/components/_tab.scss +164 -0
  207. data/vendor/assets/stylesheets/{components → paint/components}/_table.scss +10 -10
  208. data/vendor/assets/stylesheets/{components → paint/components}/_typography.scss +4 -7
  209. data/vendor/assets/stylesheets/{components → paint/components}/_vertical-align.scss +0 -0
  210. data/vendor/assets/stylesheets/{globals → paint/globals}/_functions.scss +3 -3
  211. data/vendor/assets/stylesheets/{globals → paint/globals}/_mixins.scss +3 -2
  212. data/vendor/assets/stylesheets/{globals → paint/globals}/_settings.scss +15 -1
  213. data/vendor/assets/stylesheets/{paint.scss → paint/paint.scss} +11 -0
  214. metadata +78 -39
  215. data/vendor/assets/images/logo.png +0 -0
  216. data/vendor/assets/stylesheets/bin/ci +0 -6
  217. data/vendor/assets/stylesheets/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
  218. data/vendor/assets/stylesheets/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
  219. data/vendor/assets/stylesheets/bower_components/jquery/src/var/strundefined.js +0 -3
  220. data/vendor/assets/stylesheets/components/_form.scss +0 -346
  221. data/vendor/assets/stylesheets/components/_icon.scss +0 -4
  222. data/vendor/assets/stylesheets/components/_label.scss +0 -3
  223. data/vendor/assets/stylesheets/components/_side-panel.scss +0 -154
@@ -1,13 +1,20 @@
1
- define([
1
+ define( [
2
2
  "../core",
3
3
  "../event"
4
4
  ], function( jQuery ) {
5
5
 
6
6
  // Attach a bunch of functions for handling common AJAX events
7
- jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
7
+ jQuery.each( [
8
+ "ajaxStart",
9
+ "ajaxStop",
10
+ "ajaxComplete",
11
+ "ajaxError",
12
+ "ajaxSuccess",
13
+ "ajaxSend"
14
+ ], function( i, type ) {
8
15
  jQuery.fn[ type ] = function( fn ) {
9
16
  return this.on( type, fn );
10
17
  };
11
- });
18
+ } );
12
19
 
13
- });
20
+ } );
@@ -1,11 +1,14 @@
1
- define([
1
+ define( [
2
2
  "../core",
3
- "../event"
3
+
4
+ "../event",
5
+ "./trigger"
4
6
  ], function( jQuery ) {
5
7
 
6
- jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
8
+ jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
7
9
  "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
8
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
10
+ "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
11
+ function( i, name ) {
9
12
 
10
13
  // Handle event binding
11
14
  jQuery.fn[ name ] = function( data, fn ) {
@@ -13,27 +16,12 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
13
16
  this.on( name, null, data, fn ) :
14
17
  this.trigger( name );
15
18
  };
16
- });
19
+ } );
17
20
 
18
- jQuery.fn.extend({
21
+ jQuery.fn.extend( {
19
22
  hover: function( fnOver, fnOut ) {
20
23
  return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
21
- },
22
-
23
- bind: function( types, data, fn ) {
24
- return this.on( types, null, data, fn );
25
- },
26
- unbind: function( types, fn ) {
27
- return this.off( types, null, fn );
28
- },
29
-
30
- delegate: function( selector, types, data, fn ) {
31
- return this.on( types, selector, data, fn );
32
- },
33
- undelegate: function( selector, types, fn ) {
34
- // ( namespace ) or ( selector, types [, fn] )
35
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
36
24
  }
37
- });
25
+ } );
38
26
 
39
- });
27
+ } );
@@ -0,0 +1,53 @@
1
+ define( [
2
+ "../core",
3
+ "../data/var/dataPriv",
4
+ "./support",
5
+
6
+ "../event",
7
+ "./trigger"
8
+ ], function( jQuery, dataPriv, support ) {
9
+
10
+ // Support: Firefox
11
+ // Firefox doesn't have focus(in | out) events
12
+ // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
13
+ //
14
+ // Support: Chrome, Safari
15
+ // focus(in | out) events fire after focus & blur events,
16
+ // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
17
+ // Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
18
+ if ( !support.focusin ) {
19
+ jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
20
+
21
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
22
+ var handler = function( event ) {
23
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
24
+ };
25
+
26
+ jQuery.event.special[ fix ] = {
27
+ setup: function() {
28
+ var doc = this.ownerDocument || this,
29
+ attaches = dataPriv.access( doc, fix );
30
+
31
+ if ( !attaches ) {
32
+ doc.addEventListener( orig, handler, true );
33
+ }
34
+ dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
35
+ },
36
+ teardown: function() {
37
+ var doc = this.ownerDocument || this,
38
+ attaches = dataPriv.access( doc, fix ) - 1;
39
+
40
+ if ( !attaches ) {
41
+ doc.removeEventListener( orig, handler, true );
42
+ dataPriv.remove( doc, fix );
43
+
44
+ } else {
45
+ dataPriv.access( doc, fix, attaches );
46
+ }
47
+ }
48
+ };
49
+ } );
50
+ }
51
+
52
+ return jQuery;
53
+ } );
@@ -1,9 +1,9 @@
1
- define([
1
+ define( [
2
2
  "../var/support"
3
3
  ], function( support ) {
4
4
 
5
- support.focusinBubbles = "onfocusin" in window;
5
+ support.focusin = "onfocusin" in window;
6
6
 
7
7
  return support;
8
8
 
9
- });
9
+ } );
@@ -0,0 +1,199 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document",
4
+ "../data/var/dataPriv",
5
+ "../data/var/acceptData",
6
+ "../var/hasOwn",
7
+
8
+ "../event"
9
+ ], function( jQuery, document, dataPriv, acceptData, hasOwn ) {
10
+
11
+ var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
12
+
13
+ jQuery.extend( jQuery.event, {
14
+
15
+ trigger: function( event, data, elem, onlyHandlers ) {
16
+
17
+ var i, cur, tmp, bubbleType, ontype, handle, special,
18
+ eventPath = [ elem || document ],
19
+ type = hasOwn.call( event, "type" ) ? event.type : event,
20
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
21
+
22
+ cur = tmp = elem = elem || document;
23
+
24
+ // Don't do events on text and comment nodes
25
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
26
+ return;
27
+ }
28
+
29
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
30
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
31
+ return;
32
+ }
33
+
34
+ if ( type.indexOf( "." ) > -1 ) {
35
+
36
+ // Namespaced trigger; create a regexp to match event type in handle()
37
+ namespaces = type.split( "." );
38
+ type = namespaces.shift();
39
+ namespaces.sort();
40
+ }
41
+ ontype = type.indexOf( ":" ) < 0 && "on" + type;
42
+
43
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
44
+ event = event[ jQuery.expando ] ?
45
+ event :
46
+ new jQuery.Event( type, typeof event === "object" && event );
47
+
48
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
49
+ event.isTrigger = onlyHandlers ? 2 : 3;
50
+ event.namespace = namespaces.join( "." );
51
+ event.rnamespace = event.namespace ?
52
+ new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
53
+ null;
54
+
55
+ // Clean up the event in case it is being reused
56
+ event.result = undefined;
57
+ if ( !event.target ) {
58
+ event.target = elem;
59
+ }
60
+
61
+ // Clone any incoming data and prepend the event, creating the handler arg list
62
+ data = data == null ?
63
+ [ event ] :
64
+ jQuery.makeArray( data, [ event ] );
65
+
66
+ // Allow special events to draw outside the lines
67
+ special = jQuery.event.special[ type ] || {};
68
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
69
+ return;
70
+ }
71
+
72
+ // Determine event propagation path in advance, per W3C events spec (#9951)
73
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
74
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
75
+
76
+ bubbleType = special.delegateType || type;
77
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
78
+ cur = cur.parentNode;
79
+ }
80
+ for ( ; cur; cur = cur.parentNode ) {
81
+ eventPath.push( cur );
82
+ tmp = cur;
83
+ }
84
+
85
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
86
+ if ( tmp === ( elem.ownerDocument || document ) ) {
87
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
88
+ }
89
+ }
90
+
91
+ // Fire handlers on the event path
92
+ i = 0;
93
+ while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
94
+
95
+ event.type = i > 1 ?
96
+ bubbleType :
97
+ special.bindType || type;
98
+
99
+ // jQuery handler
100
+ handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
101
+ dataPriv.get( cur, "handle" );
102
+ if ( handle ) {
103
+ handle.apply( cur, data );
104
+ }
105
+
106
+ // Native handler
107
+ handle = ontype && cur[ ontype ];
108
+ if ( handle && handle.apply && acceptData( cur ) ) {
109
+ event.result = handle.apply( cur, data );
110
+ if ( event.result === false ) {
111
+ event.preventDefault();
112
+ }
113
+ }
114
+ }
115
+ event.type = type;
116
+
117
+ // If nobody prevented the default action, do it now
118
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
119
+
120
+ if ( ( !special._default ||
121
+ special._default.apply( eventPath.pop(), data ) === false ) &&
122
+ acceptData( elem ) ) {
123
+
124
+ // Call a native DOM method on the target with the same name name as the event.
125
+ // Don't do default actions on window, that's where global variables be (#6170)
126
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
127
+
128
+ // Don't re-trigger an onFOO event when we call its FOO() method
129
+ tmp = elem[ ontype ];
130
+
131
+ if ( tmp ) {
132
+ elem[ ontype ] = null;
133
+ }
134
+
135
+ // Prevent re-triggering of the same event, since we already bubbled it above
136
+ jQuery.event.triggered = type;
137
+ elem[ type ]();
138
+ jQuery.event.triggered = undefined;
139
+
140
+ if ( tmp ) {
141
+ elem[ ontype ] = tmp;
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ return event.result;
148
+ },
149
+
150
+ // Piggyback on a donor event to simulate a different one
151
+ simulate: function( type, elem, event ) {
152
+ var e = jQuery.extend(
153
+ new jQuery.Event(),
154
+ event,
155
+ {
156
+ type: type,
157
+ isSimulated: true
158
+
159
+ // Previously, `originalEvent: {}` was set here, so stopPropagation call
160
+ // would not be triggered on donor event, since in our own
161
+ // jQuery.event.stopPropagation function we had a check for existence of
162
+ // originalEvent.stopPropagation method, so, consequently it would be a noop.
163
+ //
164
+ // But now, this "simulate" function is used only for events
165
+ // for which stopPropagation() is noop, so there is no need for that anymore.
166
+ //
167
+ // For the 1.x branch though, guard for "click" and "submit"
168
+ // events is still used, but was moved to jQuery.event.stopPropagation function
169
+ // because `originalEvent` should point to the original event for the constancy
170
+ // with other events and for more focused logic
171
+ }
172
+ );
173
+
174
+ jQuery.event.trigger( e, null, elem );
175
+
176
+ if ( e.isDefaultPrevented() ) {
177
+ event.preventDefault();
178
+ }
179
+ }
180
+
181
+ } );
182
+
183
+ jQuery.fn.extend( {
184
+
185
+ trigger: function( type, data ) {
186
+ return this.each( function() {
187
+ jQuery.event.trigger( type, data, this );
188
+ } );
189
+ },
190
+ triggerHandler: function( type, data ) {
191
+ var elem = this[ 0 ];
192
+ if ( elem ) {
193
+ return jQuery.event.trigger( type, data, elem, true );
194
+ }
195
+ }
196
+ } );
197
+
198
+ return jQuery;
199
+ } );
@@ -1,4 +1,4 @@
1
- define([
1
+ define( [
2
2
  "../core"
3
3
  ], function( jQuery ) {
4
4
 
@@ -18,7 +18,7 @@ define([
18
18
  if ( typeof define === "function" && define.amd ) {
19
19
  define( "jquery", [], function() {
20
20
  return jQuery;
21
- });
21
+ } );
22
22
  }
23
23
 
24
- });
24
+ } );
@@ -1,9 +1,5 @@
1
- define([
2
- "../core",
3
- "../var/strundefined"
4
- ], function( jQuery, strundefined ) {
5
-
6
1
  var
2
+
7
3
  // Map over jQuery in case of overwrite
8
4
  _jQuery = window.jQuery,
9
5
 
@@ -25,8 +21,6 @@ jQuery.noConflict = function( deep ) {
25
21
  // Expose jQuery and $ identifiers, even in AMD
26
22
  // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
27
23
  // and CommonJS for browser emulators (#13566)
28
- if ( typeof noGlobal === strundefined ) {
24
+ if ( !noGlobal ) {
29
25
  window.jQuery = window.$ = jQuery;
30
26
  }
31
-
32
- });
@@ -5,7 +5,7 @@
5
5
  * Includes Sizzle.js
6
6
  * http://sizzlejs.com/
7
7
  *
8
- * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
8
+ * Copyright jQuery Foundation and other contributors
9
9
  * Released under the MIT license
10
10
  * http://jquery.org/license
11
11
  *
@@ -1,4 +1,4 @@
1
- define([
1
+ define( [
2
2
  "./core",
3
3
  "./selector",
4
4
  "./traversing",
@@ -11,6 +11,7 @@ define([
11
11
  "./attributes",
12
12
  "./event",
13
13
  "./event/alias",
14
+ "./event/focusin",
14
15
  "./manipulation",
15
16
  "./manipulation/_evalUrl",
16
17
  "./wrap",
@@ -28,10 +29,9 @@ define([
28
29
  "./offset",
29
30
  "./dimensions",
30
31
  "./deprecated",
31
- "./exports/amd",
32
- "./exports/global"
32
+ "./exports/amd"
33
33
  ], function( jQuery ) {
34
34
 
35
- return jQuery;
35
+ return ( window.jQuery = window.$ = jQuery );
36
36
 
37
- });
37
+ } );
@@ -1,65 +1,56 @@
1
- define([
1
+ define( [
2
2
  "./core",
3
3
  "./var/concat",
4
4
  "./var/push",
5
5
  "./core/access",
6
6
  "./manipulation/var/rcheckableType",
7
+ "./manipulation/var/rtagName",
8
+ "./manipulation/var/rscriptType",
9
+ "./manipulation/wrapMap",
10
+ "./manipulation/getAll",
11
+ "./manipulation/setGlobalEval",
12
+ "./manipulation/buildFragment",
7
13
  "./manipulation/support",
8
- "./data/var/data_priv",
9
- "./data/var/data_user",
14
+
15
+ "./data/var/dataPriv",
16
+ "./data/var/dataUser",
17
+ "./data/var/acceptData",
10
18
 
11
19
  "./core/init",
12
- "./data/accepts",
13
20
  "./traversing",
14
21
  "./selector",
15
22
  "./event"
16
- ], function( jQuery, concat, push, access, rcheckableType, support, data_priv, data_user ) {
23
+ ], function( jQuery, concat, push, access,
24
+ rcheckableType, rtagName, rscriptType,
25
+ wrapMap, getAll, setGlobalEval, buildFragment, support,
26
+ dataPriv, dataUser, acceptData ) {
17
27
 
18
28
  var
19
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
20
- rtagName = /<([\w:]+)/,
21
- rhtml = /<|&#?\w+;/,
22
- rnoInnerhtml = /<(?:script|style|link)/i,
29
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
30
+
31
+ // Support: IE 10-11, Edge 10240+
32
+ // In IE/Edge using regex groups here causes severe slowdowns.
33
+ // See https://connect.microsoft.com/IE/feedback/details/1736512/
34
+ rnoInnerhtml = /<script|<style|<link/i,
35
+
23
36
  // checked="checked" or checked
24
37
  rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
25
- rscriptType = /^$|\/(?:java|ecma)script/i,
26
38
  rscriptTypeMasked = /^true\/(.*)/,
27
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
28
-
29
- // We have to close these tags to support XHTML (#13200)
30
- wrapMap = {
31
-
32
- // Support: IE9
33
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
34
-
35
- thead: [ 1, "<table>", "</table>" ],
36
- col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
37
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
38
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
39
-
40
- _default: [ 0, "", "" ]
41
- };
42
-
43
- // Support: IE9
44
- wrapMap.optgroup = wrapMap.option;
39
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
45
40
 
46
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
47
- wrapMap.th = wrapMap.td;
48
-
49
- // Support: 1.x compatibility
50
41
  // Manipulating tables requires a tbody
51
42
  function manipulationTarget( elem, content ) {
52
43
  return jQuery.nodeName( elem, "table" ) &&
53
44
  jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
54
45
 
55
- elem.getElementsByTagName("tbody")[0] ||
56
- elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
46
+ elem.getElementsByTagName( "tbody" )[ 0 ] ||
47
+ elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
57
48
  elem;
58
49
  }
59
50
 
60
51
  // Replace/restore the type attribute of script elements for safe DOM manipulation
61
52
  function disableScript( elem ) {
62
- elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
53
+ elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
63
54
  return elem;
64
55
  }
65
56
  function restoreScript( elem ) {
@@ -68,24 +59,12 @@ function restoreScript( elem ) {
68
59
  if ( match ) {
69
60
  elem.type = match[ 1 ];
70
61
  } else {
71
- elem.removeAttribute("type");
62
+ elem.removeAttribute( "type" );
72
63
  }
73
64
 
74
65
  return elem;
75
66
  }
76
67
 
77
- // Mark scripts as having already been evaluated
78
- function setGlobalEval( elems, refElements ) {
79
- var i = 0,
80
- l = elems.length;
81
-
82
- for ( ; i < l; i++ ) {
83
- data_priv.set(
84
- elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
85
- );
86
- }
87
- }
88
-
89
68
  function cloneCopyEvent( src, dest ) {
90
69
  var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
91
70
 
@@ -94,9 +73,9 @@ function cloneCopyEvent( src, dest ) {
94
73
  }
95
74
 
96
75
  // 1. Copy private data: events, handlers, etc.
97
- if ( data_priv.hasData( src ) ) {
98
- pdataOld = data_priv.access( src );
99
- pdataCur = data_priv.set( dest, pdataOld );
76
+ if ( dataPriv.hasData( src ) ) {
77
+ pdataOld = dataPriv.access( src );
78
+ pdataCur = dataPriv.set( dest, pdataOld );
100
79
  events = pdataOld.events;
101
80
 
102
81
  if ( events ) {
@@ -112,24 +91,14 @@ function cloneCopyEvent( src, dest ) {
112
91
  }
113
92
 
114
93
  // 2. Copy user data
115
- if ( data_user.hasData( src ) ) {
116
- udataOld = data_user.access( src );
94
+ if ( dataUser.hasData( src ) ) {
95
+ udataOld = dataUser.access( src );
117
96
  udataCur = jQuery.extend( {}, udataOld );
118
97
 
119
- data_user.set( dest, udataCur );
98
+ dataUser.set( dest, udataCur );
120
99
  }
121
100
  }
122
101
 
123
- function getAll( context, tag ) {
124
- var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
125
- context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
126
- [];
127
-
128
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
129
- jQuery.merge( [ context ], ret ) :
130
- ret;
131
- }
132
-
133
102
  // Fix IE bugs, see support tests
134
103
  function fixInput( src, dest ) {
135
104
  var nodeName = dest.nodeName.toLowerCase();
@@ -144,7 +113,122 @@ function fixInput( src, dest ) {
144
113
  }
145
114
  }
146
115
 
147
- jQuery.extend({
116
+ function domManip( collection, args, callback, ignored ) {
117
+
118
+ // Flatten any nested arrays
119
+ args = concat.apply( [], args );
120
+
121
+ var fragment, first, scripts, hasScripts, node, doc,
122
+ i = 0,
123
+ l = collection.length,
124
+ iNoClone = l - 1,
125
+ value = args[ 0 ],
126
+ isFunction = jQuery.isFunction( value );
127
+
128
+ // We can't cloneNode fragments that contain checked, in WebKit
129
+ if ( isFunction ||
130
+ ( l > 1 && typeof value === "string" &&
131
+ !support.checkClone && rchecked.test( value ) ) ) {
132
+ return collection.each( function( index ) {
133
+ var self = collection.eq( index );
134
+ if ( isFunction ) {
135
+ args[ 0 ] = value.call( this, index, self.html() );
136
+ }
137
+ domManip( self, args, callback, ignored );
138
+ } );
139
+ }
140
+
141
+ if ( l ) {
142
+ fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
143
+ first = fragment.firstChild;
144
+
145
+ if ( fragment.childNodes.length === 1 ) {
146
+ fragment = first;
147
+ }
148
+
149
+ // Require either new content or an interest in ignored elements to invoke the callback
150
+ if ( first || ignored ) {
151
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
152
+ hasScripts = scripts.length;
153
+
154
+ // Use the original fragment for the last item
155
+ // instead of the first because it can end up
156
+ // being emptied incorrectly in certain situations (#8070).
157
+ for ( ; i < l; i++ ) {
158
+ node = fragment;
159
+
160
+ if ( i !== iNoClone ) {
161
+ node = jQuery.clone( node, true, true );
162
+
163
+ // Keep references to cloned scripts for later restoration
164
+ if ( hasScripts ) {
165
+
166
+ // Support: Android<4.1, PhantomJS<2
167
+ // push.apply(_, arraylike) throws on ancient WebKit
168
+ jQuery.merge( scripts, getAll( node, "script" ) );
169
+ }
170
+ }
171
+
172
+ callback.call( collection[ i ], node, i );
173
+ }
174
+
175
+ if ( hasScripts ) {
176
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
177
+
178
+ // Reenable scripts
179
+ jQuery.map( scripts, restoreScript );
180
+
181
+ // Evaluate executable scripts on first document insertion
182
+ for ( i = 0; i < hasScripts; i++ ) {
183
+ node = scripts[ i ];
184
+ if ( rscriptType.test( node.type || "" ) &&
185
+ !dataPriv.access( node, "globalEval" ) &&
186
+ jQuery.contains( doc, node ) ) {
187
+
188
+ if ( node.src ) {
189
+
190
+ // Optional AJAX dependency, but won't run scripts if not present
191
+ if ( jQuery._evalUrl ) {
192
+ jQuery._evalUrl( node.src );
193
+ }
194
+ } else {
195
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+
203
+ return collection;
204
+ }
205
+
206
+ function remove( elem, selector, keepData ) {
207
+ var node,
208
+ nodes = selector ? jQuery.filter( selector, elem ) : elem,
209
+ i = 0;
210
+
211
+ for ( ; ( node = nodes[ i ] ) != null; i++ ) {
212
+ if ( !keepData && node.nodeType === 1 ) {
213
+ jQuery.cleanData( getAll( node ) );
214
+ }
215
+
216
+ if ( node.parentNode ) {
217
+ if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
218
+ setGlobalEval( getAll( node, "script" ) );
219
+ }
220
+ node.parentNode.removeChild( node );
221
+ }
222
+ }
223
+
224
+ return elem;
225
+ }
226
+
227
+ jQuery.extend( {
228
+ htmlPrefilter: function( html ) {
229
+ return html.replace( rxhtmlTag, "<$1></$2>" );
230
+ },
231
+
148
232
  clone: function( elem, dataAndEvents, deepDataAndEvents ) {
149
233
  var i, l, srcElements, destElements,
150
234
  clone = elem.cloneNode( true ),
@@ -187,102 +271,14 @@ jQuery.extend({
187
271
  return clone;
188
272
  },
189
273
 
190
- buildFragment: function( elems, context, scripts, selection ) {
191
- var elem, tmp, tag, wrap, contains, j,
192
- fragment = context.createDocumentFragment(),
193
- nodes = [],
194
- i = 0,
195
- l = elems.length;
196
-
197
- for ( ; i < l; i++ ) {
198
- elem = elems[ i ];
199
-
200
- if ( elem || elem === 0 ) {
201
-
202
- // Add nodes directly
203
- if ( jQuery.type( elem ) === "object" ) {
204
- // Support: QtWebKit, PhantomJS
205
- // push.apply(_, arraylike) throws on ancient WebKit
206
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
207
-
208
- // Convert non-html into a text node
209
- } else if ( !rhtml.test( elem ) ) {
210
- nodes.push( context.createTextNode( elem ) );
211
-
212
- // Convert html into DOM nodes
213
- } else {
214
- tmp = tmp || fragment.appendChild( context.createElement("div") );
215
-
216
- // Deserialize a standard representation
217
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
218
- wrap = wrapMap[ tag ] || wrapMap._default;
219
- tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
220
-
221
- // Descend through wrappers to the right content
222
- j = wrap[ 0 ];
223
- while ( j-- ) {
224
- tmp = tmp.lastChild;
225
- }
226
-
227
- // Support: QtWebKit, PhantomJS
228
- // push.apply(_, arraylike) throws on ancient WebKit
229
- jQuery.merge( nodes, tmp.childNodes );
230
-
231
- // Remember the top-level container
232
- tmp = fragment.firstChild;
233
-
234
- // Ensure the created nodes are orphaned (#12392)
235
- tmp.textContent = "";
236
- }
237
- }
238
- }
239
-
240
- // Remove wrapper from fragment
241
- fragment.textContent = "";
242
-
243
- i = 0;
244
- while ( (elem = nodes[ i++ ]) ) {
245
-
246
- // #4087 - If origin and destination elements are the same, and this is
247
- // that element, do not do anything
248
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
249
- continue;
250
- }
251
-
252
- contains = jQuery.contains( elem.ownerDocument, elem );
253
-
254
- // Append to fragment
255
- tmp = getAll( fragment.appendChild( elem ), "script" );
256
-
257
- // Preserve script evaluation history
258
- if ( contains ) {
259
- setGlobalEval( tmp );
260
- }
261
-
262
- // Capture executables
263
- if ( scripts ) {
264
- j = 0;
265
- while ( (elem = tmp[ j++ ]) ) {
266
- if ( rscriptType.test( elem.type || "" ) ) {
267
- scripts.push( elem );
268
- }
269
- }
270
- }
271
- }
272
-
273
- return fragment;
274
- },
275
-
276
274
  cleanData: function( elems ) {
277
- var data, elem, type, key,
275
+ var data, elem, type,
278
276
  special = jQuery.event.special,
279
277
  i = 0;
280
278
 
281
- for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
282
- if ( jQuery.acceptData( elem ) ) {
283
- key = elem[ data_priv.expando ];
284
-
285
- if ( key && (data = data_priv.cache[ key ]) ) {
279
+ for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
280
+ if ( acceptData( elem ) ) {
281
+ if ( ( data = elem[ dataPriv.expando ] ) ) {
286
282
  if ( data.events ) {
287
283
  for ( type in data.events ) {
288
284
  if ( special[ type ] ) {
@@ -294,91 +290,86 @@ jQuery.extend({
294
290
  }
295
291
  }
296
292
  }
297
- if ( data_priv.cache[ key ] ) {
298
- // Discard any remaining `private` data
299
- delete data_priv.cache[ key ];
300
- }
293
+
294
+ // Support: Chrome <= 35-45+
295
+ // Assign undefined instead of using delete, see Data#remove
296
+ elem[ dataPriv.expando ] = undefined;
297
+ }
298
+ if ( elem[ dataUser.expando ] ) {
299
+
300
+ // Support: Chrome <= 35-45+
301
+ // Assign undefined instead of using delete, see Data#remove
302
+ elem[ dataUser.expando ] = undefined;
301
303
  }
302
304
  }
303
- // Discard any remaining `user` data
304
- delete data_user.cache[ elem[ data_user.expando ] ];
305
305
  }
306
306
  }
307
- });
307
+ } );
308
+
309
+ jQuery.fn.extend( {
310
+
311
+ // Keep domManip exposed until 3.0 (gh-2225)
312
+ domManip: domManip,
313
+
314
+ detach: function( selector ) {
315
+ return remove( this, selector, true );
316
+ },
317
+
318
+ remove: function( selector ) {
319
+ return remove( this, selector );
320
+ },
308
321
 
309
- jQuery.fn.extend({
310
322
  text: function( value ) {
311
323
  return access( this, function( value ) {
312
324
  return value === undefined ?
313
325
  jQuery.text( this ) :
314
- this.empty().each(function() {
326
+ this.empty().each( function() {
315
327
  if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
316
328
  this.textContent = value;
317
329
  }
318
- });
330
+ } );
319
331
  }, null, value, arguments.length );
320
332
  },
321
333
 
322
334
  append: function() {
323
- return this.domManip( arguments, function( elem ) {
335
+ return domManip( this, arguments, function( elem ) {
324
336
  if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
325
337
  var target = manipulationTarget( this, elem );
326
338
  target.appendChild( elem );
327
339
  }
328
- });
340
+ } );
329
341
  },
330
342
 
331
343
  prepend: function() {
332
- return this.domManip( arguments, function( elem ) {
344
+ return domManip( this, arguments, function( elem ) {
333
345
  if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
334
346
  var target = manipulationTarget( this, elem );
335
347
  target.insertBefore( elem, target.firstChild );
336
348
  }
337
- });
349
+ } );
338
350
  },
339
351
 
340
352
  before: function() {
341
- return this.domManip( arguments, function( elem ) {
353
+ return domManip( this, arguments, function( elem ) {
342
354
  if ( this.parentNode ) {
343
355
  this.parentNode.insertBefore( elem, this );
344
356
  }
345
- });
357
+ } );
346
358
  },
347
359
 
348
360
  after: function() {
349
- return this.domManip( arguments, function( elem ) {
361
+ return domManip( this, arguments, function( elem ) {
350
362
  if ( this.parentNode ) {
351
363
  this.parentNode.insertBefore( elem, this.nextSibling );
352
364
  }
353
- });
354
- },
355
-
356
- remove: function( selector, keepData /* Internal Use Only */ ) {
357
- var elem,
358
- elems = selector ? jQuery.filter( selector, this ) : this,
359
- i = 0;
360
-
361
- for ( ; (elem = elems[i]) != null; i++ ) {
362
- if ( !keepData && elem.nodeType === 1 ) {
363
- jQuery.cleanData( getAll( elem ) );
364
- }
365
-
366
- if ( elem.parentNode ) {
367
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
368
- setGlobalEval( getAll( elem, "script" ) );
369
- }
370
- elem.parentNode.removeChild( elem );
371
- }
372
- }
373
-
374
- return this;
365
+ } );
375
366
  },
376
367
 
377
368
  empty: function() {
378
369
  var elem,
379
370
  i = 0;
380
371
 
381
- for ( ; (elem = this[i]) != null; i++ ) {
372
+ for ( ; ( elem = this[ i ] ) != null; i++ ) {
382
373
  if ( elem.nodeType === 1 ) {
383
374
 
384
375
  // Prevent memory leaks
@@ -396,9 +387,9 @@ jQuery.fn.extend({
396
387
  dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
397
388
  deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
398
389
 
399
- return this.map(function() {
390
+ return this.map( function() {
400
391
  return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
401
- });
392
+ } );
402
393
  },
403
394
 
404
395
  html: function( value ) {
@@ -415,7 +406,7 @@ jQuery.fn.extend({
415
406
  if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
416
407
  !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
417
408
 
418
- value = value.replace( rxhtmlTag, "<$1></$2>" );
409
+ value = jQuery.htmlPrefilter( value );
419
410
 
420
411
  try {
421
412
  for ( ; i < l; i++ ) {
@@ -431,7 +422,7 @@ jQuery.fn.extend({
431
422
  elem = 0;
432
423
 
433
424
  // If using innerHTML throws an exception, use the fallback method
434
- } catch( e ) {}
425
+ } catch ( e ) {}
435
426
  }
436
427
 
437
428
  if ( elem ) {
@@ -441,115 +432,25 @@ jQuery.fn.extend({
441
432
  },
442
433
 
443
434
  replaceWith: function() {
444
- var arg = arguments[ 0 ];
445
-
446
- // Make the changes, replacing each context element with the new content
447
- this.domManip( arguments, function( elem ) {
448
- arg = this.parentNode;
449
-
450
- jQuery.cleanData( getAll( this ) );
451
-
452
- if ( arg ) {
453
- arg.replaceChild( elem, this );
454
- }
455
- });
456
-
457
- // Force removal if there was no new content (e.g., from empty arguments)
458
- return arg && (arg.length || arg.nodeType) ? this : this.remove();
459
- },
460
-
461
- detach: function( selector ) {
462
- return this.remove( selector, true );
463
- },
464
-
465
- domManip: function( args, callback ) {
466
-
467
- // Flatten any nested arrays
468
- args = concat.apply( [], args );
469
-
470
- var fragment, first, scripts, hasScripts, node, doc,
471
- i = 0,
472
- l = this.length,
473
- set = this,
474
- iNoClone = l - 1,
475
- value = args[ 0 ],
476
- isFunction = jQuery.isFunction( value );
477
-
478
- // We can't cloneNode fragments that contain checked, in WebKit
479
- if ( isFunction ||
480
- ( l > 1 && typeof value === "string" &&
481
- !support.checkClone && rchecked.test( value ) ) ) {
482
- return this.each(function( index ) {
483
- var self = set.eq( index );
484
- if ( isFunction ) {
485
- args[ 0 ] = value.call( this, index, self.html() );
486
- }
487
- self.domManip( args, callback );
488
- });
489
- }
490
-
491
- if ( l ) {
492
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
493
- first = fragment.firstChild;
494
-
495
- if ( fragment.childNodes.length === 1 ) {
496
- fragment = first;
497
- }
498
-
499
- if ( first ) {
500
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
501
- hasScripts = scripts.length;
502
-
503
- // Use the original fragment for the last item instead of the first because it can end up
504
- // being emptied incorrectly in certain situations (#8070).
505
- for ( ; i < l; i++ ) {
506
- node = fragment;
435
+ var ignored = [];
507
436
 
508
- if ( i !== iNoClone ) {
509
- node = jQuery.clone( node, true, true );
437
+ // Make the changes, replacing each non-ignored context element with the new content
438
+ return domManip( this, arguments, function( elem ) {
439
+ var parent = this.parentNode;
510
440
 
511
- // Keep references to cloned scripts for later restoration
512
- if ( hasScripts ) {
513
- // Support: QtWebKit
514
- // jQuery.merge because push.apply(_, arraylike) throws
515
- jQuery.merge( scripts, getAll( node, "script" ) );
516
- }
517
- }
518
-
519
- callback.call( this[ i ], node, i );
520
- }
521
-
522
- if ( hasScripts ) {
523
- doc = scripts[ scripts.length - 1 ].ownerDocument;
524
-
525
- // Reenable scripts
526
- jQuery.map( scripts, restoreScript );
527
-
528
- // Evaluate executable scripts on first document insertion
529
- for ( i = 0; i < hasScripts; i++ ) {
530
- node = scripts[ i ];
531
- if ( rscriptType.test( node.type || "" ) &&
532
- !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
533
-
534
- if ( node.src ) {
535
- // Optional AJAX dependency, but won't run scripts if not present
536
- if ( jQuery._evalUrl ) {
537
- jQuery._evalUrl( node.src );
538
- }
539
- } else {
540
- jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
541
- }
542
- }
543
- }
441
+ if ( jQuery.inArray( this, ignored ) < 0 ) {
442
+ jQuery.cleanData( getAll( this ) );
443
+ if ( parent ) {
444
+ parent.replaceChild( elem, this );
544
445
  }
545
446
  }
546
- }
547
447
 
548
- return this;
448
+ // Force callback invocation
449
+ }, ignored );
549
450
  }
550
- });
451
+ } );
551
452
 
552
- jQuery.each({
453
+ jQuery.each( {
553
454
  appendTo: "append",
554
455
  prependTo: "prepend",
555
456
  insertBefore: "before",
@@ -574,7 +475,7 @@ jQuery.each({
574
475
 
575
476
  return this.pushStack( ret );
576
477
  };
577
- });
478
+ } );
578
479
 
579
480
  return jQuery;
580
- });
481
+ } );