angular-gem 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/angular-gem/version.rb +1 -1
- data/vendor/assets/javascripts/1.3.6/angular-animate.js +2137 -0
- data/vendor/assets/javascripts/1.3.6/angular-aria.js +332 -0
- data/vendor/assets/javascripts/1.3.6/angular-cookies.js +206 -0
- data/vendor/assets/javascripts/1.3.6/angular-loader.js +405 -0
- data/vendor/assets/javascripts/1.3.6/angular-messages.js +400 -0
- data/vendor/assets/javascripts/1.3.6/angular-mocks.js +2382 -0
- data/vendor/assets/javascripts/1.3.6/angular-resource.js +667 -0
- data/vendor/assets/javascripts/1.3.6/angular-route.js +995 -0
- data/vendor/assets/javascripts/1.3.6/angular-sanitize.js +680 -0
- data/vendor/assets/javascripts/1.3.6/angular-scenario.js +37354 -0
- data/vendor/assets/javascripts/1.3.6/angular-touch.js +622 -0
- data/vendor/assets/javascripts/1.3.6/angular.js +26000 -0
- data/vendor/assets/javascripts/angular-animate.js +121 -120
- data/vendor/assets/javascripts/angular-aria.js +39 -28
- data/vendor/assets/javascripts/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/angular-loader.js +2 -2
- data/vendor/assets/javascripts/angular-messages.js +1 -1
- data/vendor/assets/javascripts/angular-mocks.js +7 -5
- data/vendor/assets/javascripts/angular-resource.js +1 -1
- data/vendor/assets/javascripts/angular-route.js +1 -2
- data/vendor/assets/javascripts/angular-sanitize.js +6 -4
- data/vendor/assets/javascripts/angular-scenario.js +282 -199
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular.js +280 -197
- metadata +14 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.6
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -19,7 +19,7 @@
|
|
19
19
|
* # Usage
|
20
20
|
*
|
21
21
|
* To see animations in action, all that is required is to define the appropriate CSS classes
|
22
|
-
* or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:
|
22
|
+
* or to register a JavaScript animation via the `myModule.animation()` function. The directives that support animation automatically are:
|
23
23
|
* `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
|
24
24
|
* by using the `$animate` service.
|
25
25
|
*
|
@@ -161,8 +161,8 @@
|
|
161
161
|
* ### Structural transition animations
|
162
162
|
*
|
163
163
|
* Structural transitions (such as enter, leave and move) will always apply a `0s none` transition
|
164
|
-
* value to force the browser into rendering the styles defined in the setup (
|
165
|
-
* or
|
164
|
+
* value to force the browser into rendering the styles defined in the setup (`.ng-enter`, `.ng-leave`
|
165
|
+
* or `.ng-move`) class. This means that any active transition animations operating on the element
|
166
166
|
* will be cut off to make way for the enter, leave or move animation.
|
167
167
|
*
|
168
168
|
* ### Class-based transition animations
|
@@ -479,11 +479,12 @@ angular.module('ngAnimate', ['ng'])
|
|
479
479
|
function isMatchingElement(elm1, elm2) {
|
480
480
|
return extractElementNode(elm1) == extractElementNode(elm2);
|
481
481
|
}
|
482
|
-
|
482
|
+
var $$jqLite;
|
483
483
|
$provide.decorator('$animate',
|
484
|
-
['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest',
|
485
|
-
function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) {
|
484
|
+
['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest', '$$jqLite',
|
485
|
+
function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest, $$$jqLite) {
|
486
486
|
|
487
|
+
$$jqLite = $$$jqLite;
|
487
488
|
$rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
|
488
489
|
|
489
490
|
// Wait until all directive and route-related templates are downloaded and
|
@@ -877,22 +878,22 @@ angular.module('ngAnimate', ['ng'])
|
|
877
878
|
*
|
878
879
|
* Below is a breakdown of each step that occurs during the `animate` animation:
|
879
880
|
*
|
880
|
-
* | Animation Step
|
881
|
-
*
|
882
|
-
* | 1.
|
883
|
-
* | 2.
|
884
|
-
* | 3.
|
885
|
-
* | 4. the className class value is added to the element
|
886
|
-
* | 5.
|
887
|
-
* | 6.
|
888
|
-
* | 7.
|
889
|
-
* | 8.
|
890
|
-
* | 9.
|
891
|
-
* | 10. the className-active class is added (this triggers the CSS transition/animation)
|
892
|
-
* | 11.
|
893
|
-
* | 12.
|
894
|
-
* | 13. The animation ends and all generated CSS classes are removed from the element
|
895
|
-
* | 14. The returned promise is resolved.
|
881
|
+
* | Animation Step | What the element class attribute looks like |
|
882
|
+
* |-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
|
883
|
+
* | 1. `$animate.animate(...)` is called | `class="my-animation"` |
|
884
|
+
* | 2. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
885
|
+
* | 3. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
886
|
+
* | 4. the `className` class value is added to the element | `class="my-animation ng-animate className"` |
|
887
|
+
* | 5. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate className"` |
|
888
|
+
* | 6. `$animate` blocks all CSS transitions on the element to ensure the `.className` class styling is applied right away| `class="my-animation ng-animate className"` |
|
889
|
+
* | 7. `$animate` applies the provided collection of `from` CSS styles to the element | `class="my-animation ng-animate className"` |
|
890
|
+
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate className"` |
|
891
|
+
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate className"` |
|
892
|
+
* | 10. the `className-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate className className-active"` |
|
893
|
+
* | 11. `$animate` applies the collection of `to` CSS styles to the element which are then handled by the transition | `class="my-animation ng-animate className className-active"` |
|
894
|
+
* | 12. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate className className-active"` |
|
895
|
+
* | 13. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
896
|
+
* | 14. The returned promise is resolved. | `class="my-animation"` |
|
896
897
|
*
|
897
898
|
* @param {DOMElement} element the element that will be the focus of the enter animation
|
898
899
|
* @param {object} from a collection of CSS styles that will be applied to the element at the start of the animation
|
@@ -923,21 +924,21 @@ angular.module('ngAnimate', ['ng'])
|
|
923
924
|
*
|
924
925
|
* Below is a breakdown of each step that occurs during enter animation:
|
925
926
|
*
|
926
|
-
* | Animation Step
|
927
|
-
*
|
928
|
-
* | 1.
|
929
|
-
* | 2. element is inserted into the parentElement element or beside the afterElement element | class="my-animation" |
|
930
|
-
* | 3.
|
931
|
-
* | 4.
|
932
|
-
* | 5. the
|
933
|
-
* | 6.
|
934
|
-
* | 7.
|
935
|
-
* | 8.
|
936
|
-
* | 9.
|
937
|
-
* | 10. the
|
938
|
-
* | 11.
|
939
|
-
* | 12. The animation ends and all generated CSS classes are removed from the element
|
940
|
-
* | 13. The returned promise is resolved.
|
927
|
+
* | Animation Step | What the element class attribute looks like |
|
928
|
+
* |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
929
|
+
* | 1. `$animate.enter(...)` is called | `class="my-animation"` |
|
930
|
+
* | 2. element is inserted into the `parentElement` element or beside the `afterElement` element | `class="my-animation"` |
|
931
|
+
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
932
|
+
* | 4. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
933
|
+
* | 5. the `.ng-enter` class is added to the element | `class="my-animation ng-animate ng-enter"` |
|
934
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-enter"` |
|
935
|
+
* | 7. `$animate` blocks all CSS transitions on the element to ensure the `.ng-enter` class styling is applied right away | `class="my-animation ng-animate ng-enter"` |
|
936
|
+
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-enter"` |
|
937
|
+
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-enter"` |
|
938
|
+
* | 10. the `.ng-enter-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-enter ng-enter-active"` |
|
939
|
+
* | 11. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-enter ng-enter-active"` |
|
940
|
+
* | 12. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
941
|
+
* | 13. The returned promise is resolved. | `class="my-animation"` |
|
941
942
|
*
|
942
943
|
* @param {DOMElement} element the element that will be the focus of the enter animation
|
943
944
|
* @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation
|
@@ -969,21 +970,21 @@ angular.module('ngAnimate', ['ng'])
|
|
969
970
|
*
|
970
971
|
* Below is a breakdown of each step that occurs during leave animation:
|
971
972
|
*
|
972
|
-
* | Animation Step
|
973
|
-
*
|
974
|
-
* | 1.
|
975
|
-
* | 2.
|
976
|
-
* | 3.
|
977
|
-
* | 4. the
|
978
|
-
* | 5.
|
979
|
-
* | 6.
|
980
|
-
* | 7.
|
981
|
-
* | 8.
|
982
|
-
* | 9. the
|
983
|
-
* | 10.
|
984
|
-
* | 11. The animation ends and all generated CSS classes are removed from the element
|
985
|
-
* | 12. The element is removed from the DOM
|
986
|
-
* | 13. The returned promise is resolved.
|
973
|
+
* | Animation Step | What the element class attribute looks like |
|
974
|
+
* |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
975
|
+
* | 1. `$animate.leave(...)` is called | `class="my-animation"` |
|
976
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
977
|
+
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
978
|
+
* | 4. the `.ng-leave` class is added to the element | `class="my-animation ng-animate ng-leave"` |
|
979
|
+
* | 5. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-leave"` |
|
980
|
+
* | 6. `$animate` blocks all CSS transitions on the element to ensure the `.ng-leave` class styling is applied right away | `class="my-animation ng-animate ng-leave"` |
|
981
|
+
* | 7. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-leave"` |
|
982
|
+
* | 8. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-leave"` |
|
983
|
+
* | 9. the `.ng-leave-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-leave ng-leave-active"` |
|
984
|
+
* | 10. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-leave ng-leave-active"` |
|
985
|
+
* | 11. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
986
|
+
* | 12. The element is removed from the DOM | ... |
|
987
|
+
* | 13. The returned promise is resolved. | ... |
|
987
988
|
*
|
988
989
|
* @param {DOMElement} element the element that will be the focus of the leave animation
|
989
990
|
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
@@ -1014,21 +1015,21 @@ angular.module('ngAnimate', ['ng'])
|
|
1014
1015
|
*
|
1015
1016
|
* Below is a breakdown of each step that occurs during move animation:
|
1016
1017
|
*
|
1017
|
-
* | Animation Step
|
1018
|
-
*
|
1019
|
-
* | 1.
|
1020
|
-
* | 2. element is moved into the parentElement element or beside the afterElement element
|
1021
|
-
* | 3.
|
1022
|
-
* | 4.
|
1023
|
-
* | 5. the
|
1024
|
-
* | 6.
|
1025
|
-
* | 7.
|
1026
|
-
* | 8.
|
1027
|
-
* | 9.
|
1028
|
-
* | 10. the
|
1029
|
-
* | 11.
|
1030
|
-
* | 12. The animation ends and all generated CSS classes are removed from the element
|
1031
|
-
* | 13. The returned promise is resolved.
|
1018
|
+
* | Animation Step | What the element class attribute looks like |
|
1019
|
+
* |----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
|
1020
|
+
* | 1. `$animate.move(...)` is called | `class="my-animation"` |
|
1021
|
+
* | 2. element is moved into the parentElement element or beside the afterElement element | `class="my-animation"` |
|
1022
|
+
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
1023
|
+
* | 4. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
1024
|
+
* | 5. the `.ng-move` class is added to the element | `class="my-animation ng-animate ng-move"` |
|
1025
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-move"` |
|
1026
|
+
* | 7. `$animate` blocks all CSS transitions on the element to ensure the `.ng-move` class styling is applied right away | `class="my-animation ng-animate ng-move"` |
|
1027
|
+
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-move"` |
|
1028
|
+
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-move"` |
|
1029
|
+
* | 10. the `.ng-move-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-move ng-move-active"` |
|
1030
|
+
* | 11. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-move ng-move-active"` |
|
1031
|
+
* | 12. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
1032
|
+
* | 13. The returned promise is resolved. | `class="my-animation"` |
|
1032
1033
|
*
|
1033
1034
|
* @param {DOMElement} element the element that will be the focus of the move animation
|
1034
1035
|
* @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation
|
@@ -1062,18 +1063,18 @@ angular.module('ngAnimate', ['ng'])
|
|
1062
1063
|
*
|
1063
1064
|
* Below is a breakdown of each step that occurs during addClass animation:
|
1064
1065
|
*
|
1065
|
-
* | Animation Step
|
1066
|
-
*
|
1067
|
-
* | 1.
|
1068
|
-
* | 2.
|
1069
|
-
* | 3. the
|
1070
|
-
* | 4.
|
1071
|
-
* | 5. the
|
1072
|
-
* | 6.
|
1073
|
-
* | 7.
|
1074
|
-
* | 8. The animation ends and all generated CSS classes are removed from the element
|
1075
|
-
* | 9. The super class is kept on the element
|
1076
|
-
* | 10. The returned promise is resolved.
|
1066
|
+
* | Animation Step | What the element class attribute looks like |
|
1067
|
+
* |--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
1068
|
+
* | 1. `$animate.addClass(element, 'super')` is called | `class="my-animation"` |
|
1069
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
1070
|
+
* | 3. the `.super-add` class is added to the element | `class="my-animation ng-animate super-add"` |
|
1071
|
+
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate super-add"` |
|
1072
|
+
* | 5. the `.super` and `.super-add-active` classes are added (this triggers the CSS transition/animation) | `class="my-animation ng-animate super super-add super-add-active"` |
|
1073
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate super super-add super-add-active"` |
|
1074
|
+
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate super super-add super-add-active"` |
|
1075
|
+
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation super"` |
|
1076
|
+
* | 9. The super class is kept on the element | `class="my-animation super"` |
|
1077
|
+
* | 10. The returned promise is resolved. | `class="my-animation super"` |
|
1077
1078
|
*
|
1078
1079
|
* @param {DOMElement} element the element that will be animated
|
1079
1080
|
* @param {string} className the CSS class that will be added to the element and then animated
|
@@ -1096,17 +1097,17 @@ angular.module('ngAnimate', ['ng'])
|
|
1096
1097
|
*
|
1097
1098
|
* Below is a breakdown of each step that occurs during removeClass animation:
|
1098
1099
|
*
|
1099
|
-
* | Animation Step
|
1100
|
-
*
|
1101
|
-
* | 1.
|
1102
|
-
* | 2.
|
1103
|
-
* | 3. the
|
1104
|
-
* | 4.
|
1105
|
-
* | 5. the
|
1106
|
-
* | 6.
|
1107
|
-
* | 7.
|
1108
|
-
* | 8. The animation ends and all generated CSS classes are removed from the element
|
1109
|
-
* | 9. The returned promise is resolved.
|
1100
|
+
* | Animation Step | What the element class attribute looks like |
|
1101
|
+
* |----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
1102
|
+
* | 1. `$animate.removeClass(element, 'super')` is called | `class="my-animation super"` |
|
1103
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation super ng-animate"` |
|
1104
|
+
* | 3. the `.super-remove` class is added to the element | `class="my-animation super ng-animate super-remove"` |
|
1105
|
+
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation super ng-animate super-remove"` |
|
1106
|
+
* | 5. the `.super-remove-active` classes are added and `.super` is removed (this triggers the CSS transition/animation) | `class="my-animation ng-animate super-remove super-remove-active"` |
|
1107
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate super-remove super-remove-active"` |
|
1108
|
+
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate super-remove super-remove-active"` |
|
1109
|
+
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
1110
|
+
* | 9. The returned promise is resolved. | `class="my-animation"` |
|
1110
1111
|
*
|
1111
1112
|
*
|
1112
1113
|
* @param {DOMElement} element the element that will be animated
|
@@ -1124,19 +1125,19 @@ angular.module('ngAnimate', ['ng'])
|
|
1124
1125
|
* @name $animate#setClass
|
1125
1126
|
*
|
1126
1127
|
* @description Adds and/or removes the given CSS classes to and from the element.
|
1127
|
-
* Once complete, the done() callback will be fired (if provided).
|
1128
|
+
* Once complete, the `done()` callback will be fired (if provided).
|
1128
1129
|
*
|
1129
|
-
* | Animation Step
|
1130
|
-
*
|
1131
|
-
* | 1.
|
1132
|
-
* | 2.
|
1133
|
-
* | 3. the
|
1134
|
-
* | 4.
|
1135
|
-
* | 5. the
|
1136
|
-
* | 6.
|
1137
|
-
* | 7.
|
1138
|
-
* | 8. The animation ends and all generated CSS classes are removed from the element
|
1139
|
-
* | 9. The returned promise is resolved.
|
1130
|
+
* | Animation Step | What the element class attribute looks like |
|
1131
|
+
* |----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
|
1132
|
+
* | 1. `$animate.setClass(element, 'on', 'off')` is called | `class="my-animation off"` |
|
1133
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate off"` |
|
1134
|
+
* | 3. the `.on-add` and `.off-remove` classes are added to the element | `class="my-animation ng-animate on-add off-remove off"` |
|
1135
|
+
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate on-add off-remove off"` |
|
1136
|
+
* | 5. the `.on`, `.on-add-active` and `.off-remove-active` classes are added and `.off` is removed (this triggers the CSS transition/animation) | `class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active"` |
|
1137
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active"` |
|
1138
|
+
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active"` |
|
1139
|
+
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation on"` |
|
1140
|
+
* | 9. The returned promise is resolved. | `class="my-animation on"` |
|
1140
1141
|
*
|
1141
1142
|
* @param {DOMElement} element the element which will have its CSS classes changed
|
1142
1143
|
* removed from it
|
@@ -1274,7 +1275,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1274
1275
|
all animations call this shared animation triggering function internally.
|
1275
1276
|
The animationEvent variable refers to the JavaScript animation event that will be triggered
|
1276
1277
|
and the className value is the name of the animation that will be applied within the
|
1277
|
-
CSS code. Element, parentElement and afterElement are provided DOM elements for the animation
|
1278
|
+
CSS code. Element, `parentElement` and `afterElement` are provided DOM elements for the animation
|
1278
1279
|
and the onComplete callback will be fired once the animation is fully complete.
|
1279
1280
|
*/
|
1280
1281
|
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
|
@@ -1386,10 +1387,10 @@ angular.module('ngAnimate', ['ng'])
|
|
1386
1387
|
|
1387
1388
|
//the ng-animate class does nothing, but it's here to allow for
|
1388
1389
|
//parent animations to find and cancel child animations when needed
|
1389
|
-
|
1390
|
+
$$jqLite.addClass(element, NG_ANIMATE_CLASS_NAME);
|
1390
1391
|
if (options && options.tempClasses) {
|
1391
1392
|
forEach(options.tempClasses, function(className) {
|
1392
|
-
|
1393
|
+
$$jqLite.addClass(element, className);
|
1393
1394
|
});
|
1394
1395
|
}
|
1395
1396
|
|
@@ -1467,7 +1468,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1467
1468
|
closeAnimation.hasBeenRun = true;
|
1468
1469
|
if (options && options.tempClasses) {
|
1469
1470
|
forEach(options.tempClasses, function(className) {
|
1470
|
-
|
1471
|
+
$$jqLite.removeClass(element, className);
|
1471
1472
|
});
|
1472
1473
|
}
|
1473
1474
|
|
@@ -1529,7 +1530,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1529
1530
|
}
|
1530
1531
|
|
1531
1532
|
if (removeAnimations || !data.totalActive) {
|
1532
|
-
|
1533
|
+
$$jqLite.removeClass(element, NG_ANIMATE_CLASS_NAME);
|
1533
1534
|
element.removeData(NG_ANIMATE_STATE);
|
1534
1535
|
}
|
1535
1536
|
}
|
@@ -1770,14 +1771,14 @@ angular.module('ngAnimate', ['ng'])
|
|
1770
1771
|
var staggerCacheKey = cacheKey + ' ' + staggerClassName;
|
1771
1772
|
var applyClasses = !lookupCache[staggerCacheKey];
|
1772
1773
|
|
1773
|
-
applyClasses &&
|
1774
|
+
applyClasses && $$jqLite.addClass(element, staggerClassName);
|
1774
1775
|
|
1775
1776
|
stagger = getElementAnimationDetails(element, staggerCacheKey);
|
1776
1777
|
|
1777
|
-
applyClasses &&
|
1778
|
+
applyClasses && $$jqLite.removeClass(element, staggerClassName);
|
1778
1779
|
}
|
1779
1780
|
|
1780
|
-
|
1781
|
+
$$jqLite.addClass(element, className);
|
1781
1782
|
|
1782
1783
|
var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};
|
1783
1784
|
var timings = getElementAnimationDetails(element, eventCacheKey);
|
@@ -1785,7 +1786,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1785
1786
|
var animationDuration = timings.animationDuration;
|
1786
1787
|
|
1787
1788
|
if (structural && transitionDuration === 0 && animationDuration === 0) {
|
1788
|
-
|
1789
|
+
$$jqLite.removeClass(element, className);
|
1789
1790
|
return false;
|
1790
1791
|
}
|
1791
1792
|
|
@@ -1857,7 +1858,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1857
1858
|
}
|
1858
1859
|
|
1859
1860
|
if (!staggerTime) {
|
1860
|
-
|
1861
|
+
$$jqLite.addClass(element, activeClassName);
|
1861
1862
|
if (elementData.blockTransition) {
|
1862
1863
|
blockTransitions(node, false);
|
1863
1864
|
}
|
@@ -1867,7 +1868,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1867
1868
|
var timings = getElementAnimationDetails(element, eventCacheKey);
|
1868
1869
|
var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);
|
1869
1870
|
if (maxDuration === 0) {
|
1870
|
-
|
1871
|
+
$$jqLite.removeClass(element, activeClassName);
|
1871
1872
|
animateClose(element, className);
|
1872
1873
|
activeAnimationComplete();
|
1873
1874
|
return;
|
@@ -1902,7 +1903,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1902
1903
|
|
1903
1904
|
var staggerTimeout;
|
1904
1905
|
if (staggerTime > 0) {
|
1905
|
-
|
1906
|
+
$$jqLite.addClass(element, pendingClassName);
|
1906
1907
|
staggerTimeout = $timeout(function() {
|
1907
1908
|
staggerTimeout = null;
|
1908
1909
|
|
@@ -1913,8 +1914,8 @@ angular.module('ngAnimate', ['ng'])
|
|
1913
1914
|
blockAnimations(node, false);
|
1914
1915
|
}
|
1915
1916
|
|
1916
|
-
|
1917
|
-
|
1917
|
+
$$jqLite.addClass(element, activeClassName);
|
1918
|
+
$$jqLite.removeClass(element, pendingClassName);
|
1918
1919
|
|
1919
1920
|
if (styles) {
|
1920
1921
|
if (timings.transitionDuration === 0) {
|
@@ -1941,8 +1942,8 @@ angular.module('ngAnimate', ['ng'])
|
|
1941
1942
|
// timeout done method.
|
1942
1943
|
function onEnd() {
|
1943
1944
|
element.off(css3AnimationEvents, onAnimationProgress);
|
1944
|
-
|
1945
|
-
|
1945
|
+
$$jqLite.removeClass(element, activeClassName);
|
1946
|
+
$$jqLite.removeClass(element, pendingClassName);
|
1946
1947
|
if (staggerTimeout) {
|
1947
1948
|
$timeout.cancel(staggerTimeout);
|
1948
1949
|
}
|
@@ -2030,7 +2031,7 @@ angular.module('ngAnimate', ['ng'])
|
|
2030
2031
|
}
|
2031
2032
|
|
2032
2033
|
function animateClose(element, className) {
|
2033
|
-
|
2034
|
+
$$jqLite.removeClass(element, className);
|
2034
2035
|
var data = element.data(NG_ANIMATE_CSS_DATA_KEY);
|
2035
2036
|
if (data) {
|
2036
2037
|
if (data.running) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.6
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -31,7 +31,7 @@
|
|
31
31
|
* | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
|
32
32
|
* | {@link ng.directive:ngShow ngShow} | aria-hidden |
|
33
33
|
* | {@link ng.directive:ngHide ngHide} | aria-hidden |
|
34
|
-
* | {@link ng.directive:ngClick ngClick} | tabindex
|
34
|
+
* | {@link ng.directive:ngClick ngClick} | tabindex, keypress event |
|
35
35
|
* | {@link ng.directive:ngDblclick ngDblclick} | tabindex |
|
36
36
|
* | {@link module:ngMessages ngMessages} | aria-live |
|
37
37
|
*
|
@@ -87,7 +87,8 @@ function $AriaProvider() {
|
|
87
87
|
ariaInvalid: true,
|
88
88
|
ariaMultiline: true,
|
89
89
|
ariaValue: true,
|
90
|
-
tabindex: true
|
90
|
+
tabindex: true,
|
91
|
+
bindKeypress: true
|
91
92
|
};
|
92
93
|
|
93
94
|
/**
|
@@ -104,6 +105,7 @@ function $AriaProvider() {
|
|
104
105
|
* - **ariaMultiline** – `{boolean}` – Enables/disables aria-multiline tags
|
105
106
|
* - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and aria-valuenow tags
|
106
107
|
* - **tabindex** – `{boolean}` – Enables/disables tabindex tags
|
108
|
+
* - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on ng-click
|
107
109
|
*
|
108
110
|
* @description
|
109
111
|
* Enables/disables various ARIA attributes
|
@@ -112,16 +114,9 @@ function $AriaProvider() {
|
|
112
114
|
config = angular.extend(config, newConfig);
|
113
115
|
};
|
114
116
|
|
115
|
-
function camelCase(input) {
|
116
|
-
return input.replace(/-./g, function(letter, pos) {
|
117
|
-
return letter[1].toUpperCase();
|
118
|
-
});
|
119
|
-
}
|
120
|
-
|
121
|
-
|
122
117
|
function watchExpr(attrName, ariaAttr, negate) {
|
123
|
-
var ariaCamelName = camelCase(ariaAttr);
|
124
118
|
return function(scope, elem, attr) {
|
119
|
+
var ariaCamelName = attr.$normalize(ariaAttr);
|
125
120
|
if (config[ariaCamelName] && !attr[ariaCamelName]) {
|
126
121
|
scope.$watch(attr[attrName], function(boolVal) {
|
127
122
|
if (negate) {
|
@@ -181,20 +176,13 @@ function $AriaProvider() {
|
|
181
176
|
this.$get = function() {
|
182
177
|
return {
|
183
178
|
config: function(key) {
|
184
|
-
return config[
|
179
|
+
return config[key];
|
185
180
|
},
|
186
181
|
$$watchExpr: watchExpr
|
187
182
|
};
|
188
183
|
};
|
189
184
|
}
|
190
185
|
|
191
|
-
var ngAriaTabindex = ['$aria', function($aria) {
|
192
|
-
return function(scope, elem, attr) {
|
193
|
-
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
|
194
|
-
elem.attr('tabindex', 0);
|
195
|
-
}
|
196
|
-
};
|
197
|
-
}];
|
198
186
|
|
199
187
|
ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
200
188
|
return $aria.$$watchExpr('ngShow', 'aria-hidden', true);
|
@@ -204,8 +192,8 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
204
192
|
}])
|
205
193
|
.directive('ngModel', ['$aria', function($aria) {
|
206
194
|
|
207
|
-
function shouldAttachAttr(attr, elem) {
|
208
|
-
return $aria.config(
|
195
|
+
function shouldAttachAttr(attr, normalizedAttr, elem) {
|
196
|
+
return $aria.config(normalizedAttr) && !elem.attr(attr);
|
209
197
|
}
|
210
198
|
|
211
199
|
function getShape(attr, elem) {
|
@@ -223,7 +211,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
223
211
|
require: '?ngModel',
|
224
212
|
link: function(scope, elem, attr, ngModel) {
|
225
213
|
var shape = getShape(attr, elem);
|
226
|
-
var needsTabIndex = shouldAttachAttr('tabindex', elem);
|
214
|
+
var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem);
|
227
215
|
|
228
216
|
function ngAriaWatchModelValue() {
|
229
217
|
return ngModel.$modelValue;
|
@@ -251,7 +239,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
251
239
|
switch (shape) {
|
252
240
|
case 'radio':
|
253
241
|
case 'checkbox':
|
254
|
-
if (shouldAttachAttr('aria-checked', elem)) {
|
242
|
+
if (shouldAttachAttr('aria-checked', 'ariaChecked', elem)) {
|
255
243
|
scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
|
256
244
|
getRadioReaction() : ngAriaCheckboxReaction);
|
257
245
|
}
|
@@ -272,7 +260,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
272
260
|
}
|
273
261
|
break;
|
274
262
|
case 'multiline':
|
275
|
-
if (shouldAttachAttr('aria-multiline', elem)) {
|
263
|
+
if (shouldAttachAttr('aria-multiline', 'ariaMultiline', elem)) {
|
276
264
|
elem.attr('aria-multiline', true);
|
277
265
|
}
|
278
266
|
break;
|
@@ -282,7 +270,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
282
270
|
elem.attr('tabindex', 0);
|
283
271
|
}
|
284
272
|
|
285
|
-
if (ngModel.$validators.required && shouldAttachAttr('aria-required', elem)) {
|
273
|
+
if (ngModel.$validators.required && shouldAttachAttr('aria-required', 'ariaRequired', elem)) {
|
286
274
|
scope.$watch(function ngAriaRequiredWatch() {
|
287
275
|
return ngModel.$error.required;
|
288
276
|
}, function ngAriaRequiredReaction(newVal) {
|
@@ -290,7 +278,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
290
278
|
});
|
291
279
|
}
|
292
280
|
|
293
|
-
if (shouldAttachAttr('aria-invalid', elem)) {
|
281
|
+
if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem)) {
|
294
282
|
scope.$watch(function ngAriaInvalidWatch() {
|
295
283
|
return ngModel.$invalid;
|
296
284
|
}, function ngAriaInvalidReaction(newVal) {
|
@@ -314,8 +302,31 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
314
302
|
}
|
315
303
|
};
|
316
304
|
})
|
317
|
-
.directive('ngClick',
|
318
|
-
|
305
|
+
.directive('ngClick',['$aria', function($aria) {
|
306
|
+
return {
|
307
|
+
restrict: 'A',
|
308
|
+
link: function(scope, elem, attr) {
|
309
|
+
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
|
310
|
+
elem.attr('tabindex', 0);
|
311
|
+
}
|
312
|
+
|
313
|
+
if ($aria.config('bindKeypress') && !elem.attr('ng-keypress')) {
|
314
|
+
elem.on('keypress', function(event) {
|
315
|
+
if (event.keyCode === 32 || event.keyCode === 13) {
|
316
|
+
scope.$eval(attr.ngClick);
|
317
|
+
}
|
318
|
+
});
|
319
|
+
}
|
320
|
+
}
|
321
|
+
};
|
322
|
+
}])
|
323
|
+
.directive('ngDblclick', ['$aria', function($aria) {
|
324
|
+
return function(scope, elem, attr) {
|
325
|
+
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
|
326
|
+
elem.attr('tabindex', 0);
|
327
|
+
}
|
328
|
+
};
|
329
|
+
}]);
|
319
330
|
|
320
331
|
|
321
332
|
})(window, window.angular);
|