diff options
Diffstat (limited to 'js')
27 files changed, 398 insertions, 359 deletions
diff --git a/js/package.json b/js/package.json index ed52743ba..d3ac485fe 100644 --- a/js/package.json +++ b/js/package.json @@ -29,12 +29,12 @@ "grunt-contrib-concat": "^0.5.1", "grunt-contrib-connect": "^0.9.0", "grunt-contrib-cssmin": "^0.12.2", - "grunt-contrib-jshint": "^0.11.0", + "grunt-contrib-jshint": "^0.11.1", "grunt-contrib-uglify": "^0.8.0", "grunt-contrib-watch": "^0.6.1", "grunt-karma": "^0.10.1", "grunt-ng-annotate": "^0.10.0", - "grunt-php": "^1.3.0", + "grunt-php": "^1.4.0", "grunt-phpunit": "^0.3.6", "grunt-protractor-runner": "^1.2.1", "grunt-protractor-webdriver": "^0.2.0", diff --git a/js/vendor/angular-animate/.bower.json b/js/vendor/angular-animate/.bower.json index 6dc1b52e0..135629eb8 100644 --- a/js/vendor/angular-animate/.bower.json +++ b/js/vendor/angular-animate/.bower.json @@ -1,17 +1,17 @@ { "name": "angular-animate", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-animate.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" }, "homepage": "https://github.com/angular/bower-angular-animate", - "_release": "1.4.0-build.3911+sha.e57138d", + "_release": "1.4.0-build.3924+sha.e5d1d65", "_resolution": { "type": "version", - "tag": "v1.4.0-build.3911+sha.e57138d", - "commit": "8babc63d99c8c505f342075831ed0a1f9e47fae7" + "tag": "v1.4.0-build.3924+sha.e5d1d65", + "commit": "60a68af865da13343bb66686dcc7084a8d4da47e" }, "_source": "git://github.com/angular/bower-angular-animate.git", "_target": "~1.4.*", diff --git a/js/vendor/angular-animate/angular-animate.js b/js/vendor/angular-animate/angular-animate.js index 76f5509f2..3342cafcd 100644 --- a/js/vendor/angular-animate/angular-animate.js +++ b/js/vendor/angular-animate/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.0-build.3911+sha.e57138d + * @license AngularJS v1.4.0-build.3924+sha.e5d1d65 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/js/vendor/angular-animate/angular-animate.min.js b/js/vendor/angular-animate/angular-animate.min.js index 0b48816ff..a582a4cf3 100644 --- a/js/vendor/angular-animate/angular-animate.min.js +++ b/js/vendor/angular-animate/angular-animate.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.4.0-build.3911+sha.e57138d + AngularJS v1.4.0-build.3924+sha.e5d1d65 (c) 2010-2015 Google, Inc. http://angularjs.org License: MIT */ diff --git a/js/vendor/angular-animate/bower.json b/js/vendor/angular-animate/bower.json index 8dd8dd535..99b1cd84e 100644 --- a/js/vendor/angular-animate/bower.json +++ b/js/vendor/angular-animate/bower.json @@ -1,9 +1,9 @@ { "name": "angular-animate", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-animate.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" } } diff --git a/js/vendor/angular-animate/package.json b/js/vendor/angular-animate/package.json index c6e485b6c..f25b6a648 100644 --- a/js/vendor/angular-animate/package.json +++ b/js/vendor/angular-animate/package.json @@ -1,6 +1,6 @@ { "name": "angular-animate", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "description": "AngularJS module for animations", "main": "index.js", "scripts": { diff --git a/js/vendor/angular-mocks/.bower.json b/js/vendor/angular-mocks/.bower.json index 5e5822b69..3e97b3619 100644 --- a/js/vendor/angular-mocks/.bower.json +++ b/js/vendor/angular-mocks/.bower.json @@ -1,17 +1,17 @@ { "name": "angular-mocks", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-mocks.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" }, "homepage": "https://github.com/angular/bower-angular-mocks", - "_release": "1.4.0-build.3911+sha.e57138d", + "_release": "1.4.0-build.3924+sha.e5d1d65", "_resolution": { "type": "version", - "tag": "v1.4.0-build.3911+sha.e57138d", - "commit": "517c26c659aee2b19632162fa4a01b02d17e82ec" + "tag": "v1.4.0-build.3924+sha.e5d1d65", + "commit": "fbbf011916aef90aa1e195206e8fc61d3adb0829" }, "_source": "git://github.com/angular/bower-angular-mocks.git", "_target": "~1.4.*", diff --git a/js/vendor/angular-mocks/angular-mocks.js b/js/vendor/angular-mocks/angular-mocks.js index f4eadcdec..4e6d82279 100644 --- a/js/vendor/angular-mocks/angular-mocks.js +++ b/js/vendor/angular-mocks/angular-mocks.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.0-build.3911+sha.e57138d + * @license AngularJS v1.4.0-build.3924+sha.e5d1d65 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/js/vendor/angular-mocks/bower.json b/js/vendor/angular-mocks/bower.json index 24d30c98b..d78b401a2 100644 --- a/js/vendor/angular-mocks/bower.json +++ b/js/vendor/angular-mocks/bower.json @@ -1,9 +1,9 @@ { "name": "angular-mocks", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-mocks.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" } } diff --git a/js/vendor/angular-mocks/package.json b/js/vendor/angular-mocks/package.json index 022cb5b34..2e021592c 100644 --- a/js/vendor/angular-mocks/package.json +++ b/js/vendor/angular-mocks/package.json @@ -1,6 +1,6 @@ { "name": "angular-mocks", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "description": "AngularJS mocks for testing", "main": "angular-mocks.js", "scripts": { diff --git a/js/vendor/angular-route/.bower.json b/js/vendor/angular-route/.bower.json index 39f29e9e0..d3136568a 100644 --- a/js/vendor/angular-route/.bower.json +++ b/js/vendor/angular-route/.bower.json @@ -1,17 +1,17 @@ { "name": "angular-route", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-route.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" }, "homepage": "https://github.com/angular/bower-angular-route", - "_release": "1.4.0-build.3911+sha.e57138d", + "_release": "1.4.0-build.3924+sha.e5d1d65", "_resolution": { "type": "version", - "tag": "v1.4.0-build.3911+sha.e57138d", - "commit": "b2c8027175b5e56257cf62a7f19b749f4493eb84" + "tag": "v1.4.0-build.3924+sha.e5d1d65", + "commit": "21aa63d32d418bb84ffb9377ef21872db698035c" }, "_source": "git://github.com/angular/bower-angular-route.git", "_target": "~1.4.*", diff --git a/js/vendor/angular-route/angular-route.js b/js/vendor/angular-route/angular-route.js index e2ab990c4..672e5cd80 100644 --- a/js/vendor/angular-route/angular-route.js +++ b/js/vendor/angular-route/angular-route.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.0-build.3911+sha.e57138d + * @license AngularJS v1.4.0-build.3924+sha.e5d1d65 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/js/vendor/angular-route/angular-route.min.js b/js/vendor/angular-route/angular-route.min.js index 974385c31..387db72d8 100644 --- a/js/vendor/angular-route/angular-route.min.js +++ b/js/vendor/angular-route/angular-route.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.4.0-build.3911+sha.e57138d + AngularJS v1.4.0-build.3924+sha.e5d1d65 (c) 2010-2015 Google, Inc. http://angularjs.org License: MIT */ diff --git a/js/vendor/angular-route/bower.json b/js/vendor/angular-route/bower.json index 1cc48750a..aee92ee48 100644 --- a/js/vendor/angular-route/bower.json +++ b/js/vendor/angular-route/bower.json @@ -1,9 +1,9 @@ { "name": "angular-route", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-route.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" } } diff --git a/js/vendor/angular-route/package.json b/js/vendor/angular-route/package.json index cb3f41958..3703e02ab 100644 --- a/js/vendor/angular-route/package.json +++ b/js/vendor/angular-route/package.json @@ -1,6 +1,6 @@ { "name": "angular-route", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "description": "AngularJS router module", "main": "index.js", "scripts": { diff --git a/js/vendor/angular-sanitize/.bower.json b/js/vendor/angular-sanitize/.bower.json index eec42a2d4..bf5b9b8e2 100644 --- a/js/vendor/angular-sanitize/.bower.json +++ b/js/vendor/angular-sanitize/.bower.json @@ -1,17 +1,17 @@ { "name": "angular-sanitize", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-sanitize.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" }, "homepage": "https://github.com/angular/bower-angular-sanitize", - "_release": "1.4.0-build.3911+sha.e57138d", + "_release": "1.4.0-build.3924+sha.e5d1d65", "_resolution": { "type": "version", - "tag": "v1.4.0-build.3911+sha.e57138d", - "commit": "3845428a031eb28f942344c7c9ea1b051d774d8d" + "tag": "v1.4.0-build.3924+sha.e5d1d65", + "commit": "c3cf3ede974f8e650fd9c152d9f69f867c242741" }, "_source": "git://github.com/angular/bower-angular-sanitize.git", "_target": "~1.4.*", diff --git a/js/vendor/angular-sanitize/angular-sanitize.js b/js/vendor/angular-sanitize/angular-sanitize.js index ad299e0c9..9cc31a23d 100644 --- a/js/vendor/angular-sanitize/angular-sanitize.js +++ b/js/vendor/angular-sanitize/angular-sanitize.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.0-build.3911+sha.e57138d + * @license AngularJS v1.4.0-build.3924+sha.e5d1d65 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/js/vendor/angular-sanitize/angular-sanitize.min.js b/js/vendor/angular-sanitize/angular-sanitize.min.js index 718eeac19..d0885e253 100644 --- a/js/vendor/angular-sanitize/angular-sanitize.min.js +++ b/js/vendor/angular-sanitize/angular-sanitize.min.js @@ -1,5 +1,5 @@ /* - AngularJS v1.4.0-build.3911+sha.e57138d + AngularJS v1.4.0-build.3924+sha.e5d1d65 (c) 2010-2015 Google, Inc. http://angularjs.org License: MIT */ diff --git a/js/vendor/angular-sanitize/bower.json b/js/vendor/angular-sanitize/bower.json index 09f89d4a3..49a471d0a 100644 --- a/js/vendor/angular-sanitize/bower.json +++ b/js/vendor/angular-sanitize/bower.json @@ -1,9 +1,9 @@ { "name": "angular-sanitize", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular-sanitize.js", "ignore": [], "dependencies": { - "angular": "1.4.0-build.3911+sha.e57138d" + "angular": "1.4.0-build.3924+sha.e5d1d65" } } diff --git a/js/vendor/angular-sanitize/package.json b/js/vendor/angular-sanitize/package.json index e5686ad7c..3dbbab28e 100644 --- a/js/vendor/angular-sanitize/package.json +++ b/js/vendor/angular-sanitize/package.json @@ -1,6 +1,6 @@ { "name": "angular-sanitize", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "description": "AngularJS module for sanitizing HTML", "main": "index.js", "scripts": { diff --git a/js/vendor/angular/.bower.json b/js/vendor/angular/.bower.json index f7c3b4179..9c630cd55 100644 --- a/js/vendor/angular/.bower.json +++ b/js/vendor/angular/.bower.json @@ -1,15 +1,15 @@ { "name": "angular", - "version": "1.4.0-build.3911+sha.e57138d", + "version": "1.4.0-build.3924+sha.e5d1d65", "main": "./angular.js", "ignore": [], "dependencies": {}, "homepage": "https://github.com/angular/bower-angular", - "_release": "1.4.0-build.3911+sha.e57138d", + "_release": "1.4.0-build.3924+sha.e5d1d65", "_resolution": { "type": "version", - "tag": "v1.4.0-build.3911+sha.e57138d", - "commit": "e8bd7d1724e6326f65971ec4878135224e9d91f5" + "tag": "v1.4.0-build.3924+sha.e5d1d65", + "commit": "c138089f5803cba923cbd9624517d8d749b5f1f7" }, "_source": "git://github.com/angular/bower-angular.git", "_target": "~1.4.*", diff --git a/js/vendor/angular/angular.js b/js/vendor/angular/angular.js index 72673ba79..85f2bdcee 100644 --- a/js/vendor/angular/angular.js +++ b/js/vendor/angular/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.0-build.3911+sha.e57138d + * @license AngularJS v1.4.0-build.3924+sha.e5d1d65 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ @@ -57,7 +57,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message += '\nhttp://errors.angularjs.org/1.4.0-build.3911+sha.e57138d/' + + message += '\nhttp://errors.angularjs.org/1.4.0-build.3924+sha.e5d1d65/' + (module ? module + '/' : '') + code; for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { @@ -2275,7 +2275,7 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.4.0-build.3911+sha.e57138d', // all of these placeholder strings will be replaced by grunt's + full: '1.4.0-build.3924+sha.e5d1d65', // all of these placeholder strings will be replaced by grunt's major: 1, // package task minor: 4, dot: 0, @@ -6570,6 +6570,14 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { return bindings; } + function assertValidDirectiveName(name) { + var letter = name.charAt(0); + if (!letter || letter !== lowercase(letter)) { + throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name); + } + return name; + } + /** * @ngdoc method * @name $compileProvider#directive @@ -6588,6 +6596,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { this.directive = function registerDirective(name, directiveFactory) { assertNotHasOwnProperty(name, 'directive'); if (isString(name)) { + assertValidDirectiveName(name); assertArg(directiveFactory, 'directiveFactory'); if (!hasDirectives.hasOwnProperty(name)) { hasDirectives[name] = []; @@ -9554,6 +9563,8 @@ function $HttpProvider() { } promise.success = function(fn) { + assertArgFn(fn, 'fn'); + promise.then(function(response) { fn(response.data, response.status, response.headers, config); }); @@ -9561,6 +9572,8 @@ function $HttpProvider() { }; promise.error = function(fn) { + assertArgFn(fn, 'fn'); + promise.then(null, function(response) { fn(response.data, response.status, response.headers, config); }); @@ -10041,7 +10054,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc }; function jsonpReq(url, callbackId, done) { - // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.: + // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.: // - fetches local scripts via XHR and evals them // - adds and immediately removes script elements from the document var script = rawDocument.createElement('script'), callback = null; @@ -10077,7 +10090,17 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc } } -var $interpolateMinErr = minErr('$interpolate'); +var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate'); +$interpolateMinErr.throwNoconcat = function(text) { + throw $interpolateMinErr('noconcat', + "Error while interpolating: {0}\nStrict Contextual Escaping disallows " + + "interpolations that concatenate multiple expressions when a trusted value is " + + "required. See http://docs.angularjs.org/api/ng.$sce", text); +}; + +$interpolateMinErr.interr = function(text, err) { + return $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, err.toString()); +}; /** * @ngdoc provider @@ -10321,10 +10344,7 @@ function $InterpolateProvider() { // make it obvious that you bound the value to some user controlled value. This helps reduce // the load when auditing for XSS issues. if (trustedContext && concat.length > 1) { - throw $interpolateMinErr('noconcat', - "Error while interpolating: {0}\nStrict Contextual Escaping disallows " + - "interpolations that concatenate multiple expressions when a trusted value is " + - "required. See http://docs.angularjs.org/api/ng.$sce", text); + $interpolateMinErr.throwNoconcat(text); } if (!mustHaveExpression || expressions.length) { @@ -10354,9 +10374,7 @@ function $InterpolateProvider() { return compute(values); } catch (err) { - var newErr = $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, - err.toString()); - $exceptionHandler(newErr); + $exceptionHandler($interpolateMinErr.interr(text, err)); } }, { @@ -10381,9 +10399,7 @@ function $InterpolateProvider() { value = getValue(value); return allOrNothing && !isDefined(value) ? value : stringify(value); } catch (err) { - var newErr = $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, - err.toString()); - $exceptionHandler(newErr); + $exceptionHandler($interpolateMinErr.interr(text, err)); } } } @@ -15198,13 +15214,12 @@ function $RootScopeProvider() { * clean up DOM bindings before an element is removed from the DOM. */ $destroy: function() { - // we can't destroy the root scope or a scope that has been already destroyed + // We can't destroy a scope that has been already destroyed. if (this.$$destroyed) return; var parent = this.$parent; this.$broadcast('$destroy'); this.$$destroyed = true; - if (this === $rootScope) return; incrementWatchersCount(this, -this.$$watchersCount); for (var eventName in this.$$listenerCount) { @@ -15213,8 +15228,8 @@ function $RootScopeProvider() { // sever all the references to parent scopes (after this cleanup, the current scope should // not be retained by any of our references and should be eligible for garbage collection) - if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling; - if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling; + if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling; + if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling; if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling; if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling; @@ -20278,7 +20293,11 @@ var inputType = { * Text input with number validation and transformation. Sets the `number` validation * error if not a valid number. * - * The model must always be a number, otherwise Angular will throw an error. + * <div class="alert alert-warning"> + * The model must always be of type `number` otherwise Angular will throw an error. + * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt} + * error docs for more information and an example of how to convert your model if necessary. + * </div> * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. @@ -21691,12 +21710,15 @@ function classDirective(name, selector) { } function arrayClasses(classVal) { + var classes = []; if (isArray(classVal)) { - return classVal.join(' ').split(' '); + forEach(classVal, function(v) { + classes = classes.concat(arrayClasses(v)); + }); + return classes; } else if (isString(classVal)) { return classVal.split(' '); } else if (isObject(classVal)) { - var classes = []; forEach(classVal, function(v, k) { if (v) { classes = classes.concat(k.split(' ')); @@ -21724,16 +21746,18 @@ function classDirective(name, selector) { * 1. If the expression evaluates to a string, the string should be one or more space-delimited class * names. * - * 2. If the expression evaluates to an array, each element of the array should be a string that is - * one or more space-delimited class names. - * - * 3. If the expression evaluates to an object, then for each key-value pair of the + * 2. If the expression evaluates to an object, then for each key-value pair of the * object with a truthy value the corresponding key is used as a class name. * + * 3. If the expression evaluates to an array, each element of the array should either be a string as in + * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array + * to give you more control over what CSS classes appear. See the code below for an example of this. + * + * * The directive won't add duplicate classes if a particular class was already set. * - * When the expression changes, the previously added classes are removed and only then the - * new classes are added. + * When the expression changes, the previously added classes are removed and only then are the + * new classes added. * * @animations * **add** - happens just before the class is applied to the elements @@ -21762,10 +21786,14 @@ function classDirective(name, selector) { <input ng-model="style1" placeholder="Type: bold, strike or red"><br> <input ng-model="style2" placeholder="Type: bold, strike or red"><br> <input ng-model="style3" placeholder="Type: bold, strike or red"><br> + <hr> + <p ng-class="[style4, {orange: warning}]">Using Array and Map Syntax</p> + <input ng-model="style4" placeholder="Type: bold, strike"><br> + <input type="checkbox" ng-model="warning"> warning (apply "orange" class) </file> <file name="style.css"> .strike { - text-decoration: line-through; + text-decoration: line-through; } .bold { font-weight: bold; @@ -21773,6 +21801,9 @@ function classDirective(name, selector) { .red { color: red; } + .orange { + color: orange; + } </file> <file name="protractor.js" type="protractor"> var ps = element.all(by.css('p')); @@ -21797,11 +21828,18 @@ function classDirective(name, selector) { }); it('array example should have 3 classes', function() { - expect(ps.last().getAttribute('class')).toBe(''); |