rails-angularjs 1.3.12 → 1.3.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/rails-angularjs/version.rb +2 -2
- data/vendor/assets/javascripts/{angularjs/angular-animate.js → angular-animate.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-animate.min.js → angular-animate.min.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-aria.js → angular-aria.js} +16 -6
- data/vendor/assets/javascripts/angular-aria.min.js +12 -0
- data/vendor/assets/javascripts/{angularjs/angular-cookies.js → angular-cookies.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-cookies.min.js → angular-cookies.min.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-loader.js → angular-loader.js} +2 -2
- data/vendor/assets/javascripts/{angularjs/angular-loader.min.js → angular-loader.min.js} +2 -2
- data/vendor/assets/javascripts/{angularjs/angular-messages.js → angular-messages.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-messages.min.js → angular-messages.min.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-mocks.js → angular-mocks.js} +2 -2
- data/vendor/assets/javascripts/{angularjs/angular-resource.js → angular-resource.js} +2 -1
- data/vendor/assets/javascripts/{angularjs/angular-resource.min.js → angular-resource.min.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-route.js → angular-route.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-route.min.js → angular-route.min.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-sanitize.js → angular-sanitize.js} +7 -19
- data/vendor/assets/javascripts/angular-sanitize.min.js +16 -0
- data/vendor/assets/javascripts/{angularjs/angular-scenario.js → angular-scenario.js} +89 -38
- data/vendor/assets/javascripts/{angularjs/angular-touch.js → angular-touch.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular-touch.min.js → angular-touch.min.js} +1 -1
- data/vendor/assets/javascripts/{angularjs/angular.js → angular.js} +89 -38
- data/vendor/assets/javascripts/angular.min.js +250 -0
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-animate.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-animate.min.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-aria.js +16 -6
- data/vendor/assets/javascripts/unstable/angular-aria.min.js +12 -0
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-cookies.min.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-loader.js +2 -2
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-loader.min.js +2 -2
- data/vendor/assets/javascripts/unstable/angular-messages.js +644 -0
- data/vendor/assets/javascripts/unstable/angular-messages.min.js +12 -0
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-mocks.js +2 -2
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-resource.js +3 -2
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-resource.min.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-route.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-route.min.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-sanitize.js +12 -22
- data/vendor/assets/javascripts/unstable/angular-sanitize.min.js +16 -0
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-scenario.js +317 -155
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-touch.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular-touch.min.js +1 -1
- data/vendor/assets/javascripts/{angularjs/unstable → unstable}/angular.js +317 -155
- data/vendor/assets/javascripts/unstable/angular.min.js +282 -0
- metadata +46 -46
- data/vendor/assets/javascripts/angularjs/angular-aria.min.js +0 -12
- data/vendor/assets/javascripts/angularjs/angular-sanitize.min.js +0 -16
- data/vendor/assets/javascripts/angularjs/angular.min.js +0 -250
- data/vendor/assets/javascripts/angularjs/unstable/angular-aria.min.js +0 -12
- data/vendor/assets/javascripts/angularjs/unstable/angular-messages.js +0 -400
- data/vendor/assets/javascripts/angularjs/unstable/angular-messages.min.js +0 -10
- data/vendor/assets/javascripts/angularjs/unstable/angular-sanitize.min.js +0 -16
- data/vendor/assets/javascripts/angularjs/unstable/angular.min.js +0 -281
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.14
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
|
|
54
54
|
return match;
|
55
55
|
});
|
56
56
|
|
57
|
-
message = message + '\nhttp://errors.angularjs.org/1.3.
|
57
|
+
message = message + '\nhttp://errors.angularjs.org/1.3.14/' +
|
58
58
|
(module ? module + '/' : '') + code;
|
59
59
|
for (i = 2; i < arguments.length; i++) {
|
60
60
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
|
@@ -2121,11 +2121,11 @@ function toDebugString(obj) {
|
|
2121
2121
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
2122
2122
|
*/
|
2123
2123
|
var version = {
|
2124
|
-
full: '1.3.
|
2124
|
+
full: '1.3.14', // all of these placeholder strings will be replaced by grunt's
|
2125
2125
|
major: 1, // package task
|
2126
2126
|
minor: 3,
|
2127
|
-
dot:
|
2128
|
-
codeName: '
|
2127
|
+
dot: 14,
|
2128
|
+
codeName: 'instantaneous-browserification'
|
2129
2129
|
};
|
2130
2130
|
|
2131
2131
|
|
@@ -11371,7 +11371,7 @@ function $LocationProvider() {
|
|
11371
11371
|
|
11372
11372
|
|
11373
11373
|
// rewrite hashbang url <> html5 url
|
11374
|
-
if ($location.absUrl() != initialUrl) {
|
11374
|
+
if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {
|
11375
11375
|
$browser.url($location.absUrl(), true);
|
11376
11376
|
}
|
11377
11377
|
|
@@ -17854,20 +17854,23 @@ var htmlAnchorDirective = valueFn({
|
|
17854
17854
|
*
|
17855
17855
|
* @description
|
17856
17856
|
*
|
17857
|
-
*
|
17857
|
+
* This directive sets the `disabled` attribute on the element if the
|
17858
|
+
* {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.
|
17859
|
+
*
|
17860
|
+
* A special directive is necessary because we cannot use interpolation inside the `disabled`
|
17861
|
+
* attribute. The following example would make the button enabled on Chrome/Firefox
|
17862
|
+
* but not on older IEs:
|
17863
|
+
*
|
17858
17864
|
* ```html
|
17859
|
-
* <div ng-init="
|
17860
|
-
* <button disabled="{{
|
17865
|
+
* <div ng-init="isDisabled = false">
|
17866
|
+
* <button disabled="{{isDisabled}}">Disabled</button>
|
17861
17867
|
* </div>
|
17862
17868
|
* ```
|
17863
17869
|
*
|
17864
|
-
*
|
17865
|
-
* such as disabled
|
17870
|
+
* This is because the HTML specification does not require browsers to preserve the values of
|
17871
|
+
* boolean attributes such as `disabled` (Their presence means true and their absence means false.)
|
17866
17872
|
* If we put an Angular interpolation expression into such an attribute then the
|
17867
17873
|
* binding information would be lost when the browser removes the attribute.
|
17868
|
-
* The `ngDisabled` directive solves this problem for the `disabled` attribute.
|
17869
|
-
* This complementary directive is not removed by the browser and so provides
|
17870
|
-
* a permanent reliable place to store the binding information.
|
17871
17874
|
*
|
17872
17875
|
* @example
|
17873
17876
|
<example>
|
@@ -17886,7 +17889,7 @@ var htmlAnchorDirective = valueFn({
|
|
17886
17889
|
*
|
17887
17890
|
* @element INPUT
|
17888
17891
|
* @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
|
17889
|
-
* then
|
17892
|
+
* then the `disabled` attribute will be set on the element
|
17890
17893
|
*/
|
17891
17894
|
|
17892
17895
|
|
@@ -19888,7 +19891,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
|
19888
19891
|
return value;
|
19889
19892
|
});
|
19890
19893
|
|
19891
|
-
if (attr.min || attr.ngMin) {
|
19894
|
+
if (isDefined(attr.min) || attr.ngMin) {
|
19892
19895
|
var minVal;
|
19893
19896
|
ctrl.$validators.min = function(value) {
|
19894
19897
|
return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;
|
@@ -19904,7 +19907,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
|
19904
19907
|
});
|
19905
19908
|
}
|
19906
19909
|
|
19907
|
-
if (attr.max || attr.ngMax) {
|
19910
|
+
if (isDefined(attr.max) || attr.ngMax) {
|
19908
19911
|
var maxVal;
|
19909
19912
|
ctrl.$validators.max = function(value) {
|
19910
19913
|
return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;
|
@@ -22710,6 +22713,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
22710
22713
|
ngModelGet = parsedNgModel,
|
22711
22714
|
ngModelSet = parsedNgModelAssign,
|
22712
22715
|
pendingDebounce = null,
|
22716
|
+
parserValid,
|
22713
22717
|
ctrl = this;
|
22714
22718
|
|
22715
22719
|
this.$$setOptions = function(options) {
|
@@ -22982,16 +22986,12 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
22982
22986
|
// the model although neither viewValue nor the model on the scope changed
|
22983
22987
|
var modelValue = ctrl.$$rawModelValue;
|
22984
22988
|
|
22985
|
-
// Check if the there's a parse error, so we don't unset it accidentially
|
22986
|
-
var parserName = ctrl.$$parserName || 'parse';
|
22987
|
-
var parserValid = ctrl.$error[parserName] ? false : undefined;
|
22988
|
-
|
22989
22989
|
var prevValid = ctrl.$valid;
|
22990
22990
|
var prevModelValue = ctrl.$modelValue;
|
22991
22991
|
|
22992
22992
|
var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
|
22993
22993
|
|
22994
|
-
ctrl.$$runValidators(
|
22994
|
+
ctrl.$$runValidators(modelValue, viewValue, function(allValid) {
|
22995
22995
|
// If there was no change in validity, don't update the model
|
22996
22996
|
// This prevents changing an invalid modelValue to undefined
|
22997
22997
|
if (!allowInvalid && prevValid !== allValid) {
|
@@ -23009,12 +23009,12 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23009
23009
|
|
23010
23010
|
};
|
23011
23011
|
|
23012
|
-
this.$$runValidators = function(
|
23012
|
+
this.$$runValidators = function(modelValue, viewValue, doneCallback) {
|
23013
23013
|
currentValidationRunId++;
|
23014
23014
|
var localValidationRunId = currentValidationRunId;
|
23015
23015
|
|
23016
23016
|
// check parser error
|
23017
|
-
if (!processParseErrors(
|
23017
|
+
if (!processParseErrors()) {
|
23018
23018
|
validationDone(false);
|
23019
23019
|
return;
|
23020
23020
|
}
|
@@ -23024,21 +23024,22 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23024
23024
|
}
|
23025
23025
|
processAsyncValidators();
|
23026
23026
|
|
23027
|
-
function processParseErrors(
|
23027
|
+
function processParseErrors() {
|
23028
23028
|
var errorKey = ctrl.$$parserName || 'parse';
|
23029
|
-
if (
|
23029
|
+
if (parserValid === undefined) {
|
23030
23030
|
setValidity(errorKey, null);
|
23031
23031
|
} else {
|
23032
|
-
|
23033
|
-
if (!parseValid) {
|
23032
|
+
if (!parserValid) {
|
23034
23033
|
forEach(ctrl.$validators, function(v, name) {
|
23035
23034
|
setValidity(name, null);
|
23036
23035
|
});
|
23037
23036
|
forEach(ctrl.$asyncValidators, function(v, name) {
|
23038
23037
|
setValidity(name, null);
|
23039
23038
|
});
|
23040
|
-
return false;
|
23041
23039
|
}
|
23040
|
+
// Set the parse error last, to prevent unsetting it, should a $validators key == parserName
|
23041
|
+
setValidity(errorKey, parserValid);
|
23042
|
+
return parserValid;
|
23042
23043
|
}
|
23043
23044
|
return true;
|
23044
23045
|
}
|
@@ -23133,7 +23134,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23133
23134
|
this.$$parseAndValidate = function() {
|
23134
23135
|
var viewValue = ctrl.$$lastCommittedViewValue;
|
23135
23136
|
var modelValue = viewValue;
|
23136
|
-
|
23137
|
+
parserValid = isUndefined(modelValue) ? undefined : true;
|
23137
23138
|
|
23138
23139
|
if (parserValid) {
|
23139
23140
|
for (var i = 0; i < ctrl.$parsers.length; i++) {
|
@@ -23159,7 +23160,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23159
23160
|
|
23160
23161
|
// Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.
|
23161
23162
|
// This can happen if e.g. $setViewValue is called from inside a parser
|
23162
|
-
ctrl.$$runValidators(
|
23163
|
+
ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {
|
23163
23164
|
if (!allowInvalid) {
|
23164
23165
|
// Note: Don't check ctrl.$valid here, as we could have
|
23165
23166
|
// external validators (e.g. calculated on the server),
|
@@ -23280,6 +23281,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23280
23281
|
// TODO(perf): why not move this to the action fn?
|
23281
23282
|
if (modelValue !== ctrl.$modelValue) {
|
23282
23283
|
ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;
|
23284
|
+
parserValid = undefined;
|
23283
23285
|
|
23284
23286
|
var formatters = ctrl.$formatters,
|
23285
23287
|
idx = formatters.length;
|
@@ -23292,7 +23294,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23292
23294
|
ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;
|
23293
23295
|
ctrl.$render();
|
23294
23296
|
|
23295
|
-
ctrl.$$runValidators(
|
23297
|
+
ctrl.$$runValidators(modelValue, viewValue, noop);
|
23296
23298
|
}
|
23297
23299
|
}
|
23298
23300
|
|
@@ -24108,6 +24110,55 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp
|
|
24108
24110
|
* when keys are deleted and reinstated.
|
24109
24111
|
*
|
24110
24112
|
*
|
24113
|
+
* # Tracking and Duplicates
|
24114
|
+
*
|
24115
|
+
* When the contents of the collection change, `ngRepeat` makes the corresponding changes to the DOM:
|
24116
|
+
*
|
24117
|
+
* * When an item is added, a new instance of the template is added to the DOM.
|
24118
|
+
* * When an item is removed, its template instance is removed from the DOM.
|
24119
|
+
* * When items are reordered, their respective templates are reordered in the DOM.
|
24120
|
+
*
|
24121
|
+
* By default, `ngRepeat` does not allow duplicate items in arrays. This is because when
|
24122
|
+
* there are duplicates, it is not possible to maintain a one-to-one mapping between collection
|
24123
|
+
* items and DOM elements.
|
24124
|
+
*
|
24125
|
+
* If you do need to repeat duplicate items, you can substitute the default tracking behavior
|
24126
|
+
* with your own using the `track by` expression.
|
24127
|
+
*
|
24128
|
+
* For example, you may track items by the index of each item in the collection, using the
|
24129
|
+
* special scope property `$index`:
|
24130
|
+
* ```html
|
24131
|
+
* <div ng-repeat="n in [42, 42, 43, 43] track by $index">
|
24132
|
+
* {{n}}
|
24133
|
+
* </div>
|
24134
|
+
* ```
|
24135
|
+
*
|
24136
|
+
* You may use arbitrary expressions in `track by`, including references to custom functions
|
24137
|
+
* on the scope:
|
24138
|
+
* ```html
|
24139
|
+
* <div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
|
24140
|
+
* {{n}}
|
24141
|
+
* </div>
|
24142
|
+
* ```
|
24143
|
+
*
|
24144
|
+
* If you are working with objects that have an identifier property, you can track
|
24145
|
+
* by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`
|
24146
|
+
* will not have to rebuild the DOM elements for items it has already rendered, even if the
|
24147
|
+
* JavaScript objects in the collection have been substituted for new ones:
|
24148
|
+
* ```html
|
24149
|
+
* <div ng-repeat="model in collection track by model.id">
|
24150
|
+
* {{model.name}}
|
24151
|
+
* </div>
|
24152
|
+
* ```
|
24153
|
+
*
|
24154
|
+
* When no `track by` expression is provided, it is equivalent to tracking by the built-in
|
24155
|
+
* `$id` function, which tracks items by their identity:
|
24156
|
+
* ```html
|
24157
|
+
* <div ng-repeat="obj in collection track by $id(obj)">
|
24158
|
+
* {{obj.prop}}
|
24159
|
+
* </div>
|
24160
|
+
* ```
|
24161
|
+
*
|
24111
24162
|
* # Special repeat start and end points
|
24112
24163
|
* To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
|
24113
24164
|
* the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
|
@@ -24175,12 +24226,12 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp
|
|
24175
24226
|
*
|
24176
24227
|
* For example: `(name, age) in {'adam':10, 'amalie':12}`.
|
24177
24228
|
*
|
24178
|
-
* * `variable in expression track by tracking_expression` – You can also provide an optional tracking
|
24179
|
-
* which can be used to associate the objects in the collection with the DOM elements. If no tracking
|
24180
|
-
* is specified
|
24181
|
-
* more than one tracking
|
24182
|
-
* mapped to the same DOM element, which is not possible.)
|
24183
|
-
* before
|
24229
|
+
* * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression
|
24230
|
+
* which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
|
24231
|
+
* is specified, ng-repeat associates elements by identity. It is an error to have
|
24232
|
+
* more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are
|
24233
|
+
* mapped to the same DOM element, which is not possible.) If filters are used in the expression, they should be
|
24234
|
+
* applied before the tracking expression.
|
24184
24235
|
*
|
24185
24236
|
* For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
|
24186
24237
|
* will be associated by item identity in the array.
|