Skip to content

Commit 267b53c

Browse files
author
Hirav Gandhi
committed
Bump version to 1.3.14 (closes #81)
1 parent 845acc9 commit 267b53c

25 files changed

+1026
-624
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.10"
4-
UNSTABLE_VERSION = "1.3.10"
3+
VERSION = "1.3.14"
4+
UNSTABLE_VERSION = "1.3.14"
55
end
66
end

vendor/assets/javascripts/angular-animate.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -1333,8 +1333,7 @@ angular.module('ngAnimate', ['ng'])
13331333
} else if (lastAnimation.event == 'setClass') {
13341334
animationsToCancel.push(lastAnimation);
13351335
cleanup(element, className);
1336-
}
1337-
else if (runningAnimations[className]) {
1336+
} else if (runningAnimations[className]) {
13381337
var current = runningAnimations[className];
13391338
if (current.event == animationEvent) {
13401339
skipAnimation = true;

vendor/assets/javascripts/angular-aria.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -105,7 +105,8 @@ function $AriaProvider() {
105105
* - **ariaMultiline** – `{boolean}` – Enables/disables aria-multiline tags
106106
* - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and aria-valuenow tags
107107
* - **tabindex** – `{boolean}` – Enables/disables tabindex tags
108-
* - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on ng-click
108+
* - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on `<div>` and
109+
* `<li>` elements with ng-click
109110
*
110111
* @description
111112
* Enables/disables various ARIA attributes
@@ -133,6 +134,7 @@ function $AriaProvider() {
133134
* @name $aria
134135
*
135136
* @description
137+
* @priority 200
136138
*
137139
* The $aria service contains helper methods for applying common
138140
* [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives.
@@ -209,6 +211,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
209211
return {
210212
restrict: 'A',
211213
require: '?ngModel',
214+
priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value
212215
link: function(scope, elem, attr, ngModel) {
213216
var shape = getShape(attr, elem);
214217
var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem);
@@ -221,19 +224,19 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
221224
if (needsTabIndex) {
222225
needsTabIndex = false;
223226
return function ngAriaRadioReaction(newVal) {
224-
var boolVal = newVal === attr.value;
227+
var boolVal = (attr.value == ngModel.$viewValue);
225228
elem.attr('aria-checked', boolVal);
226229
elem.attr('tabindex', 0 - !boolVal);
227230
};
228231
} else {
229232
return function ngAriaRadioReaction(newVal) {
230-
elem.attr('aria-checked', newVal === attr.value);
233+
elem.attr('aria-checked', (attr.value == ngModel.$viewValue));
231234
};
232235
}
233236
}
234237

235238
function ngAriaCheckboxReaction(newVal) {
236-
elem.attr('aria-checked', !!newVal);
239+
elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue));
237240
}
238241

239242
switch (shape) {
@@ -308,11 +311,18 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
308311
compile: function(elem, attr) {
309312
var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
310313
return function(scope, elem, attr) {
314+
315+
function isNodeOneOf(elem, nodeTypeArray) {
316+
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
317+
return true;
318+
}
319+
}
320+
311321
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
312322
elem.attr('tabindex', 0);
313323
}
314324

315-
if ($aria.config('bindKeypress') && !attr.ngKeypress) {
325+
if ($aria.config('bindKeypress') && !attr.ngKeypress && isNodeOneOf(elem, ['DIV', 'LI'])) {
316326
elem.on('keypress', function(event) {
317327
if (event.keyCode === 32 || event.keyCode === 13) {
318328
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.10
2+
* @license AngularJS v1.3.14
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.10
2+
* @license AngularJS v1.3.14
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.10/' +
58+
message = message + '\nhttp://errors.angularjs.org/1.3.14/' +
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

vendor/assets/javascripts/angular-mocks.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -2134,18 +2134,32 @@ angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
21342134
if (window.jasmine || window.mocha) {
21352135

21362136
var currentSpec = null,
2137+
annotatedFunctions = [],
21372138
isSpecRunning = function() {
21382139
return !!currentSpec;
21392140
};
21402141

2142+
angular.mock.$$annotate = angular.injector.$$annotate;
2143+
angular.injector.$$annotate = function(fn) {
2144+
if (typeof fn === 'function' && !fn.$inject) {
2145+
annotatedFunctions.push(fn);
2146+
}
2147+
return angular.mock.$$annotate.apply(this, arguments);
2148+
};
2149+
21412150

21422151
(window.beforeEach || window.setup)(function() {
2152+
annotatedFunctions = [];
21432153
currentSpec = this;
21442154
});
21452155

21462156
(window.afterEach || window.teardown)(function() {
21472157
var injector = currentSpec.$injector;
21482158

2159+
annotatedFunctions.forEach(function(fn) {
2160+
delete fn.$inject;
2161+
});
2162+
21492163
angular.forEach(currentSpec.$modules, function(module) {
21502164
if (module && module.$$hashKey) {
21512165
module.$$hashKey = undefined;

vendor/assets/javascripts/angular-resource.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -213,6 +213,7 @@ function shallowClearAndCopy(src, dst) {
213213
* - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
214214
* - non-GET instance actions: `instance.$action([parameters], [success], [error])`
215215
*
216+
*
216217
* Success callback is called with (value, responseHeaders) arguments. Error callback is called
217218
* with (httpResponse) argument.
218219
*

vendor/assets/javascripts/angular-route.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -482,21 +482,15 @@ function $RouteProvider() {
482482
* definitions will be interpolated into the location's path, while
483483
* remaining properties will be treated as query params.
484484
*
485-
* @param {Object} newParams mapping of URL parameter names to values
485+
* @param {!Object<string, string>} newParams mapping of URL parameter names to values
486486
*/
487487
updateParams: function(newParams) {
488488
if (this.current && this.current.$$route) {
489-
var searchParams = {}, self=this;
490-
491-
angular.forEach(Object.keys(newParams), function(key) {
492-
if (!self.current.pathParams[key]) searchParams[key] = newParams[key];
493-
});
494-
495489
newParams = angular.extend({}, this.current.params, newParams);
496490
$location.path(interpolate(this.current.$$route.originalPath, newParams));
497-
$location.search(angular.extend({}, $location.search(), searchParams));
498-
}
499-
else {
491+
// interpolate modifies newParams, only query params are left
492+
$location.search(newParams);
493+
} else {
500494
throw $routeMinErr('norout', 'Tried updating route when with no current route');
501495
}
502496
}

vendor/assets/javascripts/angular-sanitize.js

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.10
2+
* @license AngularJS v1.3.14
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -276,14 +276,14 @@ function htmlParser(html, handler) {
276276
}
277277
}
278278
var index, chars, match, stack = [], last = html, text;
279-
stack.last = function() { return stack[ stack.length - 1 ]; };
279+
stack.last = function() { return stack[stack.length - 1]; };
280280

281281
while (html) {
282282
text = '';
283283
chars = true;
284284

285285
// Make sure we're not in a script or style element
286-
if (!stack.last() || !specialElements[ stack.last() ]) {
286+
if (!stack.last() || !specialElements[stack.last()]) {
287287

288288
// Comment
289289
if (html.indexOf("<!--") === 0) {
@@ -341,7 +341,8 @@ function htmlParser(html, handler) {
341341
}
342342

343343
} else {
344-
html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'),
344+
// IE versions 9 and 10 do not understand the regex '[^]', so using a workaround with [\W\w].
345+
html = html.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'),
345346
function(all, text) {
346347
text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1");
347348

@@ -365,17 +366,17 @@ function htmlParser(html, handler) {
365366

366367
function parseStartTag(tag, tagName, rest, unary) {
367368
tagName = angular.lowercase(tagName);
368-
if (blockElements[ tagName ]) {
369-
while (stack.last() && inlineElements[ stack.last() ]) {
369+
if (blockElements[tagName]) {
370+
while (stack.last() && inlineElements[stack.last()]) {
370371
parseEndTag("", stack.last());
371372
}
372373
}
373374

374-
if (optionalEndTagElements[ tagName ] && stack.last() == tagName) {
375+
if (optionalEndTagElements[tagName] && stack.last() == tagName) {
375376
parseEndTag("", tagName);
376377
}
377378

378-
unary = voidElements[ tagName ] || !!unary;
379+
unary = voidElements[tagName] || !!unary;
379380

380381
if (!unary)
381382
stack.push(tagName);
@@ -400,13 +401,13 @@ function htmlParser(html, handler) {
400401
if (tagName)
401402
// Find the closest opened tag of the same type
402403
for (pos = stack.length - 1; pos >= 0; pos--)
403-
if (stack[ pos ] == tagName)
404+
if (stack[pos] == tagName)
404405
break;
405406

406407
if (pos >= 0) {
407408
// Close all the open elements, up the stack
408409
for (i = stack.length - 1; i >= pos; i--)
409-
if (handler.end) handler.end(stack[ i ]);
410+
if (handler.end) handler.end(stack[i]);
410411

411412
// Remove the open elements from the stack
412413
stack.length = pos;
@@ -415,7 +416,6 @@ function htmlParser(html, handler) {
415416
}
416417

417418
var hiddenPre=document.createElement("pre");
418-
var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/;
419419
/**
420420
* decodes all entities into regular string
421421
* @param value
@@ -424,22 +424,10 @@ var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/;
424424
function decodeEntities(value) {
425425
if (!value) { return ''; }
426426

427-
// Note: IE8 does not preserve spaces at the start/end of innerHTML
428-
// so we must capture them and reattach them afterward
429-
var parts = spaceRe.exec(value);
430-
var spaceBefore = parts[1];
431-
var spaceAfter = parts[3];
432-
var content = parts[2];
433-
if (content) {
434-
hiddenPre.innerHTML=content.replace(/</g,"&lt;");
435-
// innerText depends on styling as it doesn't display hidden elements.
436-
// Therefore, it's better to use textContent not to cause unnecessary
437-
// reflows. However, IE<9 don't support textContent so the innerText
438-
// fallback is necessary.
439-
content = 'textContent' in hiddenPre ?
440-
hiddenPre.textContent : hiddenPre.innerText;
441-
}
442-
return spaceBefore + content + spaceAfter;
427+
hiddenPre.innerHTML = value.replace(/</g,"&lt;");
428+
// innerText depends on styling as it doesn't display hidden elements.
429+
// Therefore, it's better to use textContent not to cause unnecessary reflows.
430+
return hiddenPre.textContent;
443431
}
444432

445433
/**

0 commit comments

Comments
 (0)