railsstrap 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -27
  3. data/app/helpers/railsstrap/aside_helper.rb +59 -0
  4. data/app/helpers/railsstrap/badge_label_helper.rb +0 -4
  5. data/app/helpers/railsstrap/bootstrap_flash_helper.rb +1 -1
  6. data/app/helpers/railsstrap/date_picker_helper.rb +16 -8
  7. data/app/helpers/railsstrap/modal_helper.rb +18 -24
  8. data/lib/generators/railsstrap/install/templates/bootstrap_and_overrides.less +42 -26
  9. data/lib/railsstrap/constants.rb +1 -1
  10. data/lib/railsstrap/engine.rb +9 -5
  11. data/spec/lib/railsstrap/aside_helper_spec.rb +140 -0
  12. data/spec/lib/railsstrap/badge_label_helper_spec.rb +42 -0
  13. data/spec/lib/railsstrap/bootstrap_flash_helper_spec.rb +130 -0
  14. data/spec/lib/railsstrap/breadcrumbs_spec.rb +75 -0
  15. data/spec/lib/railsstrap/datepicker_helper_spec.rb +59 -0
  16. data/spec/lib/railsstrap/form_errors_helper_spec.rb +147 -0
  17. data/spec/lib/railsstrap/glyph_helper_spec.rb +24 -0
  18. data/spec/lib/railsstrap/icon_helper_spec.rb +24 -0
  19. data/spec/lib/railsstrap/modal_helper_spec.rb +140 -0
  20. data/spec/lib/railsstrap/navbar_helper_spec.rb +373 -0
  21. data/spec/lib/railsstrap/uri_state_spec.rb +49 -0
  22. data/spec/spec_helper.rb +20 -0
  23. data/vendor/assets/bower_components/bootstrap/Gruntfile.js +45 -8
  24. data/vendor/assets/bower_components/bootstrap/LICENSE +1 -1
  25. data/vendor/assets/bower_components/bootstrap/README.md +12 -9
  26. data/vendor/assets/bower_components/bootstrap/bower.json +1 -1
  27. data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css +8 -2
  28. data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css.map +1 -1
  29. data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.min.css +3 -3
  30. data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css +257 -23
  31. data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css.map +1 -1
  32. data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css +3 -3
  33. data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  34. data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +273 -214
  35. data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  36. data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  37. data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
  38. data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.js +55 -69
  39. data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.min.js +4 -4
  40. data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  41. data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg +273 -214
  42. data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  43. data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  44. data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  45. data/vendor/assets/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js +41 -0
  46. data/vendor/assets/bower_components/bootstrap/grunt/configBridge.json +1 -0
  47. data/vendor/assets/bower_components/bootstrap/grunt/sauce_browsers.yml +4 -4
  48. data/vendor/assets/bower_components/bootstrap/js/affix.js +4 -4
  49. data/vendor/assets/bower_components/bootstrap/js/alert.js +3 -3
  50. data/vendor/assets/bower_components/bootstrap/js/button.js +3 -3
  51. data/vendor/assets/bower_components/bootstrap/js/carousel.js +7 -10
  52. data/vendor/assets/bower_components/bootstrap/js/collapse.js +4 -4
  53. data/vendor/assets/bower_components/bootstrap/js/dropdown.js +3 -3
  54. data/vendor/assets/bower_components/bootstrap/js/modal.js +3 -3
  55. data/vendor/assets/bower_components/bootstrap/js/popover.js +7 -13
  56. data/vendor/assets/bower_components/bootstrap/js/scrollspy.js +3 -3
  57. data/vendor/assets/bower_components/bootstrap/js/tab.js +3 -3
  58. data/vendor/assets/bower_components/bootstrap/js/tooltip.js +10 -16
  59. data/vendor/assets/bower_components/bootstrap/js/transition.js +2 -2
  60. data/vendor/assets/bower_components/bootstrap/less/alerts.less +5 -0
  61. data/vendor/assets/bower_components/bootstrap/less/badges.less +4 -0
  62. data/vendor/assets/bower_components/bootstrap/less/button-groups.less +2 -2
  63. data/vendor/assets/bower_components/bootstrap/less/buttons.less +1 -1
  64. data/vendor/assets/bower_components/bootstrap/less/carousel.less +8 -6
  65. data/vendor/assets/bower_components/bootstrap/less/close.less +1 -0
  66. data/vendor/assets/bower_components/bootstrap/less/dropdowns.less +2 -1
  67. data/vendor/assets/bower_components/bootstrap/less/forms.less +41 -21
  68. data/vendor/assets/bower_components/bootstrap/less/glyphicons.less +67 -0
  69. data/vendor/assets/bower_components/bootstrap/less/jumbotron.less +1 -0
  70. data/vendor/assets/bower_components/bootstrap/less/media.less +14 -0
  71. data/vendor/assets/bower_components/bootstrap/less/mixins/vendor-prefixes.less +1 -1
  72. data/vendor/assets/bower_components/bootstrap/less/navbar.less +1 -0
  73. data/vendor/assets/bower_components/bootstrap/less/panels.less +5 -1
  74. data/vendor/assets/bower_components/bootstrap/less/popovers.less +1 -1
  75. data/vendor/assets/bower_components/bootstrap/less/tables.less +3 -3
  76. data/vendor/assets/bower_components/bootstrap/less/theme.less +3 -2
  77. data/vendor/assets/bower_components/bootstrap/less/tooltip.less +1 -1
  78. data/vendor/assets/bower_components/bootstrap/less/variables.less +3 -2
  79. data/vendor/assets/bower_components/bootstrap/package.json +14 -13
  80. data/vendor/assets/bower_components/jquery/bower.json +2 -2
  81. data/vendor/assets/bower_components/jquery/dist/jquery.js +277 -262
  82. data/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -4
  83. data/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -1
  84. data/vendor/assets/bower_components/jquery/src/ajax.js +11 -31
  85. data/vendor/assets/bower_components/jquery/src/ajax/xhr.js +3 -2
  86. data/vendor/assets/bower_components/jquery/src/attributes/attr.js +0 -2
  87. data/vendor/assets/bower_components/jquery/src/attributes/classes.js +4 -4
  88. data/vendor/assets/bower_components/jquery/src/attributes/prop.js +1 -3
  89. data/vendor/assets/bower_components/jquery/src/attributes/support.js +8 -8
  90. data/vendor/assets/bower_components/jquery/src/attributes/val.js +3 -5
  91. data/vendor/assets/bower_components/jquery/src/core.js +6 -7
  92. data/vendor/assets/bower_components/jquery/src/core/init.js +3 -3
  93. data/vendor/assets/bower_components/jquery/src/core/ready.js +1 -1
  94. data/vendor/assets/bower_components/jquery/src/css.js +28 -29
  95. data/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +2 -4
  96. data/vendor/assets/bower_components/jquery/src/css/curCSS.js +1 -1
  97. data/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +1 -1
  98. data/vendor/assets/bower_components/jquery/src/css/support.js +5 -0
  99. data/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +8 -1
  100. data/vendor/assets/bower_components/jquery/src/data.js +10 -11
  101. data/vendor/assets/bower_components/jquery/src/data/Data.js +3 -3
  102. data/vendor/assets/bower_components/jquery/src/deferred.js +2 -2
  103. data/vendor/assets/bower_components/jquery/src/dimensions.js +1 -1
  104. data/vendor/assets/bower_components/jquery/src/effects.js +29 -30
  105. data/vendor/assets/bower_components/jquery/src/effects/Tween.js +7 -7
  106. data/vendor/assets/bower_components/jquery/src/event.js +5 -5
  107. data/vendor/assets/bower_components/jquery/src/event/ajax.js +13 -0
  108. data/vendor/assets/bower_components/jquery/src/exports/global.js +2 -2
  109. data/vendor/assets/bower_components/jquery/src/intro.js +8 -8
  110. data/vendor/assets/bower_components/jquery/src/jquery.js +1 -0
  111. data/vendor/assets/bower_components/jquery/src/manipulation.js +9 -11
  112. data/vendor/assets/bower_components/jquery/src/manipulation/support.js +6 -5
  113. data/vendor/assets/bower_components/jquery/src/offset.js +9 -6
  114. data/vendor/assets/bower_components/jquery/src/queue.js +3 -3
  115. data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.js +83 -60
  116. data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -3
  117. data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -1
  118. data/vendor/assets/bower_components/jquery/src/traversing.js +3 -4
  119. data/vendor/assets/bower_components/jquery/src/wrap.js +1 -0
  120. data/vendor/assets/stylesheets/aside/aside.less +18 -2
  121. data/vendor/assets/stylesheets/bootstrap.less +2 -0
  122. data/vendor/assets/stylesheets/dist/railsstrap.css +28 -6
  123. data/vendor/assets/stylesheets/fontawesome-local.less +15 -0
  124. data/vendor/assets/stylesheets/glyphicons.less +12 -0
  125. metadata +278 -7
@@ -5,15 +5,13 @@ function addGetHookIf( conditionFn, hookFn ) {
5
5
  return {
6
6
  get: function() {
7
7
  if ( conditionFn() ) {
8
- // Hook not needed (or it's not possible to use it due to missing dependency),
9
- // remove it.
10
- // Since there are no other hooks for marginRight, remove the whole object.
8
+ // Hook not needed (or it's not possible to use it due
9
+ // to missing dependency), remove it.
11
10
  delete this.get;
12
11
  return;
13
12
  }
14
13
 
15
14
  // Hook needed; redefine it so that the support test is not executed again.
16
-
17
15
  return (this.get = hookFn).apply( this, arguments );
18
16
  }
19
17
  };
@@ -13,7 +13,7 @@ function curCSS( elem, name, computed ) {
13
13
  computed = computed || getStyles( elem );
14
14
 
15
15
  // Support: IE9
16
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
16
+ // getPropertyValue is only needed for .css('filter') (#12537)
17
17
  if ( computed ) {
18
18
  ret = computed.getPropertyValue( name ) || computed[ name ];
19
19
  }
@@ -19,7 +19,7 @@ function actualDisplay( name, doc ) {
19
19
  // getDefaultComputedStyle might be reliably used only on attached element
20
20
  display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
21
21
 
22
- // Use of this method is a temporary fix (more like optmization) until something better comes along,
22
+ // Use of this method is a temporary fix (more like optimization) until something better comes along,
23
23
  // since it was removed from specification and supported only in FF
24
24
  style.display : jQuery.css( elem[ 0 ], "display" );
25
25
 
@@ -13,6 +13,8 @@ define([
13
13
  return;
14
14
  }
15
15
 
16
+ // Support: IE9-11+
17
+ // Style of cloned element affects source element cloned (#8908)
16
18
  div.style.backgroundClip = "content-box";
17
19
  div.cloneNode( true ).style.backgroundClip = "";
18
20
  support.clearCloneStyle = div.style.backgroundClip === "content-box";
@@ -45,6 +47,7 @@ define([
45
47
  if ( window.getComputedStyle ) {
46
48
  jQuery.extend( support, {
47
49
  pixelPosition: function() {
50
+
48
51
  // This test is executed only once but we still do memoizing
49
52
  // since we can use the boxSizingReliable pre-computing.
50
53
  // No need to check if the test was already performed, though.
@@ -58,6 +61,7 @@ define([
58
61
  return boxSizingReliableVal;
59
62
  },
60
63
  reliableMarginRight: function() {
64
+
61
65
  // Support: Android 2.3
62
66
  // Check if div with explicit width and no margin-right incorrectly
63
67
  // gets computed margin-right based on width of container. (#3333)
@@ -79,6 +83,7 @@ define([
79
83
  ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
80
84
 
81
85
  docElem.removeChild( container );
86
+ div.removeChild( marginDiv );
82
87
 
83
88
  return ret;
84
89
  }
@@ -1,5 +1,12 @@
1
1
  define(function() {
2
2
  return function( elem ) {
3
- return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
3
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
4
+ // IE throws on elements created in popups
5
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6
+ if ( elem.ownerDocument.defaultView.opener ) {
7
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
8
+ }
9
+
10
+ return window.getComputedStyle( elem, null );
4
11
  };
5
12
  });
@@ -6,17 +6,16 @@ define([
6
6
  "./data/var/data_user"
7
7
  ], function( jQuery, rnotwhite, access, data_priv, data_user ) {
8
8
 
9
- /*
10
- Implementation Summary
11
-
12
- 1. Enforce API surface and semantic compatibility with 1.9.x branch
13
- 2. Improve the module's maintainability by reducing the storage
14
- paths to a single mechanism.
15
- 3. Use the same single mechanism to support "private" and "user" data.
16
- 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
17
- 5. Avoid exposing implementation details on user objects (eg. expando properties)
18
- 6. Provide a clear path for implementation upgrade to WeakMap in 2014
19
- */
9
+ // Implementation Summary
10
+ //
11
+ // 1. Enforce API surface and semantic compatibility with 1.9.x branch
12
+ // 2. Improve the module's maintainability by reducing the storage
13
+ // paths to a single mechanism.
14
+ // 3. Use the same single mechanism to support "private" and "user" data.
15
+ // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
16
+ // 5. Avoid exposing implementation details on user objects (eg. expando properties)
17
+ // 6. Provide a clear path for implementation upgrade to WeakMap in 2014
18
+
20
19
  var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
21
20
  rmultiDash = /([A-Z])/g;
22
21
 
@@ -5,7 +5,7 @@ define([
5
5
  ], function( jQuery, rnotwhite ) {
6
6
 
7
7
  function Data() {
8
- // Support: Android < 4,
8
+ // Support: Android<4,
9
9
  // Old WebKit does not have Object.preventExtensions/freeze method,
10
10
  // return new empty object instead with no [[set]] accessor
11
11
  Object.defineProperty( this.cache = {}, 0, {
@@ -14,7 +14,7 @@ function Data() {
14
14
  }
15
15
  });
16
16
 
17
- this.expando = jQuery.expando + Math.random();
17
+ this.expando = jQuery.expando + Data.uid++;
18
18
  }
19
19
 
20
20
  Data.uid = 1;
@@ -42,7 +42,7 @@ Data.prototype = {
42
42
  descriptor[ this.expando ] = { value: unlock };
43
43
  Object.defineProperties( owner, descriptor );
44
44
 
45
- // Support: Android < 4
45
+ // Support: Android<4
46
46
  // Fallback to a less secure definition
47
47
  } catch ( e ) {
48
48
  descriptor[ this.expando ] = unlock;
@@ -119,7 +119,7 @@ jQuery.extend({
119
119
 
120
120
  progressValues, progressContexts, resolveContexts;
121
121
 
122
- // add listeners to Deferred subordinates; treat others as resolved
122
+ // Add listeners to Deferred subordinates; treat others as resolved
123
123
  if ( length > 1 ) {
124
124
  progressValues = new Array( length );
125
125
  progressContexts = new Array( length );
@@ -136,7 +136,7 @@ jQuery.extend({
136
136
  }
137
137
  }
138
138
 
139
- // if we're not waiting on anything, resolve the master
139
+ // If we're not waiting on anything, resolve the master
140
140
  if ( !remaining ) {
141
141
  deferred.resolveWith( resolveContexts, resolveValues );
142
142
  }
@@ -7,7 +7,7 @@ define([
7
7
  // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
8
8
  jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
9
9
  jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
10
- // margin is only for outerHeight, outerWidth
10
+ // Margin is only for outerHeight, outerWidth
11
11
  jQuery.fn[ funcName ] = function( margin, value ) {
12
12
  var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
13
13
  extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
@@ -44,16 +44,16 @@ var
44
44
  start = +target || 1;
45
45
 
46
46
  do {
47
- // If previous iteration zeroed out, double until we get *something*
48
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
47
+ // If previous iteration zeroed out, double until we get *something*.
48
+ // Use string for doubling so we don't accidentally see scale as unchanged below
49
49
  scale = scale || ".5";
50
50
 
51
51
  // Adjust and apply
52
52
  start = start / scale;
53
53
  jQuery.style( tween.elem, prop, start + unit );
54
54
 
55
- // Update scale, tolerating zero or NaN from tween.cur()
56
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
55
+ // Update scale, tolerating zero or NaN from tween.cur(),
56
+ // break the loop if scale is unchanged or perfect, or if we've just had enough
57
57
  } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
58
58
  }
59
59
 
@@ -85,8 +85,8 @@ function genFx( type, includeWidth ) {
85
85
  i = 0,
86
86
  attrs = { height: type };
87
87
 
88
- // if we include width, step value is 1 to do all cssExpand values,
89
- // if we don't include width, step value is 2 to skip over Left and Right
88
+ // If we include width, step value is 1 to do all cssExpand values,
89
+ // otherwise step value is 2 to skip over Left and Right
90
90
  includeWidth = includeWidth ? 1 : 0;
91
91
  for ( ; i < 4 ; i += 2 - includeWidth ) {
92
92
  which = cssExpand[ i ];
@@ -108,7 +108,7 @@ function createTween( value, prop, animation ) {
108
108
  for ( ; index < length; index++ ) {
109
109
  if ( (tween = collection[ index ].call( animation, prop, value )) ) {
110
110
 
111
- // we're done with this property
111
+ // We're done with this property
112
112
  return tween;
113
113
  }
114
114
  }
@@ -123,7 +123,7 @@ function defaultPrefilter( elem, props, opts ) {
123
123
  hidden = elem.nodeType && isHidden( elem ),
124
124
  dataShow = data_priv.get( elem, "fxshow" );
125
125
 
126
- // handle queue: false promises
126
+ // Handle queue: false promises
127
127
  if ( !opts.queue ) {
128
128
  hooks = jQuery._queueHooks( elem, "fx" );
129
129
  if ( hooks.unqueued == null ) {
@@ -138,8 +138,7 @@ function defaultPrefilter( elem, props, opts ) {
138
138
  hooks.unqueued++;
139
139
 
140
140
  anim.always(function() {
141
- // doing this makes sure that the complete handler will be called
142
- // before this completes
141
+ // Ensure the complete handler is called before this completes
143
142
  anim.always(function() {
144
143
  hooks.unqueued--;
145
144
  if ( !jQuery.queue( elem, "fx" ).length ) {
@@ -149,7 +148,7 @@ function defaultPrefilter( elem, props, opts ) {
149
148
  });
150
149
  }
151
150
 
152
- // height/width overflow pass
151
+ // Height/width overflow pass
153
152
  if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
154
153
  // Make sure that nothing sneaks out
155
154
  // Record all 3 overflow attributes because IE9-10 do not
@@ -211,7 +210,7 @@ function defaultPrefilter( elem, props, opts ) {
211
210
  dataShow = data_priv.access( elem, "fxshow", {} );
212
211
  }
213
212
 
214
- // store state if its toggle - enables .stop().toggle() to "reverse"
213
+ // Store state if its toggle - enables .stop().toggle() to "reverse"
215
214
  if ( toggle ) {
216
215
  dataShow.hidden = !hidden;
217
216
  }
@@ -271,8 +270,8 @@ function propFilter( props, specialEasing ) {
271
270
  value = hooks.expand( value );
272
271
  delete props[ name ];
273
272
 
274
- // not quite $.extend, this wont overwrite keys already present.
275
- // also - reusing 'index' from above because we have the correct "name"
273
+ // Not quite $.extend, this won't overwrite existing keys.
274
+ // Reusing 'index' because we have the correct "name"
276
275
  for ( index in value ) {
277
276
  if ( !( index in props ) ) {
278
277
  props[ index ] = value[ index ];
@@ -291,7 +290,7 @@ function Animation( elem, properties, options ) {
291
290
  index = 0,
292
291
  length = animationPrefilters.length,
293
292
  deferred = jQuery.Deferred().always( function() {
294
- // don't match elem in the :animated selector
293
+ // Don't match elem in the :animated selector
295
294
  delete tick.elem;
296
295
  }),
297
296
  tick = function() {
@@ -300,7 +299,8 @@ function Animation( elem, properties, options ) {
300
299
  }
301
300
  var currentTime = fxNow || createFxNow(),
302
301
  remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
303
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
302
+ // Support: Android 2.3
303
+ // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
304
304
  temp = remaining / animation.duration || 0,
305
305
  percent = 1 - temp,
306
306
  index = 0,
@@ -336,7 +336,7 @@ function Animation( elem, properties, options ) {
336
336
  },
337
337
  stop: function( gotoEnd ) {
338
338
  var index = 0,
339
- // if we are going to the end, we want to run all the tweens
339
+ // If we are going to the end, we want to run all the tweens
340
340
  // otherwise we skip this part
341
341
  length = gotoEnd ? animation.tweens.length : 0;
342
342
  if ( stopped ) {
@@ -347,8 +347,7 @@ function Animation( elem, properties, options ) {
347
347
  animation.tweens[ index ].run( 1 );
348
348
  }
349
349
 
350
- // resolve when we played the last frame
351
- // otherwise, reject
350
+ // Resolve when we played the last frame; otherwise, reject
352
351
  if ( gotoEnd ) {
353
352
  deferred.resolveWith( elem, [ animation, gotoEnd ] );
354
353
  } else {
@@ -430,7 +429,7 @@ jQuery.speed = function( speed, easing, fn ) {
430
429
  opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
431
430
  opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
432
431
 
433
- // normalize opt.queue - true/undefined/null -> "fx"
432
+ // Normalize opt.queue - true/undefined/null -> "fx"
434
433
  if ( opt.queue == null || opt.queue === true ) {
435
434
  opt.queue = "fx";
436
435
  }
@@ -454,10 +453,10 @@ jQuery.speed = function( speed, easing, fn ) {
454
453
  jQuery.fn.extend({
455
454
  fadeTo: function( speed, to, easing, callback ) {
456
455
 
457
- // show any hidden elements after setting opacity to 0
456
+ // Show any hidden elements after setting opacity to 0
458
457
  return this.filter( isHidden ).css( "opacity", 0 ).show()
459
458
 
460
- // animate to the value specified
459
+ // Animate to the value specified
461
460
  .end().animate({ opacity: to }, speed, easing, callback );
462
461
  },
463
462
  animate: function( prop, speed, easing, callback ) {
@@ -520,9 +519,9 @@ jQuery.fn.extend({
520
519
  }
521
520
  }
522
521
 
523
- // start the next in the queue if the last step wasn't forced
524
- // timers currently will call their complete callbacks, which will dequeue
525
- // but only if they were gotoEnd
522
+ // Start the next in the queue if the last step wasn't forced.
523
+ // Timers currently will call their complete callbacks, which
524
+ // will dequeue but only if they were gotoEnd.
526
525
  if ( dequeue || !gotoEnd ) {
527
526
  jQuery.dequeue( this, type );
528
527
  }
@@ -540,17 +539,17 @@ jQuery.fn.extend({
540
539
  timers = jQuery.timers,
541
540
  length = queue ? queue.length : 0;
542
541
 
543
- // enable finishing flag on private data
542
+ // Enable finishing flag on private data
544
543
  data.finish = true;
545
544
 
546
- // empty the queue first
545
+ // Empty the queue first
547
546
  jQuery.queue( this, type, [] );
548
547
 
549
548
  if ( hooks && hooks.stop ) {
550
549
  hooks.stop.call( this, true );
551
550
  }
552
551
 
553
- // look for any active animations, and finish them
552
+ // Look for any active animations, and finish them
554
553
  for ( index = timers.length; index--; ) {
555
554
  if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
556
555
  timers[ index ].anim.stop( true );
@@ -558,14 +557,14 @@ jQuery.fn.extend({
558
557
  }
559
558
  }
560
559
 
561
- // look for any animations in the old queue and finish them
560
+ // Look for any animations in the old queue and finish them
562
561
  for ( index = 0; index < length; index++ ) {
563
562
  if ( queue[ index ] && queue[ index ].finish ) {
564
563
  queue[ index ].finish.call( this );
565
564
  }
566
565
  }
567
566
 
568
- // turn off finishing flag
567
+ // Turn off finishing flag
569
568
  delete data.finish;
570
569
  });
571
570
  }
@@ -64,17 +64,18 @@ Tween.propHooks = {
64
64
  return tween.elem[ tween.prop ];
65
65
  }
66
66
 
67
- // passing an empty string as a 3rd parameter to .css will automatically
68
- // attempt a parseFloat and fallback to a string if the parse fails
69
- // so, simple values such as "10px" are parsed to Float.
70
- // complex values such as "rotate(1rad)" are returned as is.
67
+ // Passing an empty string as a 3rd parameter to .css will automatically
68
+ // attempt a parseFloat and fallback to a string if the parse fails.
69
+ // Simple values such as "10px" are parsed to Float;
70
+ // complex values such as "rotate(1rad)" are returned as-is.
71
71
  result = jQuery.css( tween.elem, tween.prop, "" );
72
72
  // Empty strings, null, undefined and "auto" are converted to 0.
73
73
  return !result || result === "auto" ? 0 : result;
74
74
  },
75
75
  set: function( tween ) {
76
- // use step hook for back compat - use cssHook if its there - use .style if its
77
- // available and use plain properties where available
76
+ // Use step hook for back compat.
77
+ // Use cssHook if its there.
78
+ // Use .style if available and use plain properties where available.
78
79
  if ( jQuery.fx.step[ tween.prop ] ) {
79
80
  jQuery.fx.step[ tween.prop ]( tween );
80
81
  } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
@@ -88,7 +89,6 @@ Tween.propHooks = {
88
89
 
89
90
  // Support: IE9
90
91
  // Panic based approach to setting things on disconnected nodes
91
-
92
92
  Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
93
93
  set: function( tween ) {
94
94
  if ( tween.elem.nodeType && tween.elem.parentNode ) {
@@ -379,8 +379,8 @@ jQuery.event = {
379
379
  j = 0;
380
380
  while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
381
381
 
382
- // Triggered event must either 1) have no namespace, or
383
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
382
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
383
+ // a subset or equal to those in the bound event (both can have no namespace).
384
384
  if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
385
385
 
386
386
  event.handleObj = handleObj;
@@ -530,7 +530,7 @@ jQuery.event = {
530
530
  event.target = document;
531
531
  }
532
532
 
533
- // Support: Safari 6.0+, Chrome < 28
533
+ // Support: Safari 6.0+, Chrome<28
534
534
  // Target should not be a text node (#504, #13143)
535
535
  if ( event.target.nodeType === 3 ) {
536
536
  event.target = event.target.parentNode;
@@ -635,7 +635,7 @@ jQuery.Event = function( src, props ) {
635
635
  // by a handler lower down the tree; reflect the correct value.
636
636
  this.isDefaultPrevented = src.defaultPrevented ||
637
637
  src.defaultPrevented === undefined &&
638
- // Support: Android < 4.0
638
+ // Support: Android<4.0
639
639
  src.returnValue === false ?
640
640
  returnTrue :
641
641
  returnFalse;
@@ -725,8 +725,8 @@ jQuery.each({
725
725
  };
726
726
  });
727
727
 
728
- // Create "bubbling" focus and blur events
729
728
  // Support: Firefox, Chrome, Safari
729
+ // Create "bubbling" focus and blur events
730
730
  if ( !support.focusinBubbles ) {
731
731
  jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
732
732
 
@@ -0,0 +1,13 @@
1
+ define([
2
+ "../core",
3
+ "../event"
4
+ ], function( jQuery ) {
5
+
6
+ // Attach a bunch of functions for handling common AJAX events
7
+ jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
8
+ jQuery.fn[ type ] = function( fn ) {
9
+ return this.on( type, fn );
10
+ };
11
+ });
12
+
13
+ });
@@ -22,8 +22,8 @@ jQuery.noConflict = function( deep ) {
22
22
  return jQuery;
23
23
  };
24
24
 
25
- // Expose jQuery and $ identifiers, even in
26
- // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
25
+ // Expose jQuery and $ identifiers, even in AMD
26
+ // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
27
27
  // and CommonJS for browser emulators (#13566)
28
28
  if ( typeof noGlobal === strundefined ) {
29
29
  window.jQuery = window.$ = jQuery;