From 845acc9405f7c912daedc542824e0d904bf977a4 Mon Sep 17 00:00:00 2001 From: Hirav Gandhi Date: Fri, 23 Jan 2015 13:42:55 -0800 Subject: [PATCH] Bump version to 1.3.10 (closes #80) --- lib/angularjs-rails/version.rb | 4 +- vendor/assets/javascripts/angular-animate.js | 4 +- vendor/assets/javascripts/angular-aria.js | 2 +- vendor/assets/javascripts/angular-cookies.js | 2 +- vendor/assets/javascripts/angular-loader.js | 4 +- vendor/assets/javascripts/angular-messages.js | 4 +- vendor/assets/javascripts/angular-mocks.js | 2 +- vendor/assets/javascripts/angular-resource.js | 2 +- vendor/assets/javascripts/angular-route.js | 2 +- vendor/assets/javascripts/angular-sanitize.js | 2 +- vendor/assets/javascripts/angular-scenario.js | 106 ++++++++++++------ vendor/assets/javascripts/angular-touch.js | 2 +- vendor/assets/javascripts/angular.js | 106 ++++++++++++------ .../javascripts/unstable/angular-animate.js | 4 +- .../javascripts/unstable/angular-aria.js | 2 +- .../javascripts/unstable/angular-cookies.js | 2 +- .../javascripts/unstable/angular-loader.js | 4 +- .../javascripts/unstable/angular-messages.js | 4 +- .../javascripts/unstable/angular-mocks.js | 2 +- .../javascripts/unstable/angular-resource.js | 2 +- .../javascripts/unstable/angular-route.js | 2 +- .../javascripts/unstable/angular-sanitize.js | 2 +- .../javascripts/unstable/angular-scenario.js | 106 ++++++++++++------ .../javascripts/unstable/angular-touch.js | 2 +- vendor/assets/javascripts/unstable/angular.js | 106 ++++++++++++------ 25 files changed, 304 insertions(+), 176 deletions(-) diff --git a/lib/angularjs-rails/version.rb b/lib/angularjs-rails/version.rb index 5f61390..455536e 100644 --- a/lib/angularjs-rails/version.rb +++ b/lib/angularjs-rails/version.rb @@ -1,6 +1,6 @@ module AngularJS module Rails - VERSION = "1.3.9" - UNSTABLE_VERSION = "1.3.9" + VERSION = "1.3.10" + UNSTABLE_VERSION = "1.3.10" end end diff --git a/vendor/assets/javascripts/angular-animate.js b/vendor/assets/javascripts/angular-animate.js index c1abff9..2014bae 100644 --- a/vendor/assets/javascripts/angular-animate.js +++ b/vendor/assets/javascripts/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -1875,7 +1875,7 @@ angular.module('ngAnimate', ['ng']) return; } - if (!staggerTime && styles) { + if (!staggerTime && styles && Object.keys(styles).length > 0) { if (!timings.transitionDuration) { element.css('transition', timings.animationDuration + 's linear all'); appliedStyles.push('transition'); diff --git a/vendor/assets/javascripts/angular-aria.js b/vendor/assets/javascripts/angular-aria.js index 3d8e116..3119997 100644 --- a/vendor/assets/javascripts/angular-aria.js +++ b/vendor/assets/javascripts/angular-aria.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular-cookies.js b/vendor/assets/javascripts/angular-cookies.js index 8ffe2e9..3c3a5c6 100644 --- a/vendor/assets/javascripts/angular-cookies.js +++ b/vendor/assets/javascripts/angular-cookies.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular-loader.js b/vendor/assets/javascripts/angular-loader.js index 1e75d4d..0310654 100644 --- a/vendor/assets/javascripts/angular-loader.js +++ b/vendor/assets/javascripts/angular-loader.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -55,7 +55,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.3.9/' + + message = message + '\nhttp://errors.angularjs.org/1.3.10/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + diff --git a/vendor/assets/javascripts/angular-messages.js b/vendor/assets/javascripts/angular-messages.js index ac2e327..007af38 100644 --- a/vendor/assets/javascripts/angular-messages.js +++ b/vendor/assets/javascripts/angular-messages.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -178,7 +178,7 @@ angular.module('ngMessages', []) * at a time and this depends on the prioritization of the messages within the template. (This can * be changed by using the ng-messages-multiple on the directive container.) * - * A remote template can also be used to promote message reuseability and messages can also be + * A remote template can also be used to promote message reusability and messages can also be * overridden. * * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. diff --git a/vendor/assets/javascripts/angular-mocks.js b/vendor/assets/javascripts/angular-mocks.js index dde8a46..da61717 100644 --- a/vendor/assets/javascripts/angular-mocks.js +++ b/vendor/assets/javascripts/angular-mocks.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular-resource.js b/vendor/assets/javascripts/angular-resource.js index 3e97303..c062f41 100644 --- a/vendor/assets/javascripts/angular-resource.js +++ b/vendor/assets/javascripts/angular-resource.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular-route.js b/vendor/assets/javascripts/angular-route.js index 7742100..560d530 100644 --- a/vendor/assets/javascripts/angular-route.js +++ b/vendor/assets/javascripts/angular-route.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular-sanitize.js b/vendor/assets/javascripts/angular-sanitize.js index d103240..eefd399 100644 --- a/vendor/assets/javascripts/angular-sanitize.js +++ b/vendor/assets/javascripts/angular-sanitize.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular-scenario.js b/vendor/assets/javascripts/angular-scenario.js index f743da3..28e277b 100644 --- a/vendor/assets/javascripts/angular-scenario.js +++ b/vendor/assets/javascripts/angular-scenario.js @@ -9190,7 +9190,7 @@ return jQuery; })); /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -9246,7 +9246,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.3.9/' + + message = message + '\nhttp://errors.angularjs.org/1.3.10/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + @@ -10594,7 +10594,7 @@ function angularInit(element, bootstrap) { * @param {DOMElement} element DOM element which is the root of angular application. * @param {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) - * 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} * @param {Object=} config an object for defining configuration options for the application. The * following keys are supported: @@ -11310,11 +11310,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ 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 minor: 3, - dot: 9, - codeName: 'multidimensional-awareness' + dot: 10, + codeName: 'heliotropic-sundial' }; @@ -13378,7 +13378,7 @@ function createInjector(modulesToLoad, strictDi) { // 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) {}]); // 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); return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance; @@ -16357,6 +16357,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // use class as directive className = node.className; + if (isObject(className)) { + // Maybe SVGAnimatedString + className = className.animVal; + } if (isString(className) && className !== '') { while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { nName = directiveNormalize(match[2]); @@ -17623,7 +17627,7 @@ function $ControllerProvider() { // Object creation: http://jsperf.com/create-constructor/2 var controllerPrototype = (isArray(expression) ? expression[expression.length - 1] : expression).prototype; - instance = Object.create(controllerPrototype); + instance = Object.create(controllerPrototype || null); if (identifier) { addIdentifier(locals, identifier, instance, constructor || expression.name); @@ -23692,7 +23696,7 @@ function $RootScopeProvider() { * @kind function * * @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. * * This can be used to queue up multiple expressions which need to be evaluated in the same @@ -25202,8 +25206,7 @@ var $compileMinErr = minErr('$compile'); function $TemplateRequestProvider() { this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) { function handleRequestFn(tpl, ignoreRequestError) { - var self = handleRequestFn; - self.totalPendingRequests++; + handleRequestFn.totalPendingRequests++; var transformResponse = $http.defaults && $http.defaults.transformResponse; @@ -25221,13 +25224,14 @@ function $TemplateRequestProvider() { }; return $http.get(tpl, httpOptions) + .finally(function() { + handleRequestFn.totalPendingRequests--; + }) .then(function(response) { - self.totalPendingRequests--; return response.data; }, handleError); function handleError(resp) { - self.totalPendingRequests--; if (!ignoreRequestError) { throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl); } @@ -26317,7 +26321,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d * * `'m'`: Minute in hour (0-59) * * `'ss'`: Second in minute, padded (00-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 * * `'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 @@ -27453,6 +27457,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { forEach(form.$error, function(value, name) { form.$setValidity(name, null, control); }); + forEach(form.$$success, function(value, name) { + form.$setValidity(name, null, control); + }); arrayRemove(controls, control); }; @@ -27470,23 +27477,23 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { addSetValidityMethod({ ctrl: this, $element: element, - set: function(object, property, control) { + set: function(object, property, controller) { var list = object[property]; if (!list) { - object[property] = [control]; + object[property] = [controller]; } else { - var index = list.indexOf(control); + var index = list.indexOf(controller); if (index === -1) { - list.push(control); + list.push(controller); } } }, - unset: function(object, property, control) { + unset: function(object, property, controller) { var list = object[property]; if (!list) { return; } - arrayRemove(list, control); + arrayRemove(list, controller); if (list.length === 0) { delete object[property]; } @@ -29831,8 +29838,9 @@ function classDirective(name, selector) { * new classes are added. * * @animations - * add - happens just before the class is applied to the element - * remove - happens just before the class is removed from the element + * **add** - happens just before the class is applied to the elements + * + * **remove** - happens just before the class is removed from the element * * @element ANY * @param {expression} ngClass {@link guide/expression Expression} to eval. The result @@ -31298,7 +31306,7 @@ var ngIfDirective = ['$animate', function($animate) { * @name ngInclude#$includeContentError * @eventType emit on the scope ngInclude was declared in * @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 {String} src URL of content to load. @@ -32855,22 +32863,22 @@ function addSetValidityMethod(context) { ctrl.$setValidity = setValidity; - function setValidity(validationErrorKey, state, options) { + function setValidity(validationErrorKey, state, controller) { if (state === undefined) { - createAndSet('$pending', validationErrorKey, options); + createAndSet('$pending', validationErrorKey, controller); } else { - unsetAndCleanup('$pending', validationErrorKey, options); + unsetAndCleanup('$pending', validationErrorKey, controller); } if (!isBoolean(state)) { - unset(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } else { if (state) { - unset(ctrl.$error, validationErrorKey, options); - set(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + set(ctrl.$$success, validationErrorKey, controller); } else { - set(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + set(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } } if (ctrl.$pending) { @@ -32898,20 +32906,21 @@ function addSetValidityMethod(context) { } else { combinedState = null; } + toggleValidationCss(validationErrorKey, combinedState); parentForm.$setValidity(validationErrorKey, combinedState, ctrl); } - function createAndSet(name, value, options) { + function createAndSet(name, value, controller) { if (!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]) { - unset(ctrl[name], value, options); + unset(ctrl[name], value, controller); } if (isObjectEmpty(ctrl[name])) { ctrl[name] = undefined; @@ -33230,6 +33239,29 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}. * 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 + *
...
+ * ``` + * + * 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 * 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. @@ -33474,7 +33506,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) { var keyIdentifier = match[2]; 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.", aliasAs); } diff --git a/vendor/assets/javascripts/angular-touch.js b/vendor/assets/javascripts/angular-touch.js index 1055fe5..b488d9c 100644 --- a/vendor/assets/javascripts/angular-touch.js +++ b/vendor/assets/javascripts/angular-touch.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/angular.js b/vendor/assets/javascripts/angular.js index 1b5a02a..1091992 100644 --- a/vendor/assets/javascripts/angular.js +++ b/vendor/assets/javascripts/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.3.9/' + + message = message + '\nhttp://errors.angularjs.org/1.3.10/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + @@ -1402,7 +1402,7 @@ function angularInit(element, bootstrap) { * @param {DOMElement} element DOM element which is the root of angular application. * @param {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) - * 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} * @param {Object=} config an object for defining configuration options for the application. The * following keys are supported: @@ -2118,11 +2118,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ 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 minor: 3, - dot: 9, - codeName: 'multidimensional-awareness' + dot: 10, + codeName: 'heliotropic-sundial' }; @@ -4186,7 +4186,7 @@ function createInjector(modulesToLoad, strictDi) { // 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) {}]); // 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); return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance; @@ -7165,6 +7165,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // use class as directive className = node.className; + if (isObject(className)) { + // Maybe SVGAnimatedString + className = className.animVal; + } if (isString(className) && className !== '') { while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { nName = directiveNormalize(match[2]); @@ -8431,7 +8435,7 @@ function $ControllerProvider() { // Object creation: http://jsperf.com/create-constructor/2 var controllerPrototype = (isArray(expression) ? expression[expression.length - 1] : expression).prototype; - instance = Object.create(controllerPrototype); + instance = Object.create(controllerPrototype || null); if (identifier) { addIdentifier(locals, identifier, instance, constructor || expression.name); @@ -14500,7 +14504,7 @@ function $RootScopeProvider() { * @kind function * * @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. * * 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'); function $TemplateRequestProvider() { this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) { function handleRequestFn(tpl, ignoreRequestError) { - var self = handleRequestFn; - self.totalPendingRequests++; + handleRequestFn.totalPendingRequests++; var transformResponse = $http.defaults && $http.defaults.transformResponse; @@ -16029,13 +16032,14 @@ function $TemplateRequestProvider() { }; return $http.get(tpl, httpOptions) + .finally(function() { + handleRequestFn.totalPendingRequests--; + }) .then(function(response) { - self.totalPendingRequests--; return response.data; }, handleError); function handleError(resp) { - self.totalPendingRequests--; if (!ignoreRequestError) { throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl); } @@ -17125,7 +17129,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d * * `'m'`: Minute in hour (0-59) * * `'ss'`: Second in minute, padded (00-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 * * `'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 @@ -18261,6 +18265,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { forEach(form.$error, function(value, name) { form.$setValidity(name, null, control); }); + forEach(form.$$success, function(value, name) { + form.$setValidity(name, null, control); + }); arrayRemove(controls, control); }; @@ -18278,23 +18285,23 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { addSetValidityMethod({ ctrl: this, $element: element, - set: function(object, property, control) { + set: function(object, property, controller) { var list = object[property]; if (!list) { - object[property] = [control]; + object[property] = [controller]; } else { - var index = list.indexOf(control); + var index = list.indexOf(controller); if (index === -1) { - list.push(control); + list.push(controller); } } }, - unset: function(object, property, control) { + unset: function(object, property, controller) { var list = object[property]; if (!list) { return; } - arrayRemove(list, control); + arrayRemove(list, controller); if (list.length === 0) { delete object[property]; } @@ -20639,8 +20646,9 @@ function classDirective(name, selector) { * new classes are added. * * @animations - * add - happens just before the class is applied to the element - * remove - happens just before the class is removed from the element + * **add** - happens just before the class is applied to the elements + * + * **remove** - happens just before the class is removed from the element * * @element ANY * @param {expression} ngClass {@link guide/expression Expression} to eval. The result @@ -22106,7 +22114,7 @@ var ngIfDirective = ['$animate', function($animate) { * @name ngInclude#$includeContentError * @eventType emit on the scope ngInclude was declared in * @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 {String} src URL of content to load. @@ -23663,22 +23671,22 @@ function addSetValidityMethod(context) { ctrl.$setValidity = setValidity; - function setValidity(validationErrorKey, state, options) { + function setValidity(validationErrorKey, state, controller) { if (state === undefined) { - createAndSet('$pending', validationErrorKey, options); + createAndSet('$pending', validationErrorKey, controller); } else { - unsetAndCleanup('$pending', validationErrorKey, options); + unsetAndCleanup('$pending', validationErrorKey, controller); } if (!isBoolean(state)) { - unset(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } else { if (state) { - unset(ctrl.$error, validationErrorKey, options); - set(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + set(ctrl.$$success, validationErrorKey, controller); } else { - set(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + set(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } } if (ctrl.$pending) { @@ -23706,20 +23714,21 @@ function addSetValidityMethod(context) { } else { combinedState = null; } + toggleValidationCss(validationErrorKey, combinedState); parentForm.$setValidity(validationErrorKey, combinedState, ctrl); } - function createAndSet(name, value, options) { + function createAndSet(name, value, controller) { if (!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]) { - unset(ctrl[name], value, options); + unset(ctrl[name], value, controller); } if (isObjectEmpty(ctrl[name])) { ctrl[name] = undefined; @@ -24038,6 +24047,29 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}. * 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 + *
...
+ * ``` + * + * 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 * 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. @@ -24282,7 +24314,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) { var keyIdentifier = match[2]; 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.", aliasAs); } diff --git a/vendor/assets/javascripts/unstable/angular-animate.js b/vendor/assets/javascripts/unstable/angular-animate.js index c1abff9..2014bae 100644 --- a/vendor/assets/javascripts/unstable/angular-animate.js +++ b/vendor/assets/javascripts/unstable/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -1875,7 +1875,7 @@ angular.module('ngAnimate', ['ng']) return; } - if (!staggerTime && styles) { + if (!staggerTime && styles && Object.keys(styles).length > 0) { if (!timings.transitionDuration) { element.css('transition', timings.animationDuration + 's linear all'); appliedStyles.push('transition'); diff --git a/vendor/assets/javascripts/unstable/angular-aria.js b/vendor/assets/javascripts/unstable/angular-aria.js index 3d8e116..3119997 100644 --- a/vendor/assets/javascripts/unstable/angular-aria.js +++ b/vendor/assets/javascripts/unstable/angular-aria.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular-cookies.js b/vendor/assets/javascripts/unstable/angular-cookies.js index 8ffe2e9..3c3a5c6 100644 --- a/vendor/assets/javascripts/unstable/angular-cookies.js +++ b/vendor/assets/javascripts/unstable/angular-cookies.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular-loader.js b/vendor/assets/javascripts/unstable/angular-loader.js index 1e75d4d..0310654 100644 --- a/vendor/assets/javascripts/unstable/angular-loader.js +++ b/vendor/assets/javascripts/unstable/angular-loader.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -55,7 +55,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.3.9/' + + message = message + '\nhttp://errors.angularjs.org/1.3.10/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + diff --git a/vendor/assets/javascripts/unstable/angular-messages.js b/vendor/assets/javascripts/unstable/angular-messages.js index ac2e327..007af38 100644 --- a/vendor/assets/javascripts/unstable/angular-messages.js +++ b/vendor/assets/javascripts/unstable/angular-messages.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -178,7 +178,7 @@ angular.module('ngMessages', []) * at a time and this depends on the prioritization of the messages within the template. (This can * be changed by using the ng-messages-multiple on the directive container.) * - * A remote template can also be used to promote message reuseability and messages can also be + * A remote template can also be used to promote message reusability and messages can also be * overridden. * * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. diff --git a/vendor/assets/javascripts/unstable/angular-mocks.js b/vendor/assets/javascripts/unstable/angular-mocks.js index dde8a46..da61717 100644 --- a/vendor/assets/javascripts/unstable/angular-mocks.js +++ b/vendor/assets/javascripts/unstable/angular-mocks.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular-resource.js b/vendor/assets/javascripts/unstable/angular-resource.js index 3e97303..c062f41 100644 --- a/vendor/assets/javascripts/unstable/angular-resource.js +++ b/vendor/assets/javascripts/unstable/angular-resource.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular-route.js b/vendor/assets/javascripts/unstable/angular-route.js index 7742100..560d530 100644 --- a/vendor/assets/javascripts/unstable/angular-route.js +++ b/vendor/assets/javascripts/unstable/angular-route.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular-sanitize.js b/vendor/assets/javascripts/unstable/angular-sanitize.js index d103240..eefd399 100644 --- a/vendor/assets/javascripts/unstable/angular-sanitize.js +++ b/vendor/assets/javascripts/unstable/angular-sanitize.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular-scenario.js b/vendor/assets/javascripts/unstable/angular-scenario.js index f743da3..28e277b 100644 --- a/vendor/assets/javascripts/unstable/angular-scenario.js +++ b/vendor/assets/javascripts/unstable/angular-scenario.js @@ -9190,7 +9190,7 @@ return jQuery; })); /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -9246,7 +9246,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.3.9/' + + message = message + '\nhttp://errors.angularjs.org/1.3.10/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + @@ -10594,7 +10594,7 @@ function angularInit(element, bootstrap) { * @param {DOMElement} element DOM element which is the root of angular application. * @param {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) - * 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} * @param {Object=} config an object for defining configuration options for the application. The * following keys are supported: @@ -11310,11 +11310,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ 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 minor: 3, - dot: 9, - codeName: 'multidimensional-awareness' + dot: 10, + codeName: 'heliotropic-sundial' }; @@ -13378,7 +13378,7 @@ function createInjector(modulesToLoad, strictDi) { // 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) {}]); // 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); return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance; @@ -16357,6 +16357,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // use class as directive className = node.className; + if (isObject(className)) { + // Maybe SVGAnimatedString + className = className.animVal; + } if (isString(className) && className !== '') { while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { nName = directiveNormalize(match[2]); @@ -17623,7 +17627,7 @@ function $ControllerProvider() { // Object creation: http://jsperf.com/create-constructor/2 var controllerPrototype = (isArray(expression) ? expression[expression.length - 1] : expression).prototype; - instance = Object.create(controllerPrototype); + instance = Object.create(controllerPrototype || null); if (identifier) { addIdentifier(locals, identifier, instance, constructor || expression.name); @@ -23692,7 +23696,7 @@ function $RootScopeProvider() { * @kind function * * @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. * * This can be used to queue up multiple expressions which need to be evaluated in the same @@ -25202,8 +25206,7 @@ var $compileMinErr = minErr('$compile'); function $TemplateRequestProvider() { this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) { function handleRequestFn(tpl, ignoreRequestError) { - var self = handleRequestFn; - self.totalPendingRequests++; + handleRequestFn.totalPendingRequests++; var transformResponse = $http.defaults && $http.defaults.transformResponse; @@ -25221,13 +25224,14 @@ function $TemplateRequestProvider() { }; return $http.get(tpl, httpOptions) + .finally(function() { + handleRequestFn.totalPendingRequests--; + }) .then(function(response) { - self.totalPendingRequests--; return response.data; }, handleError); function handleError(resp) { - self.totalPendingRequests--; if (!ignoreRequestError) { throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl); } @@ -26317,7 +26321,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d * * `'m'`: Minute in hour (0-59) * * `'ss'`: Second in minute, padded (00-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 * * `'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 @@ -27453,6 +27457,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { forEach(form.$error, function(value, name) { form.$setValidity(name, null, control); }); + forEach(form.$$success, function(value, name) { + form.$setValidity(name, null, control); + }); arrayRemove(controls, control); }; @@ -27470,23 +27477,23 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { addSetValidityMethod({ ctrl: this, $element: element, - set: function(object, property, control) { + set: function(object, property, controller) { var list = object[property]; if (!list) { - object[property] = [control]; + object[property] = [controller]; } else { - var index = list.indexOf(control); + var index = list.indexOf(controller); if (index === -1) { - list.push(control); + list.push(controller); } } }, - unset: function(object, property, control) { + unset: function(object, property, controller) { var list = object[property]; if (!list) { return; } - arrayRemove(list, control); + arrayRemove(list, controller); if (list.length === 0) { delete object[property]; } @@ -29831,8 +29838,9 @@ function classDirective(name, selector) { * new classes are added. * * @animations - * add - happens just before the class is applied to the element - * remove - happens just before the class is removed from the element + * **add** - happens just before the class is applied to the elements + * + * **remove** - happens just before the class is removed from the element * * @element ANY * @param {expression} ngClass {@link guide/expression Expression} to eval. The result @@ -31298,7 +31306,7 @@ var ngIfDirective = ['$animate', function($animate) { * @name ngInclude#$includeContentError * @eventType emit on the scope ngInclude was declared in * @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 {String} src URL of content to load. @@ -32855,22 +32863,22 @@ function addSetValidityMethod(context) { ctrl.$setValidity = setValidity; - function setValidity(validationErrorKey, state, options) { + function setValidity(validationErrorKey, state, controller) { if (state === undefined) { - createAndSet('$pending', validationErrorKey, options); + createAndSet('$pending', validationErrorKey, controller); } else { - unsetAndCleanup('$pending', validationErrorKey, options); + unsetAndCleanup('$pending', validationErrorKey, controller); } if (!isBoolean(state)) { - unset(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } else { if (state) { - unset(ctrl.$error, validationErrorKey, options); - set(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + set(ctrl.$$success, validationErrorKey, controller); } else { - set(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + set(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } } if (ctrl.$pending) { @@ -32898,20 +32906,21 @@ function addSetValidityMethod(context) { } else { combinedState = null; } + toggleValidationCss(validationErrorKey, combinedState); parentForm.$setValidity(validationErrorKey, combinedState, ctrl); } - function createAndSet(name, value, options) { + function createAndSet(name, value, controller) { if (!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]) { - unset(ctrl[name], value, options); + unset(ctrl[name], value, controller); } if (isObjectEmpty(ctrl[name])) { ctrl[name] = undefined; @@ -33230,6 +33239,29 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}. * 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 + *
...
+ * ``` + * + * 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 * 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. @@ -33474,7 +33506,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) { var keyIdentifier = match[2]; 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.", aliasAs); } diff --git a/vendor/assets/javascripts/unstable/angular-touch.js b/vendor/assets/javascripts/unstable/angular-touch.js index 1055fe5..b488d9c 100644 --- a/vendor/assets/javascripts/unstable/angular-touch.js +++ b/vendor/assets/javascripts/unstable/angular-touch.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/vendor/assets/javascripts/unstable/angular.js b/vendor/assets/javascripts/unstable/angular.js index 1b5a02a..1091992 100644 --- a/vendor/assets/javascripts/unstable/angular.js +++ b/vendor/assets/javascripts/unstable/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.9 + * @license AngularJS v1.3.10 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.3.9/' + + message = message + '\nhttp://errors.angularjs.org/1.3.10/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + @@ -1402,7 +1402,7 @@ function angularInit(element, bootstrap) { * @param {DOMElement} element DOM element which is the root of angular application. * @param {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) - * 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} * @param {Object=} config an object for defining configuration options for the application. The * following keys are supported: @@ -2118,11 +2118,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ 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 minor: 3, - dot: 9, - codeName: 'multidimensional-awareness' + dot: 10, + codeName: 'heliotropic-sundial' }; @@ -4186,7 +4186,7 @@ function createInjector(modulesToLoad, strictDi) { // 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) {}]); // 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); return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance; @@ -7165,6 +7165,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // use class as directive className = node.className; + if (isObject(className)) { + // Maybe SVGAnimatedString + className = className.animVal; + } if (isString(className) && className !== '') { while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { nName = directiveNormalize(match[2]); @@ -8431,7 +8435,7 @@ function $ControllerProvider() { // Object creation: http://jsperf.com/create-constructor/2 var controllerPrototype = (isArray(expression) ? expression[expression.length - 1] : expression).prototype; - instance = Object.create(controllerPrototype); + instance = Object.create(controllerPrototype || null); if (identifier) { addIdentifier(locals, identifier, instance, constructor || expression.name); @@ -14500,7 +14504,7 @@ function $RootScopeProvider() { * @kind function * * @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. * * 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'); function $TemplateRequestProvider() { this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) { function handleRequestFn(tpl, ignoreRequestError) { - var self = handleRequestFn; - self.totalPendingRequests++; + handleRequestFn.totalPendingRequests++; var transformResponse = $http.defaults && $http.defaults.transformResponse; @@ -16029,13 +16032,14 @@ function $TemplateRequestProvider() { }; return $http.get(tpl, httpOptions) + .finally(function() { + handleRequestFn.totalPendingRequests--; + }) .then(function(response) { - self.totalPendingRequests--; return response.data; }, handleError); function handleError(resp) { - self.totalPendingRequests--; if (!ignoreRequestError) { throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl); } @@ -17125,7 +17129,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d * * `'m'`: Minute in hour (0-59) * * `'ss'`: Second in minute, padded (00-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 * * `'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 @@ -18261,6 +18265,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { forEach(form.$error, function(value, name) { form.$setValidity(name, null, control); }); + forEach(form.$$success, function(value, name) { + form.$setValidity(name, null, control); + }); arrayRemove(controls, control); }; @@ -18278,23 +18285,23 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { addSetValidityMethod({ ctrl: this, $element: element, - set: function(object, property, control) { + set: function(object, property, controller) { var list = object[property]; if (!list) { - object[property] = [control]; + object[property] = [controller]; } else { - var index = list.indexOf(control); + var index = list.indexOf(controller); if (index === -1) { - list.push(control); + list.push(controller); } } }, - unset: function(object, property, control) { + unset: function(object, property, controller) { var list = object[property]; if (!list) { return; } - arrayRemove(list, control); + arrayRemove(list, controller); if (list.length === 0) { delete object[property]; } @@ -20639,8 +20646,9 @@ function classDirective(name, selector) { * new classes are added. * * @animations - * add - happens just before the class is applied to the element - * remove - happens just before the class is removed from the element + * **add** - happens just before the class is applied to the elements + * + * **remove** - happens just before the class is removed from the element * * @element ANY * @param {expression} ngClass {@link guide/expression Expression} to eval. The result @@ -22106,7 +22114,7 @@ var ngIfDirective = ['$animate', function($animate) { * @name ngInclude#$includeContentError * @eventType emit on the scope ngInclude was declared in * @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 {String} src URL of content to load. @@ -23663,22 +23671,22 @@ function addSetValidityMethod(context) { ctrl.$setValidity = setValidity; - function setValidity(validationErrorKey, state, options) { + function setValidity(validationErrorKey, state, controller) { if (state === undefined) { - createAndSet('$pending', validationErrorKey, options); + createAndSet('$pending', validationErrorKey, controller); } else { - unsetAndCleanup('$pending', validationErrorKey, options); + unsetAndCleanup('$pending', validationErrorKey, controller); } if (!isBoolean(state)) { - unset(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } else { if (state) { - unset(ctrl.$error, validationErrorKey, options); - set(ctrl.$$success, validationErrorKey, options); + unset(ctrl.$error, validationErrorKey, controller); + set(ctrl.$$success, validationErrorKey, controller); } else { - set(ctrl.$error, validationErrorKey, options); - unset(ctrl.$$success, validationErrorKey, options); + set(ctrl.$error, validationErrorKey, controller); + unset(ctrl.$$success, validationErrorKey, controller); } } if (ctrl.$pending) { @@ -23706,20 +23714,21 @@ function addSetValidityMethod(context) { } else { combinedState = null; } + toggleValidationCss(validationErrorKey, combinedState); parentForm.$setValidity(validationErrorKey, combinedState, ctrl); } - function createAndSet(name, value, options) { + function createAndSet(name, value, controller) { if (!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]) { - unset(ctrl[name], value, options); + unset(ctrl[name], value, controller); } if (isObjectEmpty(ctrl[name])) { ctrl[name] = undefined; @@ -24038,6 +24047,29 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}. * 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 + *
...
+ * ``` + * + * 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 * 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. @@ -24282,7 +24314,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) { var keyIdentifier = match[2]; 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.", aliasAs); }