From: karim hamidou Date: Sat, 10 May 2014 10:34:27 +0000 (+0200) Subject: bumped angular to 1.2.16 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d3a1904074c5f21a1192760b9c3472eae6636894;p=kite.git bumped angular to 1.2.16 --- diff --git a/src/front/app/lib/angular/angular-animate.js b/src/front/app/lib/angular/angular-animate.js index 0bf5cbc..9a0af80 100644 --- a/src/front/app/lib/angular/angular-animate.js +++ b/src/front/app/lib/angular/angular-animate.js @@ -1,51 +1,53 @@ /** - * @license AngularJS v1.2.0-rc.3 - * (c) 2010-2012 Google, Inc. http://angularjs.org + * @license AngularJS v1.2.16 + * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; +/* jshint maxlen: false */ + /** - * @ngdoc overview + * @ngdoc module * @name ngAnimate * @description * * # ngAnimate * - * `ngAnimate` is an optional module that provides CSS and JavaScript animation hooks. + * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives. + * * - * {@installModule animate} + *
* * # Usage * * To see animations in action, all that is required is to define the appropriate CSS classes - * or to register a JavaScript animation via the $animation service. The directives that support animation automatically are: - * `ngRepeat`, `ngInclude`, `ngSwitch`, `ngShow`, `ngHide` and `ngView`. Custom directives can take advantage of animation + * 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 * by using the `$animate` service. * * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives: * * | Directive | Supported Animations | * |---------------------------------------------------------- |----------------------------------------------------| - * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move | - * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave | - * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave | - * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave | - * | {@link ng.directive:ngIf#animations ngIf} | enter and leave | - * | {@link ng.directive:ngClass#animations ngClass} | add and remove | - * | {@link ng.directive:ngShow#animations ngShow & ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move | + * | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave | + * | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave | + * | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave | + * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave | + * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove | + * | {@link ng.directive:ngShow#usage_animations ngShow & ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:form#usage_animations form} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * | {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | * * You can find out more information about animations upon visiting each directive page. * * Below is an example of how to apply animations to a directive that supports animation hooks: * - *
+ * ```html
  * 
+       
userType: Required!
userType = {{userType}}
@@ -14206,20 +16054,30 @@ function FormController(element, attrs) { myForm.$valid = {{myForm.$valid}}
myForm.$error.required = {{!!myForm.$error.required}}
- - + + it('should initialize to model', function() { - expect(binding('userType')).toEqual('guest'); - expect(binding('myForm.input.$valid')).toEqual('true'); + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); }); it('should be invalid if empty', function() { - input('userType').enter(''); - expect(binding('userType')).toEqual(''); - expect(binding('myForm.input.$valid')).toEqual('false'); + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); }); - - + + + * */ var formDirectiveFactory = function(isNgForm) { return ['$timeout', function($timeout) { @@ -14281,15 +16139,23 @@ var formDirectiveFactory = function(isNgForm) { var formDirective = formDirectiveFactory(); var ngFormDirective = formDirectiveFactory(true); +/* global + + -VALID_CLASS, + -INVALID_CLASS, + -PRISTINE_CLASS, + -DIRTY_CLASS +*/ + var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/; -var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/; +var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i; var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/; var inputType = { /** - * @ngdoc inputType - * @name ng.directive:input.text + * @ngdoc input + * @name input[text] * * @description * Standard HTML text input with angular data binding. @@ -14309,12 +16175,11 @@ var inputType = { * patterns defined as scope expressions. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. - * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trimming the - * input. + * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. * * @example - - + +
Red
- Green
+ Green
Blue
- color = {{color}}
+ color = {{color | json}}
-
- + Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + it('should change state', function() { - expect(binding('color')).toEqual('blue'); + var color = element(by.binding('color')); - input('color').select('red'); - expect(binding('color')).toEqual('red'); + expect(color.getText()).toContain('blue'); + + element.all(by.model('color')).get(0).click(); + + expect(color.getText()).toContain('red'); }); - -
+ + */ 'radio': radioInputType, /** - * @ngdoc inputType - * @name ng.directive:input.checkbox + * @ngdoc input + * @name input[checkbox] * * @description * HTML checkbox. @@ -14627,8 +16525,8 @@ var inputType = { * interaction with the input element. * * @example - - + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. +
+ +
+
+ *
*/ var ngModelDirective = function() { return { @@ -15491,7 +17462,7 @@ var ngModelDirective = function() { formCtrl.$addControl(modelCtrl); - element.on('$destroy', function() { + scope.$on('$destroy', function() { formCtrl.$removeControl(modelCtrl); }); } @@ -15501,10 +17472,13 @@ var ngModelDirective = function() { /** * @ngdoc directive - * @name ng.directive:ngChange + * @name ngChange * * @description - * Evaluate given expression when user changes the input. + * Evaluate the given expression when the user changes the input. + * The expression is evaluated immediately, unlike the JavaScript onchange event + * which only triggers at the end of a change (usually, when the user leaves the + * form element or presses the return key). * The expression is not evaluated when the value change is coming from the model. * * Note, this directive requires `ngModel` to be present. @@ -15514,8 +17488,8 @@ var ngModelDirective = function() { * in input value. * * @example - * - * + * + * * Load inlined template
-
- + + it('should load template defined inside script tag', function() { - element('#tpl-link').click(); - expect(element('#tpl-content').text()).toMatch(/Content of the template/); + element(by.css('#tpl-link')).click(); + expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); }); - -
+ + */ var scriptDirective = ['$templateCache', function($templateCache) { return { @@ -18507,7 +20805,7 @@ var scriptDirective = ['$templateCache', function($templateCache) { var ngOptionsMinErr = minErr('ngOptions'); /** * @ngdoc directive - * @name ng.directive:select + * @name select * @restrict E * * @description @@ -18523,14 +20821,21 @@ var ngOptionsMinErr = minErr('ngOptions'); * represented by the selected option will be bound to the model identified by the `ngModel` * directive. * + *
+ * **Note:** `ngModel` compares by reference, not value. This is important when binding to an + * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/). + *
+ * * Optionally, a single hard-coded `