mirror of
https://github.com/moparisthebest/mail
synced 2025-03-11 06:59:45 -04:00
Update to angular 1.3.7
This commit is contained in:
parent
6a9603cb69
commit
3cc0a372e1
245
src/lib/angular/angular-animate.js
vendored
245
src/lib/angular/angular-animate.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @license AngularJS v1.3.2
|
* @license AngularJS v1.3.7
|
||||||
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
||||||
* License: MIT
|
* License: MIT
|
||||||
*/
|
*/
|
||||||
@ -19,7 +19,7 @@
|
|||||||
* # Usage
|
* # Usage
|
||||||
*
|
*
|
||||||
* To see animations in action, all that is required is to define the appropriate CSS classes
|
* To see animations in action, all that is required is to define the appropriate CSS classes
|
||||||
* or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:
|
* or to register a JavaScript animation via the `myModule.animation()` function. The directives that support animation automatically are:
|
||||||
* `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
|
* `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
|
||||||
* by using the `$animate` service.
|
* by using the `$animate` service.
|
||||||
*
|
*
|
||||||
@ -161,8 +161,8 @@
|
|||||||
* ### Structural transition animations
|
* ### Structural transition animations
|
||||||
*
|
*
|
||||||
* Structural transitions (such as enter, leave and move) will always apply a `0s none` transition
|
* Structural transitions (such as enter, leave and move) will always apply a `0s none` transition
|
||||||
* value to force the browser into rendering the styles defined in the setup (.ng-enter, .ng-leave
|
* value to force the browser into rendering the styles defined in the setup (`.ng-enter`, `.ng-leave`
|
||||||
* or .ng-move) class. This means that any active transition animations operating on the element
|
* or `.ng-move`) class. This means that any active transition animations operating on the element
|
||||||
* will be cut off to make way for the enter, leave or move animation.
|
* will be cut off to make way for the enter, leave or move animation.
|
||||||
*
|
*
|
||||||
* ### Class-based transition animations
|
* ### Class-based transition animations
|
||||||
@ -245,7 +245,7 @@
|
|||||||
* You then configure `$animate` to enforce this prefix:
|
* You then configure `$animate` to enforce this prefix:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* $animateProvider.classNamePrefix(/animate-/);
|
* $animateProvider.classNameFilter(/animate-/);
|
||||||
* ```
|
* ```
|
||||||
* </div>
|
* </div>
|
||||||
*
|
*
|
||||||
@ -479,11 +479,12 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
function isMatchingElement(elm1, elm2) {
|
function isMatchingElement(elm1, elm2) {
|
||||||
return extractElementNode(elm1) == extractElementNode(elm2);
|
return extractElementNode(elm1) == extractElementNode(elm2);
|
||||||
}
|
}
|
||||||
|
var $$jqLite;
|
||||||
$provide.decorator('$animate',
|
$provide.decorator('$animate',
|
||||||
['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest',
|
['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest', '$$jqLite',
|
||||||
function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) {
|
function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest, $$$jqLite) {
|
||||||
|
|
||||||
|
$$jqLite = $$$jqLite;
|
||||||
$rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
|
$rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
|
||||||
|
|
||||||
// Wait until all directive and route-related templates are downloaded and
|
// Wait until all directive and route-related templates are downloaded and
|
||||||
@ -877,22 +878,22 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
*
|
*
|
||||||
* Below is a breakdown of each step that occurs during the `animate` animation:
|
* Below is a breakdown of each step that occurs during the `animate` animation:
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
* |-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
|
||||||
* | 1. $animate.animate(...) is called | class="my-animation" |
|
* | 1. `$animate.animate(...)` is called | `class="my-animation"` |
|
||||||
* | 2. $animate waits for the next digest to start the animation | class="my-animation ng-animate" |
|
* | 2. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
||||||
* | 3. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" |
|
* | 3. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
||||||
* | 4. the className class value is added to the element | class="my-animation ng-animate className" |
|
* | 4. the `className` class value is added to the element | `class="my-animation ng-animate className"` |
|
||||||
* | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate className" |
|
* | 5. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate className"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 7. $animate applies the provided collection of `from` CSS styles to the element | class="my-animation ng-animate className" |
|
* | 7. `$animate` applies the provided collection of `from` CSS styles to the element | `class="my-animation ng-animate className"` |
|
||||||
* | 8. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate className" |
|
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate className"` |
|
||||||
* | 9. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate className" |
|
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate className"` |
|
||||||
* | 10. the className-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate className className-active" |
|
* | 10. the `className-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate className className-active"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 12. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate className className-active" |
|
* | 12. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate className className-active"` |
|
||||||
* | 13. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
|
* | 13. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
||||||
* | 14. The returned promise is resolved. | class="my-animation" |
|
* | 14. The returned promise is resolved. | `class="my-animation"` |
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element that will be the focus of the enter animation
|
* @param {DOMElement} element the element that will be the focus of the enter animation
|
||||||
* @param {object} from a collection of CSS styles that will be applied to the element at the start of the animation
|
* @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'])
|
|||||||
*
|
*
|
||||||
* Below is a breakdown of each step that occurs during enter animation:
|
* Below is a breakdown of each step that occurs during enter animation:
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
|
* |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
||||||
* | 1. $animate.enter(...) is called | class="my-animation" |
|
* | 1. `$animate.enter(...)` is called | `class="my-animation"` |
|
||||||
* | 2. element is inserted into the parentElement element or beside the afterElement element | class="my-animation" |
|
* | 2. element is inserted into the `parentElement` element or beside the `afterElement` element | `class="my-animation"` |
|
||||||
* | 3. $animate waits for the next digest to start the animation | class="my-animation ng-animate" |
|
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
||||||
* | 4. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" |
|
* | 4. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
||||||
* | 5. the .ng-enter class is added to the element | class="my-animation ng-animate ng-enter" |
|
* | 5. the `.ng-enter` class is added to the element | `class="my-animation ng-animate ng-enter"` |
|
||||||
* | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-enter" |
|
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-enter"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 8. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate ng-enter" |
|
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-enter"` |
|
||||||
* | 9. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate ng-enter" |
|
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-enter"` |
|
||||||
* | 10. the .ng-enter-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-enter ng-enter-active" |
|
* | 10. the `.ng-enter-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-enter ng-enter-active"` |
|
||||||
* | 11. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate ng-enter ng-enter-active" |
|
* | 11. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-enter ng-enter-active"` |
|
||||||
* | 12. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
|
* | 12. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
||||||
* | 13. The returned promise is resolved. | class="my-animation" |
|
* | 13. The returned promise is resolved. | `class="my-animation"` |
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element that will be the focus of the enter animation
|
* @param {DOMElement} element the element that will be the focus of the enter animation
|
||||||
* @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation
|
* @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'])
|
|||||||
*
|
*
|
||||||
* Below is a breakdown of each step that occurs during leave animation:
|
* Below is a breakdown of each step that occurs during leave animation:
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
|
* |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
||||||
* | 1. $animate.leave(...) is called | class="my-animation" |
|
* | 1. `$animate.leave(...)` is called | `class="my-animation"` |
|
||||||
* | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" |
|
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
||||||
* | 3. $animate waits for the next digest to start the animation | class="my-animation ng-animate" |
|
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
||||||
* | 4. the .ng-leave class is added to the element | class="my-animation ng-animate ng-leave" |
|
* | 4. the `.ng-leave` class is added to the element | `class="my-animation ng-animate ng-leave"` |
|
||||||
* | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-leave" |
|
* | 5. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-leave"` |
|
||||||
* | 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” |
|
* | 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"` |
|
||||||
* | 7. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate ng-leave" |
|
* | 7. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-leave"` |
|
||||||
* | 8. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate ng-leave” |
|
* | 8. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-leave"` |
|
||||||
* | 9. the .ng-leave-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-leave ng-leave-active" |
|
* | 9. the `.ng-leave-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-leave ng-leave-active"` |
|
||||||
* | 10. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate ng-leave ng-leave-active" |
|
* | 10. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-leave ng-leave-active"` |
|
||||||
* | 11. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
|
* | 11. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
||||||
* | 12. The element is removed from the DOM | ... |
|
* | 12. The element is removed from the DOM | ... |
|
||||||
* | 13. The returned promise is resolved. | ... |
|
* | 13. The returned promise is resolved. | ... |
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element that will be the focus of the leave animation
|
* @param {DOMElement} element the element that will be the focus of the leave animation
|
||||||
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
* @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'])
|
|||||||
*
|
*
|
||||||
* Below is a breakdown of each step that occurs during move animation:
|
* Below is a breakdown of each step that occurs during move animation:
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
|
* |----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
|
||||||
* | 1. $animate.move(...) is called | class="my-animation" |
|
* | 1. `$animate.move(...)` is called | `class="my-animation"` |
|
||||||
* | 2. element is moved into the parentElement element or beside the afterElement element | class="my-animation" |
|
* | 2. element is moved into the parentElement element or beside the afterElement element | `class="my-animation"` |
|
||||||
* | 3. $animate waits for the next digest to start the animation | class="my-animation ng-animate" |
|
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
||||||
* | 4. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" |
|
* | 4. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
||||||
* | 5. the .ng-move class is added to the element | class="my-animation ng-animate ng-move" |
|
* | 5. the `.ng-move` class is added to the element | `class="my-animation ng-animate ng-move"` |
|
||||||
* | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-move" |
|
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-move"` |
|
||||||
* | 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” |
|
* | 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"` |
|
||||||
* | 8. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate ng-move" |
|
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-move"` |
|
||||||
* | 9. $animate removes the CSS transition block placed on the element | class="my-animation ng-animate ng-move” |
|
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-move"` |
|
||||||
* | 10. the .ng-move-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-move ng-move-active" |
|
* | 10. the `.ng-move-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-move ng-move-active"` |
|
||||||
* | 11. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate ng-move ng-move-active" |
|
* | 11. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-move ng-move-active"` |
|
||||||
* | 12. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
|
* | 12. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
||||||
* | 13. The returned promise is resolved. | class="my-animation" |
|
* | 13. The returned promise is resolved. | `class="my-animation"` |
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element that will be the focus of the move animation
|
* @param {DOMElement} element the element that will be the focus of the move animation
|
||||||
* @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation
|
* @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'])
|
|||||||
*
|
*
|
||||||
* Below is a breakdown of each step that occurs during addClass animation:
|
* Below is a breakdown of each step that occurs during addClass animation:
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
|
* |--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
||||||
* | 1. $animate.addClass(element, 'super') is called | class="my-animation" |
|
* | 1. `$animate.addClass(element, 'super')` is called | `class="my-animation"` |
|
||||||
* | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation ng-animate" |
|
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
||||||
* | 3. the .super-add class is added to the element | class="my-animation ng-animate super-add" |
|
* | 3. the `.super-add` class is added to the element | `class="my-animation ng-animate super-add"` |
|
||||||
* | 4. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate super-add" |
|
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate super-add"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate super-add" |
|
* | 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"` |
|
||||||
* | 7. $animate waits for the animation to complete (via events and timeout) | class="my-animation super super-add super-add-active" |
|
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate super super-add super-add-active"` |
|
||||||
* | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation super" |
|
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation super"` |
|
||||||
* | 9. The super class is kept on the element | class="my-animation super" |
|
* | 9. The super class is kept on the element | `class="my-animation super"` |
|
||||||
* | 10. The returned promise is resolved. | class="my-animation super" |
|
* | 10. The returned promise is resolved. | `class="my-animation super"` |
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element that will be animated
|
* @param {DOMElement} element the element that will be animated
|
||||||
* @param {string} className the CSS class that will be added to the element and then animated
|
* @param {string} className the CSS class that will be added to the element and then animated
|
||||||
@ -1096,17 +1097,17 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
*
|
*
|
||||||
* Below is a breakdown of each step that occurs during removeClass animation:
|
* Below is a breakdown of each step that occurs during removeClass animation:
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
|
* |----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
||||||
* | 1. $animate.removeClass(element, 'super') is called | class="my-animation super" |
|
* | 1. `$animate.removeClass(element, 'super')` is called | `class="my-animation super"` |
|
||||||
* | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation super ng-animate" |
|
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation super ng-animate"` |
|
||||||
* | 3. the .super-remove class is added to the element | class="my-animation super ng-animate super-remove" |
|
* | 3. the `.super-remove` class is added to the element | `class="my-animation super ng-animate super-remove"` |
|
||||||
* | 4. $animate waits for a single animation frame (this performs a reflow) | class="my-animation super ng-animate super-remove" |
|
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation super ng-animate super-remove"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation super ng-animate super-remove" |
|
* | 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"` |
|
||||||
* | 7. $animate waits for the animation to complete (via events and timeout) | class="my-animation ng-animate super-remove super-remove-active" |
|
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate super-remove super-remove-active"` |
|
||||||
* | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
|
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
||||||
* | 9. The returned promise is resolved. | class="my-animation" |
|
* | 9. The returned promise is resolved. | `class="my-animation"` |
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element that will be animated
|
* @param {DOMElement} element the element that will be animated
|
||||||
@ -1124,19 +1125,19 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
* @name $animate#setClass
|
* @name $animate#setClass
|
||||||
*
|
*
|
||||||
* @description Adds and/or removes the given CSS classes to and from the element.
|
* @description Adds and/or removes the given CSS classes to and from the element.
|
||||||
* Once complete, the done() callback will be fired (if provided).
|
* Once complete, the `done()` callback will be fired (if provided).
|
||||||
*
|
*
|
||||||
* | Animation Step | What the element class attribute looks like |
|
* | Animation Step | What the element class attribute looks like |
|
||||||
* |--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
|
* |----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
|
||||||
* | 1. $animate.removeClass(element, ‘on’, ‘off’) is called | class="my-animation super off” |
|
* | 1. `$animate.setClass(element, 'on', 'off')` is called | `class="my-animation off"` |
|
||||||
* | 2. $animate runs the JavaScript-defined animations detected on the element | class="my-animation super ng-animate off” |
|
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate off"` |
|
||||||
* | 3. the .on-add and .off-remove classes are added to the element | class="my-animation ng-animate on-add off-remove off” |
|
* | 3. the `.on-add` and `.off-remove` classes are added to the element | `class="my-animation ng-animate on-add off-remove off"` |
|
||||||
* | 4. $animate waits for a single animation frame (this performs a reflow) | class="my-animation ng-animate on-add off-remove off” |
|
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate on-add off-remove off"` |
|
||||||
* | 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” |
|
* | 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"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 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" |
|
* | 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"` |
|
||||||
* | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation on" |
|
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation on"` |
|
||||||
* | 9. The returned promise is resolved. | class="my-animation on" |
|
* | 9. The returned promise is resolved. | `class="my-animation on"` |
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element the element which will have its CSS classes changed
|
* @param {DOMElement} element the element which will have its CSS classes changed
|
||||||
* removed from it
|
* removed from it
|
||||||
@ -1274,7 +1275,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
all animations call this shared animation triggering function internally.
|
all animations call this shared animation triggering function internally.
|
||||||
The animationEvent variable refers to the JavaScript animation event that will be triggered
|
The animationEvent variable refers to the JavaScript animation event that will be triggered
|
||||||
and the className value is the name of the animation that will be applied within the
|
and the className value is the name of the animation that will be applied within the
|
||||||
CSS code. Element, parentElement and afterElement are provided DOM elements for the animation
|
CSS code. Element, `parentElement` and `afterElement` are provided DOM elements for the animation
|
||||||
and the onComplete callback will be fired once the animation is fully complete.
|
and the onComplete callback will be fired once the animation is fully complete.
|
||||||
*/
|
*/
|
||||||
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
|
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
|
||||||
@ -1386,10 +1387,10 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
|
|
||||||
//the ng-animate class does nothing, but it's here to allow for
|
//the ng-animate class does nothing, but it's here to allow for
|
||||||
//parent animations to find and cancel child animations when needed
|
//parent animations to find and cancel child animations when needed
|
||||||
element.addClass(NG_ANIMATE_CLASS_NAME);
|
$$jqLite.addClass(element, NG_ANIMATE_CLASS_NAME);
|
||||||
if (options && options.tempClasses) {
|
if (options && options.tempClasses) {
|
||||||
forEach(options.tempClasses, function(className) {
|
forEach(options.tempClasses, function(className) {
|
||||||
element.addClass(className);
|
$$jqLite.addClass(element, className);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1467,7 +1468,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
closeAnimation.hasBeenRun = true;
|
closeAnimation.hasBeenRun = true;
|
||||||
if (options && options.tempClasses) {
|
if (options && options.tempClasses) {
|
||||||
forEach(options.tempClasses, function(className) {
|
forEach(options.tempClasses, function(className) {
|
||||||
element.removeClass(className);
|
$$jqLite.removeClass(element, className);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1529,7 +1530,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (removeAnimations || !data.totalActive) {
|
if (removeAnimations || !data.totalActive) {
|
||||||
element.removeClass(NG_ANIMATE_CLASS_NAME);
|
$$jqLite.removeClass(element, NG_ANIMATE_CLASS_NAME);
|
||||||
element.removeData(NG_ANIMATE_STATE);
|
element.removeData(NG_ANIMATE_STATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1770,14 +1771,14 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
var staggerCacheKey = cacheKey + ' ' + staggerClassName;
|
var staggerCacheKey = cacheKey + ' ' + staggerClassName;
|
||||||
var applyClasses = !lookupCache[staggerCacheKey];
|
var applyClasses = !lookupCache[staggerCacheKey];
|
||||||
|
|
||||||
applyClasses && element.addClass(staggerClassName);
|
applyClasses && $$jqLite.addClass(element, staggerClassName);
|
||||||
|
|
||||||
stagger = getElementAnimationDetails(element, staggerCacheKey);
|
stagger = getElementAnimationDetails(element, staggerCacheKey);
|
||||||
|
|
||||||
applyClasses && element.removeClass(staggerClassName);
|
applyClasses && $$jqLite.removeClass(element, staggerClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
element.addClass(className);
|
$$jqLite.addClass(element, className);
|
||||||
|
|
||||||
var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};
|
var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};
|
||||||
var timings = getElementAnimationDetails(element, eventCacheKey);
|
var timings = getElementAnimationDetails(element, eventCacheKey);
|
||||||
@ -1785,7 +1786,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
var animationDuration = timings.animationDuration;
|
var animationDuration = timings.animationDuration;
|
||||||
|
|
||||||
if (structural && transitionDuration === 0 && animationDuration === 0) {
|
if (structural && transitionDuration === 0 && animationDuration === 0) {
|
||||||
element.removeClass(className);
|
$$jqLite.removeClass(element, className);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1857,7 +1858,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!staggerTime) {
|
if (!staggerTime) {
|
||||||
element.addClass(activeClassName);
|
$$jqLite.addClass(element, activeClassName);
|
||||||
if (elementData.blockTransition) {
|
if (elementData.blockTransition) {
|
||||||
blockTransitions(node, false);
|
blockTransitions(node, false);
|
||||||
}
|
}
|
||||||
@ -1867,7 +1868,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
var timings = getElementAnimationDetails(element, eventCacheKey);
|
var timings = getElementAnimationDetails(element, eventCacheKey);
|
||||||
var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);
|
var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);
|
||||||
if (maxDuration === 0) {
|
if (maxDuration === 0) {
|
||||||
element.removeClass(activeClassName);
|
$$jqLite.removeClass(element, activeClassName);
|
||||||
animateClose(element, className);
|
animateClose(element, className);
|
||||||
activeAnimationComplete();
|
activeAnimationComplete();
|
||||||
return;
|
return;
|
||||||
@ -1889,7 +1890,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
//the jqLite object, so we're safe to use a single variable to house
|
//the jqLite object, so we're safe to use a single variable to house
|
||||||
//the styles since there is always only one element being animated
|
//the styles since there is always only one element being animated
|
||||||
var oldStyle = node.getAttribute('style') || '';
|
var oldStyle = node.getAttribute('style') || '';
|
||||||
if (oldStyle.charAt(oldStyle.length-1) !== ';') {
|
if (oldStyle.charAt(oldStyle.length - 1) !== ';') {
|
||||||
oldStyle += ';';
|
oldStyle += ';';
|
||||||
}
|
}
|
||||||
node.setAttribute('style', oldStyle + ' ' + style);
|
node.setAttribute('style', oldStyle + ' ' + style);
|
||||||
@ -1902,7 +1903,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
|
|
||||||
var staggerTimeout;
|
var staggerTimeout;
|
||||||
if (staggerTime > 0) {
|
if (staggerTime > 0) {
|
||||||
element.addClass(pendingClassName);
|
$$jqLite.addClass(element, pendingClassName);
|
||||||
staggerTimeout = $timeout(function() {
|
staggerTimeout = $timeout(function() {
|
||||||
staggerTimeout = null;
|
staggerTimeout = null;
|
||||||
|
|
||||||
@ -1913,8 +1914,8 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
blockAnimations(node, false);
|
blockAnimations(node, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
element.addClass(activeClassName);
|
$$jqLite.addClass(element, activeClassName);
|
||||||
element.removeClass(pendingClassName);
|
$$jqLite.removeClass(element, pendingClassName);
|
||||||
|
|
||||||
if (styles) {
|
if (styles) {
|
||||||
if (timings.transitionDuration === 0) {
|
if (timings.transitionDuration === 0) {
|
||||||
@ -1941,8 +1942,8 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
// timeout done method.
|
// timeout done method.
|
||||||
function onEnd() {
|
function onEnd() {
|
||||||
element.off(css3AnimationEvents, onAnimationProgress);
|
element.off(css3AnimationEvents, onAnimationProgress);
|
||||||
element.removeClass(activeClassName);
|
$$jqLite.removeClass(element, activeClassName);
|
||||||
element.removeClass(pendingClassName);
|
$$jqLite.removeClass(element, pendingClassName);
|
||||||
if (staggerTimeout) {
|
if (staggerTimeout) {
|
||||||
$timeout.cancel(staggerTimeout);
|
$timeout.cancel(staggerTimeout);
|
||||||
}
|
}
|
||||||
@ -2030,7 +2031,7 @@ angular.module('ngAnimate', ['ng'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
function animateClose(element, className) {
|
function animateClose(element, className) {
|
||||||
element.removeClass(className);
|
$$jqLite.removeClass(element, className);
|
||||||
var data = element.data(NG_ANIMATE_CSS_DATA_KEY);
|
var data = element.data(NG_ANIMATE_CSS_DATA_KEY);
|
||||||
if (data) {
|
if (data) {
|
||||||
if (data.running) {
|
if (data.running) {
|
||||||
|
54
src/lib/angular/angular-mocks.js
vendored
54
src/lib/angular/angular-mocks.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @license AngularJS v1.3.2
|
* @license AngularJS v1.3.7
|
||||||
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
||||||
* License: MIT
|
* License: MIT
|
||||||
*/
|
*/
|
||||||
@ -117,7 +117,7 @@ angular.mock.$Browser = function() {
|
|||||||
self.defer.now += delay;
|
self.defer.now += delay;
|
||||||
} else {
|
} else {
|
||||||
if (self.deferredFns.length) {
|
if (self.deferredFns.length) {
|
||||||
self.defer.now = self.deferredFns[self.deferredFns.length-1].time;
|
self.defer.now = self.deferredFns[self.deferredFns.length - 1].time;
|
||||||
} else {
|
} else {
|
||||||
throw new Error('No deferred tasks to be flushed');
|
throw new Error('No deferred tasks to be flushed');
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ angular.mock.$LogProvider = function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (errors.length) {
|
if (errors.length) {
|
||||||
errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or "+
|
errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or " +
|
||||||
"an expected log message was not checked and removed:");
|
"an expected log message was not checked and removed:");
|
||||||
errors.push('');
|
errors.push('');
|
||||||
throw new Error(errors.join('\n---------\n'));
|
throw new Error(errors.join('\n---------\n'));
|
||||||
@ -461,17 +461,17 @@ angular.mock.$LogProvider = function() {
|
|||||||
* @returns {promise} A promise which will be notified on each iteration.
|
* @returns {promise} A promise which will be notified on each iteration.
|
||||||
*/
|
*/
|
||||||
angular.mock.$IntervalProvider = function() {
|
angular.mock.$IntervalProvider = function() {
|
||||||
this.$get = ['$rootScope', '$q',
|
this.$get = ['$browser', '$rootScope', '$q', '$$q',
|
||||||
function($rootScope, $q) {
|
function($browser, $rootScope, $q, $$q) {
|
||||||
var repeatFns = [],
|
var repeatFns = [],
|
||||||
nextRepeatId = 0,
|
nextRepeatId = 0,
|
||||||
now = 0;
|
now = 0;
|
||||||
|
|
||||||
var $interval = function(fn, delay, count, invokeApply) {
|
var $interval = function(fn, delay, count, invokeApply) {
|
||||||
var deferred = $q.defer(),
|
var iteration = 0,
|
||||||
promise = deferred.promise,
|
skipApply = (angular.isDefined(invokeApply) && !invokeApply),
|
||||||
iteration = 0,
|
deferred = (skipApply ? $$q : $q).defer(),
|
||||||
skipApply = (angular.isDefined(invokeApply) && !invokeApply);
|
promise = deferred.promise;
|
||||||
|
|
||||||
count = (angular.isDefined(count)) ? count : 0;
|
count = (angular.isDefined(count)) ? count : 0;
|
||||||
promise.then(null, null, fn);
|
promise.then(null, null, fn);
|
||||||
@ -494,7 +494,11 @@ angular.mock.$IntervalProvider = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skipApply) $rootScope.$apply();
|
if (skipApply) {
|
||||||
|
$browser.defer.flush();
|
||||||
|
} else {
|
||||||
|
$rootScope.$apply();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repeatFns.push({
|
repeatFns.push({
|
||||||
@ -581,10 +585,10 @@ function jsonStringToDate(string) {
|
|||||||
tzMin = int(match[9] + match[11]);
|
tzMin = int(match[9] + match[11]);
|
||||||
}
|
}
|
||||||
date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
|
date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
|
||||||
date.setUTCHours(int(match[4]||0) - tzHour,
|
date.setUTCHours(int(match[4] || 0) - tzHour,
|
||||||
int(match[5]||0) - tzMin,
|
int(match[5] || 0) - tzMin,
|
||||||
int(match[6]||0),
|
int(match[6] || 0),
|
||||||
int(match[7]||0));
|
int(match[7] || 0));
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
return string;
|
return string;
|
||||||
@ -663,7 +667,7 @@ angular.mock.TzDate = function(offset, timestamp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var localOffset = new Date(timestamp).getTimezoneOffset();
|
var localOffset = new Date(timestamp).getTimezoneOffset();
|
||||||
self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
|
self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60;
|
||||||
self.date = new Date(timestamp + self.offsetDiff);
|
self.date = new Date(timestamp + self.offsetDiff);
|
||||||
|
|
||||||
self.getTime = function() {
|
self.getTime = function() {
|
||||||
@ -815,7 +819,7 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
|
|||||||
animate.queue.push({
|
animate.queue.push({
|
||||||
event: method,
|
event: method,
|
||||||
element: arguments[0],
|
element: arguments[0],
|
||||||
options: arguments[arguments.length-1],
|
options: arguments[arguments.length - 1],
|
||||||
args: arguments
|
args: arguments
|
||||||
});
|
});
|
||||||
return $delegate[method].apply($delegate, arguments);
|
return $delegate[method].apply($delegate, arguments);
|
||||||
@ -1115,7 +1119,7 @@ angular.mock.dump = function(object) {
|
|||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
angular.mock.$HttpBackendProvider = function() {
|
angular.mock.$HttpBackendProvider = function() {
|
||||||
this.$get = ['$rootScope', createHttpBackendMock];
|
this.$get = ['$rootScope', '$timeout', createHttpBackendMock];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1132,7 +1136,7 @@ angular.mock.$HttpBackendProvider = function() {
|
|||||||
* @param {Object=} $browser Auto-flushing enabled if specified
|
* @param {Object=} $browser Auto-flushing enabled if specified
|
||||||
* @return {Object} Instance of $httpBackend mock
|
* @return {Object} Instance of $httpBackend mock
|
||||||
*/
|
*/
|
||||||
function createHttpBackendMock($rootScope, $delegate, $browser) {
|
function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
|
||||||
var definitions = [],
|
var definitions = [],
|
||||||
expectations = [],
|
expectations = [],
|
||||||
responses = [],
|
responses = [],
|
||||||
@ -1145,7 +1149,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
|
|||||||
return function() {
|
return function() {
|
||||||
return angular.isNumber(status)
|
return angular.isNumber(status)
|
||||||
? [status, data, headers, statusText]
|
? [status, data, headers, statusText]
|
||||||
: [200, status, data];
|
: [200, status, data, headers];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1162,7 +1166,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wrapResponse(wrapped) {
|
function wrapResponse(wrapped) {
|
||||||
if (!$browser && timeout && timeout.then) timeout.then(handleTimeout);
|
if (!$browser && timeout) {
|
||||||
|
timeout.then ? timeout.then(handleTimeout) : $timeout(handleTimeout, timeout);
|
||||||
|
}
|
||||||
|
|
||||||
return handleResponse;
|
return handleResponse;
|
||||||
|
|
||||||
@ -1770,7 +1776,7 @@ angular.mock.$RAFDecorator = ['$delegate', function($delegate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var length = queue.length;
|
var length = queue.length;
|
||||||
for (var i=0;i<length;i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
queue[i]();
|
queue[i]();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2036,7 +2042,7 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
|
|||||||
*/
|
*/
|
||||||
angular.mock.e2e = {};
|
angular.mock.e2e = {};
|
||||||
angular.mock.e2e.$httpBackendDecorator =
|
angular.mock.e2e.$httpBackendDecorator =
|
||||||
['$rootScope', '$delegate', '$browser', createHttpBackendMock];
|
['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2050,7 +2056,7 @@ angular.mock.e2e.$httpBackendDecorator =
|
|||||||
*
|
*
|
||||||
* In addition to all the regular `Scope` methods, the following helper methods are available:
|
* In addition to all the regular `Scope` methods, the following helper methods are available:
|
||||||
*/
|
*/
|
||||||
angular.mock.$RootScopeDecorator = function($delegate) {
|
angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
|
||||||
|
|
||||||
var $rootScopePrototype = Object.getPrototypeOf($delegate);
|
var $rootScopePrototype = Object.getPrototypeOf($delegate);
|
||||||
|
|
||||||
@ -2122,7 +2128,7 @@ angular.mock.$RootScopeDecorator = function($delegate) {
|
|||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
};
|
}];
|
||||||
|
|
||||||
|
|
||||||
if (window.jasmine || window.mocha) {
|
if (window.jasmine || window.mocha) {
|
||||||
|
29
src/lib/angular/angular-route.js
vendored
29
src/lib/angular/angular-route.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @license AngularJS v1.3.2
|
* @license AngularJS v1.3.7
|
||||||
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
||||||
* License: MIT
|
* License: MIT
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
|
|||||||
*/
|
*/
|
||||||
function $RouteProvider() {
|
function $RouteProvider() {
|
||||||
function inherit(parent, extra) {
|
function inherit(parent, extra) {
|
||||||
return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
|
return angular.extend(Object.create(parent), extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
var routes = {};
|
var routes = {};
|
||||||
@ -151,6 +151,9 @@ function $RouteProvider() {
|
|||||||
if (angular.isUndefined(routeCopy.reloadOnSearch)) {
|
if (angular.isUndefined(routeCopy.reloadOnSearch)) {
|
||||||
routeCopy.reloadOnSearch = true;
|
routeCopy.reloadOnSearch = true;
|
||||||
}
|
}
|
||||||
|
if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {
|
||||||
|
routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;
|
||||||
|
}
|
||||||
routes[path] = angular.extend(
|
routes[path] = angular.extend(
|
||||||
routeCopy,
|
routeCopy,
|
||||||
path && pathRegExp(path, routeCopy)
|
path && pathRegExp(path, routeCopy)
|
||||||
@ -158,9 +161,9 @@ function $RouteProvider() {
|
|||||||
|
|
||||||
// create redirection for trailing slashes
|
// create redirection for trailing slashes
|
||||||
if (path) {
|
if (path) {
|
||||||
var redirectPath = (path[path.length-1] == '/')
|
var redirectPath = (path[path.length - 1] == '/')
|
||||||
? path.substr(0, path.length-1)
|
? path.substr(0, path.length - 1)
|
||||||
: path +'/';
|
: path + '/';
|
||||||
|
|
||||||
routes[redirectPath] = angular.extend(
|
routes[redirectPath] = angular.extend(
|
||||||
{redirectTo: path},
|
{redirectTo: path},
|
||||||
@ -171,6 +174,17 @@ function $RouteProvider() {
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc property
|
||||||
|
* @name $routeProvider#caseInsensitiveMatch
|
||||||
|
* @description
|
||||||
|
*
|
||||||
|
* A boolean property indicating if routes defined
|
||||||
|
* using this provider should be matched using a case insensitive
|
||||||
|
* algorithm. Defaults to `false`.
|
||||||
|
*/
|
||||||
|
this.caseInsensitiveMatch = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param path {string} path
|
* @param path {string} path
|
||||||
* @param opts {Object} options
|
* @param opts {Object} options
|
||||||
@ -639,11 +653,11 @@ function $RouteProvider() {
|
|||||||
*/
|
*/
|
||||||
function interpolate(string, params) {
|
function interpolate(string, params) {
|
||||||
var result = [];
|
var result = [];
|
||||||
angular.forEach((string||'').split(':'), function(segment, i) {
|
angular.forEach((string || '').split(':'), function(segment, i) {
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
result.push(segment);
|
result.push(segment);
|
||||||
} else {
|
} else {
|
||||||
var segmentMatch = segment.match(/(\w+)(.*)/);
|
var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/);
|
||||||
var key = segmentMatch[1];
|
var key = segmentMatch[1];
|
||||||
result.push(params[key]);
|
result.push(params[key]);
|
||||||
result.push(segmentMatch[2] || '');
|
result.push(segmentMatch[2] || '');
|
||||||
@ -774,7 +788,6 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||||||
.view-animate-container {
|
.view-animate-container {
|
||||||
position:relative;
|
position:relative;
|
||||||
height:100px!important;
|
height:100px!important;
|
||||||
position:relative;
|
|
||||||
background:white;
|
background:white;
|
||||||
border:1px solid black;
|
border:1px solid black;
|
||||||
height:40px;
|
height:40px;
|
||||||
|
1787
src/lib/angular/angular.js
vendored
1787
src/lib/angular/angular.js
vendored
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user