diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-27 09:19:51 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-27 09:19:51 +0100 |
commit | 1bc1507dd4d92c841e9a56c7d4c241dd7fa1c25f (patch) | |
tree | 81dd4f94f002c03f11a3982e0e3a34296160db4d /js/vendor/angular/angular.js | |
parent | 3fbc4c6b9a6574830a7acc9485d8c5cad9f5e6a8 (diff) |
update clientside libs
Diffstat (limited to 'js/vendor/angular/angular.js')
-rw-r--r-- | js/vendor/angular/angular.js | 169 |
1 files changed, 97 insertions, 72 deletions
diff --git a/js/vendor/angular/angular.js b/js/vendor/angular/angular.js index 109199265..01a5386e2 100644 --- a/js/vendor/angular/angular.js +++ b/js/vendor/angular/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.10 + * @license AngularJS v1.3.11 * (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.10/' + + message = message + '\nhttp://errors.angularjs.org/1.3.11/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + @@ -2118,11 +2118,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.3.10', // all of these placeholder strings will be replaced by grunt's + full: '1.3.11', // all of these placeholder strings will be replaced by grunt's major: 1, // package task minor: 3, - dot: 10, - codeName: 'heliotropic-sundial' + dot: 11, + codeName: 'spiffy-manatee' }; @@ -11320,7 +11320,7 @@ function $LocationProvider() { // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser) // currently we open nice url link and redirect then - if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.which == 2) return; + if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return; var elm = jqLite(event.target); @@ -17665,6 +17665,9 @@ var htmlAnchorDirective = valueFn({ compile: function(element, attr) { if (!attr.href && !attr.xlinkHref && !attr.name) { return function(scope, element) { + // If the linked element is not an anchor tag anymore, do nothing + if (element[0].nodeName.toLowerCase() !== 'a') return; + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ? 'xlink:href' : 'href'; @@ -18683,19 +18686,21 @@ var inputType = { <script> angular.module('textInputExample', []) .controller('ExampleController', ['$scope', function($scope) { - $scope.text = 'guest'; - $scope.word = /^\s*\w*\s*$/; + $scope.example = { + text: 'guest', + word: /^\s*\w*\s*$/ + }; }]); </script> <form name="myForm" ng-controller="ExampleController"> - Single word: <input type="text" name="input" ng-model="text" - ng-pattern="word" required ng-trim="false"> + Single word: <input type="text" name="input" ng-model="example.text" + ng-pattern="example.word" required ng-trim="false"> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.pattern"> Single word only!</span> - <tt>text = {{text}}</tt><br/> + <tt>text = {{example.text}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -18703,9 +18708,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var text = element(by.binding('text')); + var text = element(by.binding('example.text')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('text')); + var input = element(by.model('example.text')); it('should initialize to model', function() { expect(text.getText()).toContain('guest'); @@ -18767,18 +18772,20 @@ var inputType = { <script> angular.module('dateInputExample', []) .controller('DateController', ['$scope', function($scope) { - $scope.value = new Date(2013, 9, 22); + $scope.example = { + value: new Date(2013, 9, 22) + }; }]); </script> <form name="myForm" ng-controller="DateController as dateCtrl"> Pick a date in 2013: - <input type="date" id="exampleInput" name="input" ng-model="value" + <input type="date" id="exampleInput" name="input" ng-model="example.value" placeholder="yyyy-MM-dd" min="2013-01-01" max="2013-12-31" required /> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.date"> Not a valid date!</span> - <tt>value = {{value | date: "yyyy-MM-dd"}}</tt><br/> + <tt>value = {{example.value | date: "yyyy-MM-dd"}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -18786,9 +18793,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var value = element(by.binding('value | date: "yyyy-MM-dd"')); + var value = element(by.binding('example.value | date: "yyyy-MM-dd"')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('value')); + var input = element(by.model('example.value')); // currently protractor/webdriver does not support // sending keys to all known HTML5 input controls @@ -18858,18 +18865,20 @@ var inputType = { <script> angular.module('dateExample', []) .controller('DateController', ['$scope', function($scope) { - $scope.value = new Date(2010, 11, 28, 14, 57); + $scope.example = { + value: new Date(2010, 11, 28, 14, 57) + }; }]); </script> <form name="myForm" ng-controller="DateController as dateCtrl"> Pick a date between in 2013: - <input type="datetime-local" id="exampleInput" name="input" ng-model="value" + <input type="datetime-local" id="exampleInput" name="input" ng-model="example.value" placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required /> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.datetimelocal"> Not a valid date!</span> - <tt>value = {{value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/> + <tt>value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -18877,9 +18886,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var value = element(by.binding('value | date: "yyyy-MM-ddTHH:mm:ss"')); + var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('value')); + var input = element(by.model('example.value')); // currently protractor/webdriver does not support // sending keys to all known HTML5 input controls @@ -18950,18 +18959,20 @@ var inputType = { <script> angular.module('timeExample', []) .controller('DateController', ['$scope', function($scope) { - $scope.value = new Date(1970, 0, 1, 14, 57, 0); + $scope.example = { + value: new Date(1970, 0, 1, 14, 57, 0) + }; }]); </script> <form name="myForm" ng-controller="DateController as dateCtrl"> Pick a between 8am and 5pm: - <input type="time" id="exampleInput" name="input" ng-model="value" + <input type="time" id="exampleInput" name="input" ng-model="example.value" placeholder="HH:mm:ss" min="08:00:00" max="17:00:00" required /> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.time"> Not a valid date!</span> - <tt>value = {{value | date: "HH:mm:ss"}}</tt><br/> + <tt>value = {{example.value | date: "HH:mm:ss"}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -18969,9 +18980,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var value = element(by.binding('value | date: "HH:mm:ss"')); + var value = element(by.binding('example.value | date: "HH:mm:ss"')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('value')); + var input = element(by.model('example.value')); // currently protractor/webdriver does not support // sending keys to all known HTML5 input controls @@ -19041,18 +19052,20 @@ var inputType = { <script> angular.module('weekExample', []) .controller('DateController', ['$scope', function($scope) { - $scope.value = new Date(2013, 0, 3); + $scope.example = { + value: new Date(2013, 0, 3) + }; }]); </script> <form name="myForm" ng-controller="DateController as dateCtrl"> Pick a date between in 2013: - <input id="exampleInput" type="week" name="input" ng-model="value" + <input id="exampleInput" type="week" name="input" ng-model="example.value" placeholder="YYYY-W##" min="2012-W32" max="2013-W52" required /> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.week"> Not a valid date!</span> - <tt>value = {{value | date: "yyyy-Www"}}</tt><br/> + <tt>value = {{example.value | date: "yyyy-Www"}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -19060,9 +19073,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var value = element(by.binding('value | date: "yyyy-Www"')); + var value = element(by.binding('example.value | date: "yyyy-Www"')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('value')); + var input = element(by.model('example.value')); // currently protractor/webdriver does not support // sending keys to all known HTML5 input controls @@ -19132,18 +19145,20 @@ var inputType = { <script> angular.module('monthExample', []) .controller('DateController', ['$scope', function($scope) { - $scope.value = new Date(2013, 9, 1); + $scope.example = { + value: new Date(2013, 9, 1) + }; }]); </script> <form name="myForm" ng-controller="DateController as dateCtrl"> - Pick a month int 2013: - <input id="exampleInput" type="month" name="input" ng-model="value" + Pick a month in 2013: + <input id="exampleInput" type="month" name="input" ng-model="example.value" placeholder="yyyy-MM" min="2013-01" max="2013-12" required /> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.month"> Not a valid month!</span> - <tt>value = {{value | date: "yyyy-MM"}}</tt><br/> + <tt>value = {{example.value | date: "yyyy-MM"}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -19151,9 +19166,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var value = element(by.binding('value | date: "yyyy-MM"')); + var value = element(by.binding('example.value | date: "yyyy-MM"')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('value')); + var input = element(by.model('example.value')); // currently protractor/webdriver does not support // sending keys to all known HTML5 input controls @@ -19229,17 +19244,19 @@ var inputType = { <script> angular.module('numberExample', []) .controller('ExampleController', ['$scope', function($scope) { - $scope.value = 12; + $scope.example = { + value: 12 + }; }]); </script> <form name="myForm" ng-controller="ExampleController"> - Number: <input type="number" name="input" ng-model="value" + Number: <input type="number" name="input" ng-model="example.value" min="0" max="99" required> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.number"> Not valid number!</span> - <tt>value = {{value}}</tt><br/> + <tt>value = {{example.value}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -19247,9 +19264,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var value = element(by.binding('value')); + var value = element(by.binding('example.value')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('value')); + var input = element(by.model('example.value')); it('should initialize to model', function() { expect(value.getText()).toContain('12'); @@ -19317,16 +19334,18 @@ var inputType = { <script> angular.module('urlExample', []) .controller('ExampleController', ['$scope', function($scope) { - $scope.text = 'http://google.com'; + $scope.url = { + text: 'http://google.com' + }; }]); </script> <form name="myForm" ng-controller="ExampleController"> - URL: <input type="url" name="input" ng-model="text" required> + URL: <input type="url" name="input" ng-model="url.text" required> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.url"> Not valid url!</span> - <tt>text = {{text}}</tt><br/> + <tt>text = {{url.text}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -19335,9 +19354,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var text = element(by.binding('text')); + var text = element(by.binding('url.text')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('text')); + var input = element(by.model('url.text')); it('should initialize to model', function() { expect(text.getText()).toContain('http://google.com'); @@ -19406,16 +19425,18 @@ var inputType = { <script> angular.module('emailExample', []) .controller('ExampleController', ['$scope', function($scope) { - $scope.text = 'me@example.com'; + $scope.email = { + text: 'me@example.com' + }; }]); </script> <form name="myForm" ng-controller="ExampleController"> - Email: <input type="email" name="input" ng-model="text" required> + Email: <input type="email" name="input" ng-model="email.text" required> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.email"> Not valid email!</span> - <tt>text = {{text}}</tt><br/> + <tt>text = {{email.text}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> @@ -19424,9 +19445,9 @@ var inputType = { </form> </file> <file name="protractor.js" type="protractor"> - var text = element(by.binding('text')); + var text = element(by.binding('email.text')); var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('text')); + var input = element(by.model('email.text')); it('should initialize to model', function() { expect(text.getText()).toContain('me@example.com'); @@ -19473,7 +19494,9 @@ var inputType = { <script> angular.module('radioExample', []) .controller('ExampleController', ['$scope', function($scope) { - $scope.color = 'blue'; + $scope.color = { + name: 'blue' + }; $scope.specialValue = { "id": "12345", "value": "green" @@ -19481,20 +19504,20 @@ var inputType = { }]); </script> <form name="myForm" ng-controller="ExampleController"> - <input type="radio" ng-model="color" value="red"> Red <br/> - <input type="radio" ng-model="color" ng-value="specialValue"> Green <br/> - <input type="radio" ng-model="color" value="blue"> Blue <br/> - <tt>color = {{color | json}}</tt><br/> + <input type="radio" ng-model="color.name" value="red"> Red <br/> + <input type="radio" ng-model="color.name" ng-value="specialValue"> Green <br/> + <input type="radio" ng-model="color.name" value="blue"> Blue <br/> + <tt>color = {{color.name | json}}</tt><br/> </form> Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. </file> <file name="protractor.js" type="protractor"> it('should change state', function() { - var color = element(by.binding('color')); + var color = element(by.binding('color.name')); expect(color.getText()).toContain('blue'); - element.all(by.model('color')).get(0).click(); + element.all(by.model('color.name')).get(0).click(); expect(color.getText()).toContain('red'); }); @@ -19524,28 +19547,30 @@ var inputType = { <script> angular.module('checkboxExample', []) .controller('ExampleController', ['$scope', function($scope) { - $scope.value1 = true; - $scope.value2 = 'YES' + $scope.checkboxModel = { + value1 : true, + value2 : 'YES' + }; }]); </script> <form name="myForm" ng-controller="ExampleController"> - Value1: <input type="checkbox" ng-model="value1"> <br/> - Value2: <input type="checkbox" ng-model="value2" + Value1: <input type="checkbox" ng-model="checkboxModel.value1"> <br/> + Value2: <input type="checkbox" ng-model="checkboxModel.value2" ng-true-value="'YES'" ng-false-value="'NO'"> <br/> - <tt>value1 = {{value1}}</tt><br/> - <tt>value2 = {{value2}}</tt><br/> + <tt>value1 = {{checkboxModel.value1}}</tt><br/> + <tt>value2 = {{checkboxModel.value2}}</tt><br/> </form> </file> <file name="protractor.js" type="protractor"> it('should change state', function() { - var value1 = element(by.binding('value1')); - var value2 = element(by.binding('value2')); + var value1 = element(by.binding('checkboxModel.value1')); + var value2 = element(by.binding('checkboxModel.value2')); expect(value1.getText()).toContain('true'); expect(value2.getText()).toContain('YES'); - element(by.model('value1')).click(); - element(by.model('value2')).click(); + element(by.model('checkboxModel.value1')).click(); + element(by.model('checkboxModel.value2')).click(); expect(value1.getText()).toContain('false'); expect(value2.getText()).toContain('NO'); @@ -22254,7 +22279,7 @@ var ngIncludeFillContentDirective = ['$compile', * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make * sure you have parenthesis for correct precedence: * <pre class="prettyprint"> - * <div ng-init="test1 = (data | orderBy:'name')"></div> + * `<div ng-init="test1 = (data | orderBy:'name')"></div>` * </pre> * </div> * |