rails-angularjs 1.4.0.pre.rc.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rails-angularjs/version.rb +1 -1
- data/vendor/assets/javascripts/angular-animate.js +179 -42
- data/vendor/assets/javascripts/angular-animate.min.js +47 -45
- data/vendor/assets/javascripts/angular-animate.min.js.map +3 -3
- data/vendor/assets/javascripts/angular-aria.js +1 -1
- data/vendor/assets/javascripts/angular-aria.min.js +1 -1
- data/vendor/assets/javascripts/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/angular-cookies.min.js +1 -1
- data/vendor/assets/javascripts/angular-loader.js +2 -2
- data/vendor/assets/javascripts/angular-loader.min.js +3 -3
- data/vendor/assets/javascripts/angular-loader.min.js.map +1 -1
- data/vendor/assets/javascripts/angular-message-format.js +1 -1
- data/vendor/assets/javascripts/angular-message-format.min.js +1 -1
- data/vendor/assets/javascripts/angular-messages.js +1 -1
- data/vendor/assets/javascripts/angular-messages.min.js +1 -1
- data/vendor/assets/javascripts/angular-mocks.js +1 -1
- data/vendor/assets/javascripts/angular-resource.js +1 -1
- data/vendor/assets/javascripts/angular-resource.min.js +1 -1
- data/vendor/assets/javascripts/angular-route.js +1 -1
- data/vendor/assets/javascripts/angular-route.min.js +1 -1
- data/vendor/assets/javascripts/angular-sanitize.js +1 -1
- data/vendor/assets/javascripts/angular-sanitize.min.js +1 -1
- data/vendor/assets/javascripts/angular-scenario.js +125 -37
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular-touch.min.js +1 -1
- data/vendor/assets/javascripts/angular.js +125 -37
- data/vendor/assets/javascripts/angular.min.js +265 -265
- data/vendor/assets/javascripts/angular.min.js.map +2 -2
- metadata +4 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.4.0
|
2
|
+
* @license AngularJS v1.4.0
|
3
3
|
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -57,7 +57,7 @@ function minErr(module, ErrorConstructor) {
|
|
57
57
|
return match;
|
58
58
|
});
|
59
59
|
|
60
|
-
message += '\nhttp://errors.angularjs.org/1.4.0
|
60
|
+
message += '\nhttp://errors.angularjs.org/1.4.0/' +
|
61
61
|
(module ? module + '/' : '') + code;
|
62
62
|
|
63
63
|
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
|
@@ -2332,11 +2332,11 @@ function toDebugString(obj) {
|
|
2332
2332
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
2333
2333
|
*/
|
2334
2334
|
var version = {
|
2335
|
-
full: '1.4.0
|
2335
|
+
full: '1.4.0', // all of these placeholder strings will be replaced by grunt's
|
2336
2336
|
major: 1, // package task
|
2337
2337
|
minor: 4,
|
2338
2338
|
dot: 0,
|
2339
|
-
codeName: '
|
2339
|
+
codeName: 'jaracimrman-existence'
|
2340
2340
|
};
|
2341
2341
|
|
2342
2342
|
|
@@ -4761,6 +4761,19 @@ function splitClasses(classes) {
|
|
4761
4761
|
return obj;
|
4762
4762
|
}
|
4763
4763
|
|
4764
|
+
// if any other type of options value besides an Object value is
|
4765
|
+
// passed into the $animate.method() animation then this helper code
|
4766
|
+
// will be run which will ignore it. While this patch is not the
|
4767
|
+
// greatest solution to this, a lot of existing plugins depend on
|
4768
|
+
// $animate to either call the callback (< 1.2) or return a promise
|
4769
|
+
// that can be changed. This helper function ensures that the options
|
4770
|
+
// are wiped clean incase a callback function is provided.
|
4771
|
+
function prepareAnimateOptions(options) {
|
4772
|
+
return isObject(options)
|
4773
|
+
? options
|
4774
|
+
: {};
|
4775
|
+
}
|
4776
|
+
|
4764
4777
|
var $$CoreAnimateRunnerProvider = function() {
|
4765
4778
|
this.$get = ['$q', '$$rAF', function($q, $$rAF) {
|
4766
4779
|
function AnimateRunner() {}
|
@@ -5137,9 +5150,11 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5137
5150
|
* @return {Promise} the animation callback promise
|
5138
5151
|
*/
|
5139
5152
|
enter: function(element, parent, after, options) {
|
5153
|
+
parent = parent && jqLite(parent);
|
5154
|
+
after = after && jqLite(after);
|
5140
5155
|
parent = parent || after.parent();
|
5141
5156
|
domInsert(element, parent, after);
|
5142
|
-
return $$animateQueue.push(element, 'enter', options);
|
5157
|
+
return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));
|
5143
5158
|
},
|
5144
5159
|
|
5145
5160
|
/**
|
@@ -5161,9 +5176,11 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5161
5176
|
* @return {Promise} the animation callback promise
|
5162
5177
|
*/
|
5163
5178
|
move: function(element, parent, after, options) {
|
5179
|
+
parent = parent && jqLite(parent);
|
5180
|
+
after = after && jqLite(after);
|
5164
5181
|
parent = parent || after.parent();
|
5165
5182
|
domInsert(element, parent, after);
|
5166
|
-
return $$animateQueue.push(element, 'move', options);
|
5183
|
+
return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));
|
5167
5184
|
},
|
5168
5185
|
|
5169
5186
|
/**
|
@@ -5180,7 +5197,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5180
5197
|
* @return {Promise} the animation callback promise
|
5181
5198
|
*/
|
5182
5199
|
leave: function(element, options) {
|
5183
|
-
return $$animateQueue.push(element, 'leave', options, function() {
|
5200
|
+
return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {
|
5184
5201
|
element.remove();
|
5185
5202
|
});
|
5186
5203
|
},
|
@@ -5204,7 +5221,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5204
5221
|
* @return {Promise} the animation callback promise
|
5205
5222
|
*/
|
5206
5223
|
addClass: function(element, className, options) {
|
5207
|
-
options = options
|
5224
|
+
options = prepareAnimateOptions(options);
|
5208
5225
|
options.addClass = mergeClasses(options.addclass, className);
|
5209
5226
|
return $$animateQueue.push(element, 'addClass', options);
|
5210
5227
|
},
|
@@ -5228,7 +5245,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5228
5245
|
* @return {Promise} the animation callback promise
|
5229
5246
|
*/
|
5230
5247
|
removeClass: function(element, className, options) {
|
5231
|
-
options = options
|
5248
|
+
options = prepareAnimateOptions(options);
|
5232
5249
|
options.removeClass = mergeClasses(options.removeClass, className);
|
5233
5250
|
return $$animateQueue.push(element, 'removeClass', options);
|
5234
5251
|
},
|
@@ -5253,7 +5270,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5253
5270
|
* @return {Promise} the animation callback promise
|
5254
5271
|
*/
|
5255
5272
|
setClass: function(element, add, remove, options) {
|
5256
|
-
options = options
|
5273
|
+
options = prepareAnimateOptions(options);
|
5257
5274
|
options.addClass = mergeClasses(options.addClass, add);
|
5258
5275
|
options.removeClass = mergeClasses(options.removeClass, remove);
|
5259
5276
|
return $$animateQueue.push(element, 'setClass', options);
|
@@ -5281,7 +5298,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
5281
5298
|
* @return {Promise} the animation callback promise
|
5282
5299
|
*/
|
5283
5300
|
animate: function(element, from, to, className, options) {
|
5284
|
-
options = options
|
5301
|
+
options = prepareAnimateOptions(options);
|
5285
5302
|
options.from = options.from ? extend(options.from, from) : from;
|
5286
5303
|
options.to = options.to ? extend(options.to, to) : to;
|
5287
5304
|
|
@@ -10134,7 +10151,7 @@ function $HttpProvider() {
|
|
10134
10151
|
function createShortMethods(names) {
|
10135
10152
|
forEach(arguments, function(name) {
|
10136
10153
|
$http[name] = function(url, config) {
|
10137
|
-
return $http(extend(config || {}, {
|
10154
|
+
return $http(extend({}, config || {}, {
|
10138
10155
|
method: name,
|
10139
10156
|
url: url
|
10140
10157
|
}));
|
@@ -10146,7 +10163,7 @@ function $HttpProvider() {
|
|
10146
10163
|
function createShortMethodsWithData(name) {
|
10147
10164
|
forEach(arguments, function(name) {
|
10148
10165
|
$http[name] = function(url, data, config) {
|
10149
|
-
return $http(extend(config || {}, {
|
10166
|
+
return $http(extend({}, config || {}, {
|
10150
10167
|
method: name,
|
10151
10168
|
url: url,
|
10152
10169
|
data: data
|
@@ -18087,7 +18104,7 @@ function $FilterProvider($provide) {
|
|
18087
18104
|
*/
|
18088
18105
|
function filterFilter() {
|
18089
18106
|
return function(array, expression, comparator) {
|
18090
|
-
if (!
|
18107
|
+
if (!isArrayLike(array)) {
|
18091
18108
|
if (array == null) {
|
18092
18109
|
return array;
|
18093
18110
|
} else {
|
@@ -18117,7 +18134,7 @@ function filterFilter() {
|
|
18117
18134
|
return array;
|
18118
18135
|
}
|
18119
18136
|
|
18120
|
-
return
|
18137
|
+
return Array.prototype.filter.call(array, predicateFn);
|
18121
18138
|
};
|
18122
18139
|
}
|
18123
18140
|
|
@@ -20211,9 +20228,13 @@ var inputType = {
|
|
20211
20228
|
* as in the ngPattern directive.
|
20212
20229
|
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
|
20213
20230
|
* a RegExp found by evaluating the Angular expression given in the attribute value.
|
20214
|
-
* If the expression evaluates to a RegExp object then this is used directly.
|
20215
|
-
* If the expression
|
20216
|
-
* characters. For instance, `"abc"` will be converted to
|
20231
|
+
* If the expression evaluates to a RegExp object, then this is used directly.
|
20232
|
+
* If the expression evaluates to a string, then it will be converted to a RegExp
|
20233
|
+
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
|
20234
|
+
* `new RegExp('^abc$')`.<br />
|
20235
|
+
* **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
|
20236
|
+
* start at the index of the last search's match, thus not taking the whole input value into
|
20237
|
+
* account.
|
20217
20238
|
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
20218
20239
|
* interaction with the input element.
|
20219
20240
|
* @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
|
@@ -20791,9 +20812,13 @@ var inputType = {
|
|
20791
20812
|
* as in the ngPattern directive.
|
20792
20813
|
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
|
20793
20814
|
* a RegExp found by evaluating the Angular expression given in the attribute value.
|
20794
|
-
* If the expression evaluates to a RegExp object then this is used directly.
|
20795
|
-
* If the expression
|
20796
|
-
* characters. For instance, `"abc"` will be converted to
|
20815
|
+
* If the expression evaluates to a RegExp object, then this is used directly.
|
20816
|
+
* If the expression evaluates to a string, then it will be converted to a RegExp
|
20817
|
+
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
|
20818
|
+
* `new RegExp('^abc$')`.<br />
|
20819
|
+
* **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
|
20820
|
+
* start at the index of the last search's match, thus not taking the whole input value into
|
20821
|
+
* account.
|
20797
20822
|
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
20798
20823
|
* interaction with the input element.
|
20799
20824
|
*
|
@@ -20885,9 +20910,13 @@ var inputType = {
|
|
20885
20910
|
* as in the ngPattern directive.
|
20886
20911
|
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
|
20887
20912
|
* a RegExp found by evaluating the Angular expression given in the attribute value.
|
20888
|
-
* If the expression evaluates to a RegExp object then this is used directly.
|
20889
|
-
* If the expression
|
20890
|
-
* characters. For instance, `"abc"` will be converted to
|
20913
|
+
* If the expression evaluates to a RegExp object, then this is used directly.
|
20914
|
+
* If the expression evaluates to a string, then it will be converted to a RegExp
|
20915
|
+
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
|
20916
|
+
* `new RegExp('^abc$')`.<br />
|
20917
|
+
* **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
|
20918
|
+
* start at the index of the last search's match, thus not taking the whole input value into
|
20919
|
+
* account.
|
20891
20920
|
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
20892
20921
|
* interaction with the input element.
|
20893
20922
|
*
|
@@ -20980,9 +21009,13 @@ var inputType = {
|
|
20980
21009
|
* as in the ngPattern directive.
|
20981
21010
|
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
|
20982
21011
|
* a RegExp found by evaluating the Angular expression given in the attribute value.
|
20983
|
-
* If the expression evaluates to a RegExp object then this is used directly.
|
20984
|
-
* If the expression
|
20985
|
-
* characters. For instance, `"abc"` will be converted to
|
21012
|
+
* If the expression evaluates to a RegExp object, then this is used directly.
|
21013
|
+
* If the expression evaluates to a string, then it will be converted to a RegExp
|
21014
|
+
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
|
21015
|
+
* `new RegExp('^abc$')`.<br />
|
21016
|
+
* **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
|
21017
|
+
* start at the index of the last search's match, thus not taking the whole input value into
|
21018
|
+
* account.
|
20986
21019
|
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
20987
21020
|
* interaction with the input element.
|
20988
21021
|
*
|
@@ -21604,9 +21637,15 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
|
|
21604
21637
|
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
|
21605
21638
|
* maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
|
21606
21639
|
* length.
|
21607
|
-
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match
|
21608
|
-
* RegExp
|
21609
|
-
*
|
21640
|
+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
|
21641
|
+
* a RegExp found by evaluating the Angular expression given in the attribute value.
|
21642
|
+
* If the expression evaluates to a RegExp object, then this is used directly.
|
21643
|
+
* If the expression evaluates to a string, then it will be converted to a RegExp
|
21644
|
+
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
|
21645
|
+
* `new RegExp('^abc$')`.<br />
|
21646
|
+
* **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
|
21647
|
+
* start at the index of the last search's match, thus not taking the whole input value into
|
21648
|
+
* account.
|
21610
21649
|
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
21611
21650
|
* interaction with the input element.
|
21612
21651
|
* @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
|
@@ -21637,9 +21676,15 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
|
|
21637
21676
|
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
|
21638
21677
|
* maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
|
21639
21678
|
* length.
|
21640
|
-
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match
|
21641
|
-
* RegExp
|
21642
|
-
*
|
21679
|
+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
|
21680
|
+
* a RegExp found by evaluating the Angular expression given in the attribute value.
|
21681
|
+
* If the expression evaluates to a RegExp object, then this is used directly.
|
21682
|
+
* If the expression evaluates to a string, then it will be converted to a RegExp
|
21683
|
+
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
|
21684
|
+
* `new RegExp('^abc$')`.<br />
|
21685
|
+
* **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
|
21686
|
+
* start at the index of the last search's match, thus not taking the whole input value into
|
21687
|
+
* account.
|
21643
21688
|
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
21644
21689
|
* interaction with the input element.
|
21645
21690
|
* @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
|
@@ -27713,7 +27758,7 @@ var SelectController =
|
|
27713
27758
|
$element.val(value);
|
27714
27759
|
if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy
|
27715
27760
|
} else {
|
27716
|
-
if (
|
27761
|
+
if (value == null && self.emptyOption) {
|
27717
27762
|
self.removeUnknownOption();
|
27718
27763
|
$element.val('');
|
27719
27764
|
} else {
|
@@ -27766,9 +27811,7 @@ var SelectController =
|
|
27766
27811
|
* ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits such as reducing
|
27767
27812
|
* memory and increasing speed by not creating a new scope for each repeated instance, as well as providing
|
27768
27813
|
* more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
|
27769
|
-
* comprehension expression.
|
27770
|
-
* to a non-string value. This is because an option element can only be bound to string values at
|
27771
|
-
* present.
|
27814
|
+
* comprehension expression.
|
27772
27815
|
*
|
27773
27816
|
* When an item in the `<select>` menu is selected, the array element or object property
|
27774
27817
|
* represented by the selected option will be bound to the model identified by the `ngModel`
|
@@ -27781,6 +27824,51 @@ var SelectController =
|
|
27781
27824
|
* be nested into the `<select>` element. This element will then represent the `null` or "not selected"
|
27782
27825
|
* option. See example below for demonstration.
|
27783
27826
|
*
|
27827
|
+
* <div class="alert alert-info">
|
27828
|
+
* The value of a `select` directive used without `ngOptions` is always a string.
|
27829
|
+
* When the model needs to be bound to a non-string value, you must either explictly convert it
|
27830
|
+
* using a directive (see example below) or use `ngOptions` to specify the set of options.
|
27831
|
+
* This is because an option element can only be bound to string values at present.
|
27832
|
+
* </div>
|
27833
|
+
*
|
27834
|
+
* ### Example (binding `select` to a non-string value)
|
27835
|
+
*
|
27836
|
+
* <example name="select-with-non-string-options" module="nonStringSelect">
|
27837
|
+
* <file name="index.html">
|
27838
|
+
* <select ng-model="model.id" convert-to-number>
|
27839
|
+
* <option value="0">Zero</option>
|
27840
|
+
* <option value="1">One</option>
|
27841
|
+
* <option value="2">Two</option>
|
27842
|
+
* </select>
|
27843
|
+
* {{ model }}
|
27844
|
+
* </file>
|
27845
|
+
* <file name="app.js">
|
27846
|
+
* angular.module('nonStringSelect', [])
|
27847
|
+
* .run(function($rootScope) {
|
27848
|
+
* $rootScope.model = { id: 2 };
|
27849
|
+
* })
|
27850
|
+
* .directive('convertToNumber', function() {
|
27851
|
+
* return {
|
27852
|
+
* require: 'ngModel',
|
27853
|
+
* link: function(scope, element, attrs, ngModel) {
|
27854
|
+
* ngModel.$parsers.push(function(val) {
|
27855
|
+
* return parseInt(val, 10);
|
27856
|
+
* });
|
27857
|
+
* ngModel.$formatters.push(function(val) {
|
27858
|
+
* return '' + val;
|
27859
|
+
* });
|
27860
|
+
* }
|
27861
|
+
* };
|
27862
|
+
* });
|
27863
|
+
* </file>
|
27864
|
+
* <file name="protractor.js" type="protractor">
|
27865
|
+
* it('should initialize to model', function() {
|
27866
|
+
* var select = element(by.css('select'));
|
27867
|
+
* expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');
|
27868
|
+
* });
|
27869
|
+
* </file>
|
27870
|
+
* </example>
|
27871
|
+
*
|
27784
27872
|
*/
|
27785
27873
|
var selectDirective = function() {
|
27786
27874
|
|