Skip to content

Commit 230fa13

Browse files
committed
Bump version to 1.4.7
1 parent 72180ac commit 230fa13

15 files changed

+15016
-14956
lines changed

lib/angularjs-rails/version.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module AngularJS
22
module Rails
3-
VERSION = "1.4.4"
4-
UNSTABLE_VERSION = "2.0.0-alpha.34"
3+
VERSION = "1.4.7"
4+
UNSTABLE_VERSION = "2.0.0-alpha.37"
55
end
66
end

vendor/assets/javascripts/angular-animate.js

+266-123
Large diffs are not rendered by default.

vendor/assets/javascripts/angular-aria.js

+40-36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.4.4
2+
* @license AngularJS v1.4.7
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -57,6 +57,16 @@
5757
var ngAriaModule = angular.module('ngAria', ['ng']).
5858
provider('$aria', $AriaProvider);
5959

60+
/**
61+
* Internal Utilities
62+
*/
63+
var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY'];
64+
65+
var isNodeOneOf = function(elem, nodeTypeArray) {
66+
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
67+
return true;
68+
}
69+
};
6070
/**
6171
* @ngdoc provider
6272
* @name $ariaProvider
@@ -118,10 +128,10 @@ function $AriaProvider() {
118128
config = angular.extend(config, newConfig);
119129
};
120130

121-
function watchExpr(attrName, ariaAttr, negate) {
131+
function watchExpr(attrName, ariaAttr, nodeBlackList, negate) {
122132
return function(scope, elem, attr) {
123133
var ariaCamelName = attr.$normalize(ariaAttr);
124-
if (config[ariaCamelName] && !attr[ariaCamelName]) {
134+
if (config[ariaCamelName] && !isNodeOneOf(elem, nodeBlackList) && !attr[ariaCamelName]) {
125135
scope.$watch(attr[attrName], function(boolVal) {
126136
// ensure boolean value
127137
boolVal = negate ? !boolVal : !!boolVal;
@@ -130,7 +140,6 @@ function $AriaProvider() {
130140
}
131141
};
132142
}
133-
134143
/**
135144
* @ngdoc service
136145
* @name $aria
@@ -189,10 +198,10 @@ function $AriaProvider() {
189198

190199

191200
ngAriaModule.directive('ngShow', ['$aria', function($aria) {
192-
return $aria.$$watchExpr('ngShow', 'aria-hidden', true);
201+
return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true);
193202
}])
194203
.directive('ngHide', ['$aria', function($aria) {
195-
return $aria.$$watchExpr('ngHide', 'aria-hidden', false);
204+
return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false);
196205
}])
197206
.directive('ngModel', ['$aria', function($aria) {
198207

@@ -266,6 +275,9 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
266275
scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
267276
getRadioReaction() : ngAriaCheckboxReaction);
268277
}
278+
if (needsTabIndex) {
279+
elem.attr('tabindex', 0);
280+
}
269281
break;
270282
case 'range':
271283
if (shouldAttachRole(shape, elem)) {
@@ -294,6 +306,9 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
294306
});
295307
}
296308
}
309+
if (needsTabIndex) {
310+
elem.attr('tabindex', 0);
311+
}
297312
break;
298313
case 'multiline':
299314
if (shouldAttachAttr('aria-multiline', 'ariaMultiline', elem)) {
@@ -302,10 +317,6 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
302317
break;
303318
}
304319

305-
if (needsTabIndex) {
306-
elem.attr('tabindex', 0);
307-
}
308-
309320
if (ngModel.$validators.required && shouldAttachAttr('aria-required', 'ariaRequired', elem)) {
310321
scope.$watch(function ngAriaRequiredWatch() {
311322
return ngModel.$error.required;
@@ -327,7 +338,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
327338
};
328339
}])
329340
.directive('ngDisabled', ['$aria', function($aria) {
330-
return $aria.$$watchExpr('ngDisabled', 'aria-disabled');
341+
return $aria.$$watchExpr('ngDisabled', 'aria-disabled', []);
331342
}])
332343
.directive('ngMessages', function() {
333344
return {
@@ -347,43 +358,36 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
347358
var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
348359
return function(scope, elem, attr) {
349360

350-
var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA'];
361+
if (!isNodeOneOf(elem, nodeBlackList)) {
351362

352-
function isNodeOneOf(elem, nodeTypeArray) {
353-
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
354-
return true;
363+
if ($aria.config('bindRoleForClick') && !elem.attr('role')) {
364+
elem.attr('role', 'button');
355365
}
356-
}
357366

358-
if ($aria.config('bindRoleForClick')
359-
&& !elem.attr('role')
360-
&& !isNodeOneOf(elem, nodeBlackList)) {
361-
elem.attr('role', 'button');
362-
}
363-
364-
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
365-
elem.attr('tabindex', 0);
366-
}
367+
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
368+
elem.attr('tabindex', 0);
369+
}
367370

368-
if ($aria.config('bindKeypress') && !attr.ngKeypress && !isNodeOneOf(elem, nodeBlackList)) {
369-
elem.on('keypress', function(event) {
370-
var keyCode = event.which || event.keyCode;
371-
if (keyCode === 32 || keyCode === 13) {
372-
scope.$apply(callback);
373-
}
371+
if ($aria.config('bindKeypress') && !attr.ngKeypress) {
372+
elem.on('keypress', function(event) {
373+
var keyCode = event.which || event.keyCode;
374+
if (keyCode === 32 || keyCode === 13) {
375+
scope.$apply(callback);
376+
}
374377

375-
function callback() {
376-
fn(scope, { $event: event });
377-
}
378-
});
378+
function callback() {
379+
fn(scope, { $event: event });
380+
}
381+
});
382+
}
379383
}
380384
};
381385
}
382386
};
383387
}])
384388
.directive('ngDblclick', ['$aria', function($aria) {
385389
return function(scope, elem, attr) {
386-
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
390+
if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nodeBlackList)) {
387391
elem.attr('tabindex', 0);
388392
}
389393
};

vendor/assets/javascripts/angular-cookies.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.4.4
2+
* @license AngularJS v1.4.7
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -278,7 +278,7 @@ function $$CookieWriter($document, $log, $browser) {
278278
options = options || {};
279279
expires = options.expires;
280280
path = angular.isDefined(options.path) ? options.path : cookiePath;
281-
if (value === undefined) {
281+
if (angular.isUndefined(value)) {
282282
expires = 'Thu, 01 Jan 1970 00:00:00 GMT';
283283
value = '';
284284
}

vendor/assets/javascripts/angular-loader.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.4.4
2+
* @license AngularJS v1.4.7
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -59,7 +59,7 @@ function minErr(module, ErrorConstructor) {
5959
return match;
6060
});
6161

62-
message += '\nhttp://errors.angularjs.org/1.4.4/' +
62+
message += '\nhttp://errors.angularjs.org/1.4.7/' +
6363
(module ? module + '/' : '') + code;
6464

6565
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {

vendor/assets/javascripts/angular-message-format.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.4.4
2+
* @license AngularJS v1.4.7
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

vendor/assets/javascripts/angular-messages.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.4.4
2+
* @license AngularJS v1.4.7
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -330,6 +330,9 @@ angular.module('ngMessages', [])
330330
controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
331331
var ctrl = this;
332332
var latestKey = 0;
333+
var nextAttachId = 0;
334+
335+
this.getAttachId = function getAttachId() { return nextAttachId++; };
333336

334337
var messages = this.messages = {};
335338
var renderLater, cachedCollection;
@@ -641,11 +644,15 @@ function ngMessageDirectiveFactory(restrict) {
641644
$animate.enter(elm, null, element);
642645
currentElement = elm;
643646

647+
// Each time we attach this node to a message we get a new id that we can match
648+
// when we are destroying the node later.
649+
var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId();
650+
644651
// in the event that the parent element is destroyed
645652
// by any other structural directive then it's time
646653
// to deregister the message from the controller
647654
currentElement.on('$destroy', function() {
648-
if (currentElement) {
655+
if (currentElement && currentElement.$$attachId === $$attachId) {
649656
ngMessagesCtrl.deregister(commentNode);
650657
messageCtrl.detach();
651658
}

0 commit comments

Comments
 (0)