Commit 19091282 authored by Pascal Hartig's avatar Pascal Hartig

AngularJS: Update to 1.3.10

parent f009cb66
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
"name": "todomvc-angular", "name": "todomvc-angular",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"angular": "1.3.9", "angular": "1.3.10",
"todomvc-common": "~0.3.0" "todomvc-common": "~0.3.0"
}, },
"devDependencies": { "devDependencies": {
"angular-mocks": "1.3.9", "angular-mocks": "1.3.10",
"angular-route": "1.3.9" "angular-route": "1.3.10"
} }
} }
/** /**
* @license AngularJS v1.3.9 * @license AngularJS v1.3.10
* (c) 2010-2014 Google, Inc. http://angularjs.org * (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT * License: MIT
*/ */
......
/** /**
* @license AngularJS v1.3.9 * @license AngularJS v1.3.10
* (c) 2010-2014 Google, Inc. http://angularjs.org * (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT * License: MIT
*/ */
...@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) { ...@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
return match; return match;
}); });
message = message + '\nhttp://errors.angularjs.org/1.3.9/' + message = message + '\nhttp://errors.angularjs.org/1.3.10/' +
(module ? module + '/' : '') + code; (module ? module + '/' : '') + code;
for (i = 2; i < arguments.length; i++) { for (i = 2; i < arguments.length; i++) {
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
...@@ -1402,7 +1402,7 @@ function angularInit(element, bootstrap) { ...@@ -1402,7 +1402,7 @@ function angularInit(element, bootstrap) {
* @param {DOMElement} element DOM element which is the root of angular application. * @param {DOMElement} element DOM element which is the root of angular application.
* @param {Array<String|Function|Array>=} modules an array of modules to load into the application. * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
* Each item in the array should be the name of a predefined module or a (DI annotated) * Each item in the array should be the name of a predefined module or a (DI annotated)
* function that will be invoked by the injector as a run block. * function that will be invoked by the injector as a `config` block.
* See: {@link angular.module modules} * See: {@link angular.module modules}
* @param {Object=} config an object for defining configuration options for the application. The * @param {Object=} config an object for defining configuration options for the application. The
* following keys are supported: * following keys are supported:
...@@ -2118,11 +2118,11 @@ function toDebugString(obj) { ...@@ -2118,11 +2118,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/ */
var version = { var version = {
full: '1.3.9', // all of these placeholder strings will be replaced by grunt's full: '1.3.10', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task major: 1, // package task
minor: 3, minor: 3,
dot: 9, dot: 10,
codeName: 'multidimensional-awareness' codeName: 'heliotropic-sundial'
}; };
...@@ -4186,7 +4186,7 @@ function createInjector(modulesToLoad, strictDi) { ...@@ -4186,7 +4186,7 @@ function createInjector(modulesToLoad, strictDi) {
// Check if Type is annotated and use just the given function at n-1 as parameter // Check if Type is annotated and use just the given function at n-1 as parameter
// e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]); // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
// Object creation: http://jsperf.com/create-constructor/2 // Object creation: http://jsperf.com/create-constructor/2
var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype); var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);
var returnedValue = invoke(Type, instance, locals, serviceName); var returnedValue = invoke(Type, instance, locals, serviceName);
return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance; return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
...@@ -7165,6 +7165,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { ...@@ -7165,6 +7165,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// use class as directive // use class as directive
className = node.className; className = node.className;
if (isObject(className)) {
// Maybe SVGAnimatedString
className = className.animVal;
}
if (isString(className) && className !== '') { if (isString(className) && className !== '') {
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
nName = directiveNormalize(match[2]); nName = directiveNormalize(match[2]);
...@@ -8431,7 +8435,7 @@ function $ControllerProvider() { ...@@ -8431,7 +8435,7 @@ function $ControllerProvider() {
// Object creation: http://jsperf.com/create-constructor/2 // Object creation: http://jsperf.com/create-constructor/2
var controllerPrototype = (isArray(expression) ? var controllerPrototype = (isArray(expression) ?
expression[expression.length - 1] : expression).prototype; expression[expression.length - 1] : expression).prototype;
instance = Object.create(controllerPrototype); instance = Object.create(controllerPrototype || null);
if (identifier) { if (identifier) {
addIdentifier(locals, identifier, instance, constructor || expression.name); addIdentifier(locals, identifier, instance, constructor || expression.name);
...@@ -14500,7 +14504,7 @@ function $RootScopeProvider() { ...@@ -14500,7 +14504,7 @@ function $RootScopeProvider() {
* @kind function * @kind function
* *
* @description * @description
* Schedule the invokation of $apply to occur at a later time. The actual time difference * Schedule the invocation of $apply to occur at a later time. The actual time difference
* varies across browsers, but is typically around ~10 milliseconds. * varies across browsers, but is typically around ~10 milliseconds.
* *
* This can be used to queue up multiple expressions which need to be evaluated in the same * This can be used to queue up multiple expressions which need to be evaluated in the same
...@@ -16010,8 +16014,7 @@ var $compileMinErr = minErr('$compile'); ...@@ -16010,8 +16014,7 @@ var $compileMinErr = minErr('$compile');
function $TemplateRequestProvider() { function $TemplateRequestProvider() {
this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) { this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {
function handleRequestFn(tpl, ignoreRequestError) { function handleRequestFn(tpl, ignoreRequestError) {
var self = handleRequestFn; handleRequestFn.totalPendingRequests++;
self.totalPendingRequests++;
var transformResponse = $http.defaults && $http.defaults.transformResponse; var transformResponse = $http.defaults && $http.defaults.transformResponse;
...@@ -16029,13 +16032,14 @@ function $TemplateRequestProvider() { ...@@ -16029,13 +16032,14 @@ function $TemplateRequestProvider() {
}; };
return $http.get(tpl, httpOptions) return $http.get(tpl, httpOptions)
.finally(function() {
handleRequestFn.totalPendingRequests--;
})
.then(function(response) { .then(function(response) {
self.totalPendingRequests--;
return response.data; return response.data;
}, handleError); }, handleError);
function handleError(resp) { function handleError(resp) {
self.totalPendingRequests--;
if (!ignoreRequestError) { if (!ignoreRequestError) {
throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl); throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);
} }
...@@ -17125,7 +17129,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d ...@@ -17125,7 +17129,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d
* * `'m'`: Minute in hour (0-59) * * `'m'`: Minute in hour (0-59)
* * `'ss'`: Second in minute, padded (00-59) * * `'ss'`: Second in minute, padded (00-59)
* * `'s'`: Second in minute (0-59) * * `'s'`: Second in minute (0-59)
* * `'.sss' or ',sss'`: Millisecond in second, padded (000-999) * * `'sss'`: Millisecond in second, padded (000-999)
* * `'a'`: AM/PM marker * * `'a'`: AM/PM marker
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200) * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
* * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
...@@ -18261,6 +18265,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { ...@@ -18261,6 +18265,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
forEach(form.$error, function(value, name) { forEach(form.$error, function(value, name) {
form.$setValidity(name, null, control); form.$setValidity(name, null, control);
}); });
forEach(form.$$success, function(value, name) {
form.$setValidity(name, null, control);
});
arrayRemove(controls, control); arrayRemove(controls, control);
}; };
...@@ -18278,23 +18285,23 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { ...@@ -18278,23 +18285,23 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
addSetValidityMethod({ addSetValidityMethod({
ctrl: this, ctrl: this,
$element: element, $element: element,
set: function(object, property, control) { set: function(object, property, controller) {
var list = object[property]; var list = object[property];
if (!list) { if (!list) {
object[property] = [control]; object[property] = [controller];
} else { } else {
var index = list.indexOf(control); var index = list.indexOf(controller);
if (index === -1) { if (index === -1) {
list.push(control); list.push(controller);
} }
} }
}, },
unset: function(object, property, control) { unset: function(object, property, controller) {
var list = object[property]; var list = object[property];
if (!list) { if (!list) {
return; return;
} }
arrayRemove(list, control); arrayRemove(list, controller);
if (list.length === 0) { if (list.length === 0) {
delete object[property]; delete object[property];
} }
...@@ -20639,8 +20646,9 @@ function classDirective(name, selector) { ...@@ -20639,8 +20646,9 @@ function classDirective(name, selector) {
* new classes are added. * new classes are added.
* *
* @animations * @animations
* add - happens just before the class is applied to the element * **add** - happens just before the class is applied to the elements
* remove - happens just before the class is removed from the element *
* **remove** - happens just before the class is removed from the element
* *
* @element ANY * @element ANY
* @param {expression} ngClass {@link guide/expression Expression} to eval. The result * @param {expression} ngClass {@link guide/expression Expression} to eval. The result
...@@ -22106,7 +22114,7 @@ var ngIfDirective = ['$animate', function($animate) { ...@@ -22106,7 +22114,7 @@ var ngIfDirective = ['$animate', function($animate) {
* @name ngInclude#$includeContentError * @name ngInclude#$includeContentError
* @eventType emit on the scope ngInclude was declared in * @eventType emit on the scope ngInclude was declared in
* @description * @description
* Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299) * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)
* *
* @param {Object} angularEvent Synthetic event object. * @param {Object} angularEvent Synthetic event object.
* @param {String} src URL of content to load. * @param {String} src URL of content to load.
...@@ -23663,22 +23671,22 @@ function addSetValidityMethod(context) { ...@@ -23663,22 +23671,22 @@ function addSetValidityMethod(context) {
ctrl.$setValidity = setValidity; ctrl.$setValidity = setValidity;
function setValidity(validationErrorKey, state, options) { function setValidity(validationErrorKey, state, controller) {
if (state === undefined) { if (state === undefined) {
createAndSet('$pending', validationErrorKey, options); createAndSet('$pending', validationErrorKey, controller);
} else { } else {
unsetAndCleanup('$pending', validationErrorKey, options); unsetAndCleanup('$pending', validationErrorKey, controller);
} }
if (!isBoolean(state)) { if (!isBoolean(state)) {
unset(ctrl.$error, validationErrorKey, options); unset(ctrl.$error, validationErrorKey, controller);
unset(ctrl.$$success, validationErrorKey, options); unset(ctrl.$$success, validationErrorKey, controller);
} else { } else {
if (state) { if (state) {
unset(ctrl.$error, validationErrorKey, options); unset(ctrl.$error, validationErrorKey, controller);
set(ctrl.$$success, validationErrorKey, options); set(ctrl.$$success, validationErrorKey, controller);
} else { } else {
set(ctrl.$error, validationErrorKey, options); set(ctrl.$error, validationErrorKey, controller);
unset(ctrl.$$success, validationErrorKey, options); unset(ctrl.$$success, validationErrorKey, controller);
} }
} }
if (ctrl.$pending) { if (ctrl.$pending) {
...@@ -23706,20 +23714,21 @@ function addSetValidityMethod(context) { ...@@ -23706,20 +23714,21 @@ function addSetValidityMethod(context) {
} else { } else {
combinedState = null; combinedState = null;
} }
toggleValidationCss(validationErrorKey, combinedState); toggleValidationCss(validationErrorKey, combinedState);
parentForm.$setValidity(validationErrorKey, combinedState, ctrl); parentForm.$setValidity(validationErrorKey, combinedState, ctrl);
} }
function createAndSet(name, value, options) { function createAndSet(name, value, controller) {
if (!ctrl[name]) { if (!ctrl[name]) {
ctrl[name] = {}; ctrl[name] = {};
} }
set(ctrl[name], value, options); set(ctrl[name], value, controller);
} }
function unsetAndCleanup(name, value, options) { function unsetAndCleanup(name, value, controller) {
if (ctrl[name]) { if (ctrl[name]) {
unset(ctrl[name], value, options); unset(ctrl[name], value, controller);
} }
if (isObjectEmpty(ctrl[name])) { if (isObjectEmpty(ctrl[name])) {
ctrl[name] = undefined; ctrl[name] = undefined;
...@@ -24038,6 +24047,29 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp ...@@ -24038,6 +24047,29 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp
* Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}. * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.
* This may be useful when, for instance, nesting ngRepeats. * This may be useful when, for instance, nesting ngRepeats.
* *
* # Iterating over object properties
*
* It is possible to get `ngRepeat` to iterate over the properties of an object using the following
* syntax:
*
* ```js
* <div ng-repeat="(key, value) in myObj"> ... </div>
* ```
*
* You need to be aware that the JavaScript specification does not define what order
* it will return the keys for an object. In order to have a guaranteed deterministic order
* for the keys, Angular versions up to and including 1.3 **sort the keys alphabetically**.
*
* If this is not desired, the recommended workaround is to convert your object into an array
* that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
* do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)
* or implement a `$watch` on the object yourself.
*
* In version 1.4 we will remove the sorting, since it seems that browsers generally follow the
* strategy of providing keys in the order in which they were defined, although there are exceptions
* when keys are deleted and reinstated.
*
*
* # Special repeat start and end points * # Special repeat start and end points
* To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
* the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively. * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
...@@ -24282,7 +24314,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) { ...@@ -24282,7 +24314,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
var keyIdentifier = match[2]; var keyIdentifier = match[2];
if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) || if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||
/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(aliasAs))) { /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))) {
throw ngRepeatMinErr('badident', "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.", throw ngRepeatMinErr('badident', "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",
aliasAs); aliasAs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment