Skip to content

Commit 21e902a

Browse files
author
Hirav Gandhi
committed
Bump version to 1.3.15
1 parent 267b53c commit 21e902a

25 files changed

+940
-230
lines changed

lib/angularjs-rails/version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module AngularJS
22
module Rails
3-
VERSION = "1.3.14"
4-
UNSTABLE_VERSION = "1.3.14"
3+
VERSION = "1.3.15"
4+
UNSTABLE_VERSION = "1.3.15"
55
end
66
end

vendor/assets/javascripts/angular-animate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

vendor/assets/javascripts/angular-aria.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -27,13 +27,13 @@
2727
*
2828
* | Directive | Supported Attributes |
2929
* |---------------------------------------------|----------------------------------------------------------------------------------------|
30-
* | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required |
3130
* | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
3231
* | {@link ng.directive:ngShow ngShow} | aria-hidden |
3332
* | {@link ng.directive:ngHide ngHide} | aria-hidden |
34-
* | {@link ng.directive:ngClick ngClick} | tabindex, keypress event |
3533
* | {@link ng.directive:ngDblclick ngDblclick} | tabindex |
3634
* | {@link module:ngMessages ngMessages} | aria-live |
35+
* | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
36+
* | {@link ng.directive:ngClick ngClick} | tabindex, keypress event, button role |
3737
*
3838
* Find out more information about each directive by reading the
3939
* {@link guide/accessibility ngAria Developer Guide}.
@@ -198,6 +198,10 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
198198
return $aria.config(normalizedAttr) && !elem.attr(attr);
199199
}
200200

201+
function shouldAttachRole(role, elem) {
202+
return !elem.attr('role') && (elem.attr('type') === role) && (elem[0].nodeName !== 'INPUT');
203+
}
204+
201205
function getShape(attr, elem) {
202206
var type = attr.type,
203207
role = attr.role;
@@ -242,12 +246,18 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
242246
switch (shape) {
243247
case 'radio':
244248
case 'checkbox':
249+
if (shouldAttachRole(shape, elem)) {
250+
elem.attr('role', shape);
251+
}
245252
if (shouldAttachAttr('aria-checked', 'ariaChecked', elem)) {
246253
scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
247254
getRadioReaction() : ngAriaCheckboxReaction);
248255
}
249256
break;
250257
case 'range':
258+
if (shouldAttachRole(shape, elem)) {
259+
elem.attr('role', 'slider');
260+
}
251261
if ($aria.config('ariaValue')) {
252262
if (attr.min && !elem.attr('aria-valuemin')) {
253263
elem.attr('aria-valuemin', attr.min);
@@ -312,17 +322,22 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
312322
var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
313323
return function(scope, elem, attr) {
314324

325+
var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA'];
326+
315327
function isNodeOneOf(elem, nodeTypeArray) {
316328
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
317329
return true;
318330
}
319331
}
332+
if (!elem.attr('role') && !isNodeOneOf(elem, nodeBlackList)) {
333+
elem.attr('role', 'button');
334+
}
320335

321336
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
322337
elem.attr('tabindex', 0);
323338
}
324339

325-
if ($aria.config('bindKeypress') && !attr.ngKeypress && isNodeOneOf(elem, ['DIV', 'LI'])) {
340+
if ($aria.config('bindKeypress') && !attr.ngKeypress && !isNodeOneOf(elem, nodeBlackList)) {
326341
elem.on('keypress', function(event) {
327342
if (event.keyCode === 32 || event.keyCode === 13) {
328343
scope.$apply(callback);

vendor/assets/javascripts/angular-cookies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

vendor/assets/javascripts/angular-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -55,7 +55,7 @@ function minErr(module, ErrorConstructor) {
5555
return match;
5656
});
5757

58-
message = message + '\nhttp://errors.angularjs.org/1.3.14/' +
58+
message = message + '\nhttp://errors.angularjs.org/1.3.15/' +
5959
(module ? module + '/' : '') + code;
6060
for (i = 2; i < arguments.length; i++) {
6161
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +

vendor/assets/javascripts/angular-messages.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -331,6 +331,9 @@ angular.module('ngMessages', [])
331331
* must be situated since it determines which messages are visible based on the state
332332
* of the provided key/value map that `ngMessages` listens on.
333333
*
334+
* More information about using `ngMessage` can be found in the
335+
* {@link module:ngMessages `ngMessages` module documentation}.
336+
*
334337
* @usage
335338
* ```html
336339
* <!-- using attribute directives -->
@@ -348,8 +351,6 @@ angular.module('ngMessages', [])
348351
* </ng-messages>
349352
* ```
350353
*
351-
* {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
352-
*
353354
* @param {string} ngMessage a string value corresponding to the message key.
354355
*/
355356
.directive('ngMessage', ['$animate', function($animate) {

vendor/assets/javascripts/angular-mocks.js

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -1809,6 +1809,77 @@ angular.mock.$RootElementProvider = function() {
18091809
};
18101810
};
18111811

1812+
/**
1813+
* @ngdoc service
1814+
* @name $controller
1815+
* @description
1816+
* A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
1817+
* controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
1818+
*
1819+
*
1820+
* ## Example
1821+
*
1822+
* ```js
1823+
*
1824+
* // Directive definition ...
1825+
*
1826+
* myMod.directive('myDirective', {
1827+
* controller: 'MyDirectiveController',
1828+
* bindToController: {
1829+
* name: '@'
1830+
* }
1831+
* });
1832+
*
1833+
*
1834+
* // Controller definition ...
1835+
*
1836+
* myMod.controller('MyDirectiveController', ['log', function($log) {
1837+
* $log.info(this.name);
1838+
* })];
1839+
*
1840+
*
1841+
* // In a test ...
1842+
*
1843+
* describe('myDirectiveController', function() {
1844+
* it('should write the bound name to the log', inject(function($controller, $log) {
1845+
* var ctrl = $controller('MyDirective', { /* no locals &#42;/ }, { name: 'Clark Kent' });
1846+
* expect(ctrl.name).toEqual('Clark Kent');
1847+
* expect($log.info.logs).toEqual(['Clark Kent']);
1848+
* });
1849+
* });
1850+
*
1851+
* ```
1852+
*
1853+
* @param {Function|string} constructor If called with a function then it's considered to be the
1854+
* controller constructor function. Otherwise it's considered to be a string which is used
1855+
* to retrieve the controller constructor using the following steps:
1856+
*
1857+
* * check if a controller with given name is registered via `$controllerProvider`
1858+
* * check if evaluating the string on the current scope returns a constructor
1859+
* * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
1860+
* `window` object (not recommended)
1861+
*
1862+
* The string can use the `controller as property` syntax, where the controller instance is published
1863+
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
1864+
* to work correctly.
1865+
*
1866+
* @param {Object} locals Injection locals for Controller.
1867+
* @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
1868+
* to simulate the `bindToController` feature and simplify certain kinds of tests.
1869+
* @return {Object} Instance of given controller.
1870+
*/
1871+
angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
1872+
return function(expression, locals, later, ident) {
1873+
if (later && typeof later === 'object') {
1874+
var create = $delegate(expression, locals, true, ident);
1875+
angular.extend(create.instance, later);
1876+
return create();
1877+
}
1878+
return $delegate(expression, locals, later, ident);
1879+
};
1880+
}];
1881+
1882+
18121883
/**
18131884
* @ngdoc module
18141885
* @name ngMock
@@ -1837,6 +1908,7 @@ angular.module('ngMock', ['ng']).provider({
18371908
$provide.decorator('$$rAF', angular.mock.$RAFDecorator);
18381909
$provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator);
18391910
$provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
1911+
$provide.decorator('$controller', angular.mock.$ControllerDecorator);
18401912
}]);
18411913

18421914
/**

vendor/assets/javascripts/angular-resource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

vendor/assets/javascripts/angular-route.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

vendor/assets/javascripts/angular-sanitize.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
/**
2-
* @license AngularJS v1.3.14
2+
* @license AngularJS v1.3.15
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
66
(function(window, angular, undefined) {'use strict';
77

8+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
9+
* Any commits to this file should be reviewed with security in mind. *
10+
* Changes to this file can potentially create security vulnerabilities. *
11+
* An approval from 2 Core members with history of modifying *
12+
* this file is required. *
13+
* *
14+
* Does the change somehow allow for arbitrary javascript to be executed? *
15+
* Or allows for someone to change the prototype of built-in objects? *
16+
* Or gives undesired access to variables likes document or window? *
17+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
18+
819
var $sanitizeMinErr = angular.$$minErr('$sanitize');
920

1021
/**

0 commit comments

Comments
 (0)