angularjs-rails 1.2.0.rc1 → 1.2.0.rc2
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/angularjs-rails/version.rb +1 -1
- data/vendor/assets/javascripts/angular-animate.js +150 -119
- data/vendor/assets/javascripts/angular-cookies.js +17 -1
- data/vendor/assets/javascripts/angular-loader.js +6 -3
- data/vendor/assets/javascripts/angular-mocks.js +15 -5
- data/vendor/assets/javascripts/angular-resource.js +13 -12
- data/vendor/assets/javascripts/angular-route.js +66 -55
- data/vendor/assets/javascripts/angular-sanitize.js +10 -19
- data/vendor/assets/javascripts/angular-scenario.js +218 -100
- data/vendor/assets/javascripts/angular-touch.js +21 -4
- data/vendor/assets/javascripts/angular.js +218 -100
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60c24156d821e8f99fe877451cabfdb3da9a3840
|
4
|
+
data.tar.gz: da2c799f76324b0b429dc3b3f9122a3223ef9ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd335cd66257312b2975b59ff0e5d3f3e3cf4f58dd32ed144878d8f996634613431b7b1a6799195415368d1c69fe7df9b4440f422284868d114817e697a5aefd
|
7
|
+
data.tar.gz: 65630c189cbf97e07f998e8db828927cb40338dc667de06ad27900fc4b79a8886f264e6dc53d7dc330aa688469f6bfcc0315a06f98e028d998755b848df07434
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# angularjs-rails
|
1
|
+
# angularjs-rails <a href="http://badge.fury.io/rb/angularjs-rails"><img src="https://badge.fury.io/rb/angularjs-rails@2x.png" alt="Gem Version" height="18"></a>
|
2
2
|
|
3
3
|
angularjs-rails wraps the [Angular.js](http://angularjs.org) library for use in Rails 3.1 and above. Assets will minify automatically during production.
|
4
4
|
|
@@ -30,4 +30,4 @@ And similarly, for optional Angular assets:
|
|
30
30
|
|
31
31
|
Every attempt is made to mirror the currently shipping Angular.js version number wherever possible.
|
32
32
|
|
33
|
-
The major, minor, and patch version numbers will always represent the Angular.js version.
|
33
|
+
The major, minor, and patch version numbers will always represent the Angular.js version.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.0-rc.2
|
3
3
|
* (c) 2010-2012 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -10,20 +10,15 @@
|
|
10
10
|
* @name ngAnimate
|
11
11
|
* @description
|
12
12
|
*
|
13
|
-
* ngAnimate
|
14
|
-
* =========
|
13
|
+
* # ngAnimate
|
15
14
|
*
|
16
|
-
*
|
17
|
-
* application to provide support for CSS and JavaScript animation hooks.
|
15
|
+
* `ngAnimate` is an optional module that provides CSS and JavaScript animation hooks.
|
18
16
|
*
|
19
|
-
*
|
20
|
-
* and the `ngAnimate` module must be included as a dependency.
|
17
|
+
* {@installModule animate}
|
21
18
|
*
|
22
|
-
*
|
23
|
-
* angular.module('App', ['ngAnimate']);
|
24
|
-
* </pre>
|
19
|
+
* # Usage
|
25
20
|
*
|
26
|
-
*
|
21
|
+
* To see animations in action, all that is required is to define the appropriate CSS classes
|
27
22
|
* or to register a JavaScript animation via the $animation service. The directives that support animation automatically are:
|
28
23
|
* `ngRepeat`, `ngInclude`, `ngSwitch`, `ngShow`, `ngHide` and `ngView`. Custom directives can take advantage of animation
|
29
24
|
* by using the `$animate` service.
|
@@ -53,7 +48,7 @@
|
|
53
48
|
* -o-transition:0.5s linear all;
|
54
49
|
* transition:0.5s linear all;
|
55
50
|
* }
|
56
|
-
*
|
51
|
+
*
|
57
52
|
* .slide.ng-enter { } /* starting animations for enter */
|
58
53
|
* .slide.ng-enter-active { } /* terminal animations for enter */
|
59
54
|
* .slide.ng-leave { } /* starting animations for leave */
|
@@ -197,11 +192,13 @@ angular.module('ngAnimate', ['ng'])
|
|
197
192
|
* @name ngAnimate.$animateProvider
|
198
193
|
* @description
|
199
194
|
*
|
200
|
-
* The
|
195
|
+
* The `$AnimationProvider` allows developers to register and access custom JavaScript animations directly inside
|
201
196
|
* of a module. When an animation is triggered, the $animate service will query the $animation function to find any
|
202
197
|
* animations that match the provided name value.
|
203
198
|
*
|
204
|
-
*
|
199
|
+
* Requires the {@link ngAnimate `ngAnimate`} module to be installed.
|
200
|
+
*
|
201
|
+
* Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
|
205
202
|
*
|
206
203
|
*/
|
207
204
|
.config(['$provide', '$animateProvider', function($provide, $animateProvider) {
|
@@ -211,8 +208,8 @@ angular.module('ngAnimate', ['ng'])
|
|
211
208
|
|
212
209
|
var NG_ANIMATE_STATE = '$$ngAnimateState';
|
213
210
|
var rootAnimateState = {running:true};
|
214
|
-
$provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$timeout',
|
215
|
-
function($delegate, $injector, $sniffer, $rootElement, $timeout) {
|
211
|
+
$provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$timeout', '$rootScope',
|
212
|
+
function($delegate, $injector, $sniffer, $rootElement, $timeout, $rootScope) {
|
216
213
|
|
217
214
|
$rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
|
218
215
|
|
@@ -255,7 +252,9 @@ angular.module('ngAnimate', ['ng'])
|
|
255
252
|
* The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives
|
256
253
|
* will work out of the box without any extra configuration.
|
257
254
|
*
|
258
|
-
*
|
255
|
+
* Requires the {@link ngAnimate `ngAnimate`} module to be installed.
|
256
|
+
*
|
257
|
+
* Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
|
259
258
|
*
|
260
259
|
*/
|
261
260
|
return {
|
@@ -275,8 +274,8 @@ angular.module('ngAnimate', ['ng'])
|
|
275
274
|
* |----------------------------------------------------------------------------------------------|-----------------------------------------------|
|
276
275
|
* | 1. $animate.enter(...) is called | class="my-animation" |
|
277
276
|
* | 2. element is inserted into the parent element or beside the after element | class="my-animation" |
|
278
|
-
* | 3.
|
279
|
-
* | 4.
|
277
|
+
* | 3. $animate runs any JavaScript-defined animations on the element | class="my-animation" |
|
278
|
+
* | 4. the .ng-enter class is added to the element | class="my-animation ng-enter" |
|
280
279
|
* | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-enter" |
|
281
280
|
* | 6. the .ng-enter-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-enter ng-enter-active" |
|
282
281
|
* | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-enter ng-enter-active" |
|
@@ -290,7 +289,11 @@ angular.module('ngAnimate', ['ng'])
|
|
290
289
|
*/
|
291
290
|
enter : function(element, parent, after, done) {
|
292
291
|
$delegate.enter(element, parent, after);
|
293
|
-
|
292
|
+
$rootScope.$$postDigest(function() {
|
293
|
+
performAnimation('enter', 'ng-enter', element, parent, after, function() {
|
294
|
+
done && $timeout(done, 0, false);
|
295
|
+
});
|
296
|
+
});
|
294
297
|
},
|
295
298
|
|
296
299
|
/**
|
@@ -308,8 +311,8 @@ angular.module('ngAnimate', ['ng'])
|
|
308
311
|
* | Animation Step | What the element class attribute looks like |
|
309
312
|
* |----------------------------------------------------------------------------------------------|----------------------------------------------|
|
310
313
|
* | 1. $animate.leave(...) is called | class="my-animation" |
|
311
|
-
* | 2.
|
312
|
-
* | 3.
|
314
|
+
* | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation" |
|
315
|
+
* | 3. the .ng-leave class is added to the element | class="my-animation ng-leave" |
|
313
316
|
* | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-leave" |
|
314
317
|
* | 5. the .ng-leave-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-leave ng-leave-active |
|
315
318
|
* | 6. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-leave ng-leave-active |
|
@@ -321,8 +324,10 @@ angular.module('ngAnimate', ['ng'])
|
|
321
324
|
* @param {function()=} done callback function that will be called once the animation is complete
|
322
325
|
*/
|
323
326
|
leave : function(element, done) {
|
324
|
-
|
325
|
-
|
327
|
+
$rootScope.$$postDigest(function() {
|
328
|
+
performAnimation('leave', 'ng-leave', element, null, null, function() {
|
329
|
+
$delegate.leave(element, done);
|
330
|
+
});
|
326
331
|
});
|
327
332
|
},
|
328
333
|
|
@@ -343,8 +348,8 @@ angular.module('ngAnimate', ['ng'])
|
|
343
348
|
* |----------------------------------------------------------------------------------------------|---------------------------------------------|
|
344
349
|
* | 1. $animate.move(...) is called | class="my-animation" |
|
345
350
|
* | 2. element is moved into the parent element or beside the after element | class="my-animation" |
|
346
|
-
* | 3.
|
347
|
-
* | 4.
|
351
|
+
* | 3. $animate runs any JavaScript-defined animations on the element | class="my-animation" |
|
352
|
+
* | 4. the .ng-move class is added to the element | class="my-animation ng-move" |
|
348
353
|
* | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-move" |
|
349
354
|
* | 6. the .ng-move-active class is added (this triggers the CSS transition/animation) | class="my-animation ng-move ng-move-active" |
|
350
355
|
* | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-move ng-move-active" |
|
@@ -358,7 +363,11 @@ angular.module('ngAnimate', ['ng'])
|
|
358
363
|
*/
|
359
364
|
move : function(element, parent, after, done) {
|
360
365
|
$delegate.move(element, parent, after);
|
361
|
-
|
366
|
+
$rootScope.$$postDigest(function() {
|
367
|
+
performAnimation('move', 'ng-move', element, null, null, function() {
|
368
|
+
done && $timeout(done, 0, false);
|
369
|
+
});
|
370
|
+
});
|
362
371
|
},
|
363
372
|
|
364
373
|
/**
|
@@ -369,15 +378,16 @@ angular.module('ngAnimate', ['ng'])
|
|
369
378
|
* @description
|
370
379
|
* Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.
|
371
380
|
* Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide
|
372
|
-
* the animate service the setup and active CSS classes in order to trigger the animation
|
381
|
+
* the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions
|
382
|
+
* or keyframes are defined on the -add CSS class).
|
373
383
|
*
|
374
384
|
* Below is a breakdown of each step that occurs during addClass animation:
|
375
385
|
*
|
376
386
|
* | Animation Step | What the element class attribute looks like |
|
377
387
|
* |------------------------------------------------------------------------------------------------|---------------------------------------------|
|
378
388
|
* | 1. $animate.addClass(element, 'super') is called | class="" |
|
379
|
-
* | 2.
|
380
|
-
* | 3.
|
389
|
+
* | 2. $animate runs any JavaScript-defined animations on the element | class="" |
|
390
|
+
* | 3. the .super-add class is added to the element | class="super-add" |
|
381
391
|
* | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="super-add" |
|
382
392
|
* | 5. the .super-add-active class is added (this triggers the CSS transition/animation) | class="super-add super-add-active" |
|
383
393
|
* | 6. $animate waits for X milliseconds for the animation to complete | class="super-add super-add-active" |
|
@@ -403,15 +413,16 @@ angular.module('ngAnimate', ['ng'])
|
|
403
413
|
* @description
|
404
414
|
* Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value
|
405
415
|
* from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in
|
406
|
-
* order to provide the animate service the setup and active CSS classes in order to trigger the animation
|
416
|
+
* order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if
|
417
|
+
* no CSS transitions or keyframes are defined on the -remove CSS class).
|
407
418
|
*
|
408
419
|
* Below is a breakdown of each step that occurs during removeClass animation:
|
409
420
|
*
|
410
421
|
* | Animation Step | What the element class attribute looks like |
|
411
422
|
* |-----------------------------------------------------------------------------------------------|-------------------------------------------------|
|
412
423
|
* | 1. $animate.removeClass(element, 'super') is called | class="super" |
|
413
|
-
* | 2.
|
414
|
-
* | 3.
|
424
|
+
* | 2. $animate runs any JavaScript-defined animations on the element | class="super" |
|
425
|
+
* | 3. the .super-remove class is added to the element | class="super super-remove" |
|
415
426
|
* | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="super super-remove" |
|
416
427
|
* | 5. the .super-remove-active class is added (this triggers the CSS transition/animation) | class="super super-remove super-remove-active" |
|
417
428
|
* | 6. $animate waits for X milliseconds for the animation to complete | class="super super-remove super-remove-active" |
|
@@ -496,15 +507,6 @@ angular.module('ngAnimate', ['ng'])
|
|
496
507
|
done:done
|
497
508
|
});
|
498
509
|
|
499
|
-
var baseClassName = className;
|
500
|
-
if(event == 'addClass') {
|
501
|
-
className = suffixClasses(className, '-add');
|
502
|
-
} else if(event == 'removeClass') {
|
503
|
-
className = suffixClasses(className, '-remove');
|
504
|
-
}
|
505
|
-
|
506
|
-
element.addClass(className);
|
507
|
-
|
508
510
|
forEach(animations, function(animation, index) {
|
509
511
|
var fn = function() {
|
510
512
|
progress(index);
|
@@ -512,7 +514,7 @@ angular.module('ngAnimate', ['ng'])
|
|
512
514
|
|
513
515
|
if(animation.start) {
|
514
516
|
if(event == 'addClass' || event == 'removeClass') {
|
515
|
-
animation.endFn = animation.start(element,
|
517
|
+
animation.endFn = animation.start(element, className, fn);
|
516
518
|
} else {
|
517
519
|
animation.endFn = animation.start(element, fn);
|
518
520
|
}
|
@@ -540,7 +542,6 @@ angular.module('ngAnimate', ['ng'])
|
|
540
542
|
function done() {
|
541
543
|
if(!done.hasBeenRun) {
|
542
544
|
done.hasBeenRun = true;
|
543
|
-
element.removeClass(className);
|
544
545
|
element.removeData(NG_ANIMATE_STATE);
|
545
546
|
(onComplete || noop)();
|
546
547
|
}
|
@@ -551,94 +552,125 @@ angular.module('ngAnimate', ['ng'])
|
|
551
552
|
$animateProvider.register('', ['$window','$sniffer', '$timeout', function($window, $sniffer, $timeout) {
|
552
553
|
var noop = angular.noop;
|
553
554
|
var forEach = angular.forEach;
|
555
|
+
|
556
|
+
//one day all browsers will have these properties
|
557
|
+
var w3cAnimationProp = 'animation';
|
558
|
+
var w3cTransitionProp = 'transition';
|
559
|
+
|
560
|
+
//but some still use vendor-prefixed styles
|
561
|
+
var vendorAnimationProp = $sniffer.vendorPrefix + 'Animation';
|
562
|
+
var vendorTransitionProp = $sniffer.vendorPrefix + 'Transition';
|
563
|
+
|
564
|
+
var durationKey = 'Duration',
|
565
|
+
delayKey = 'Delay',
|
566
|
+
propertyKey = 'Property',
|
567
|
+
animationIterationCountKey = 'IterationCount',
|
568
|
+
ELEMENT_NODE = 1;
|
569
|
+
|
554
570
|
function animate(element, className, done) {
|
555
571
|
if (!($sniffer.transitions || $sniffer.animations)) {
|
556
572
|
done();
|
557
|
-
|
558
|
-
var activeClassName = '';
|
559
|
-
$timeout(startAnimation, 1, false);
|
560
|
-
|
561
|
-
//this acts as the cancellation function in case
|
562
|
-
//a new animation is triggered while another animation
|
563
|
-
//is still going on (otherwise the active className
|
564
|
-
//would still hang around until the timer is complete).
|
565
|
-
return onEnd;
|
573
|
+
return;
|
566
574
|
}
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
575
|
+
else if(['ng-enter','ng-leave','ng-move'].indexOf(className) == -1) {
|
576
|
+
var existingDuration = 0;
|
577
|
+
forEach(element, function(element) {
|
578
|
+
if (element.nodeType == ELEMENT_NODE) {
|
579
|
+
var elementStyles = $window.getComputedStyle(element) || {};
|
580
|
+
existingDuration = Math.max(parseMaxTime(elementStyles[w3cTransitionProp + durationKey]),
|
581
|
+
parseMaxTime(elementStyles[vendorTransitionProp + durationKey]),
|
582
|
+
existingDuration);
|
583
|
+
}
|
572
584
|
});
|
573
|
-
|
585
|
+
if(existingDuration > 0) {
|
586
|
+
done();
|
587
|
+
return;
|
588
|
+
}
|
574
589
|
}
|
575
590
|
|
576
|
-
|
577
|
-
var duration = 0;
|
578
|
-
forEach(className.split(' '), function(klass, i) {
|
579
|
-
activeClassName += (i > 0 ? ' ' : '') + klass + '-active';
|
580
|
-
});
|
581
|
-
|
582
|
-
element.addClass(activeClassName);
|
591
|
+
element.addClass(className);
|
583
592
|
|
584
|
-
|
585
|
-
|
586
|
-
|
593
|
+
//we want all the styles defined before and after
|
594
|
+
var duration = 0;
|
595
|
+
forEach(element, function(element) {
|
596
|
+
if (element.nodeType == ELEMENT_NODE) {
|
597
|
+
var elementStyles = $window.getComputedStyle(element) || {};
|
587
598
|
|
588
|
-
|
589
|
-
|
590
|
-
var vendorTransitionProp = $sniffer.vendorPrefix + 'Transition';
|
599
|
+
var transitionDelay = Math.max(parseMaxTime(elementStyles[w3cTransitionProp + delayKey]),
|
600
|
+
parseMaxTime(elementStyles[vendorTransitionProp + delayKey]));
|
591
601
|
|
592
|
-
|
593
|
-
|
594
|
-
animationIterationCountKey = 'IterationCount';
|
602
|
+
var animationDelay = Math.max(parseMaxTime(elementStyles[w3cAnimationProp + delayKey]),
|
603
|
+
parseMaxTime(elementStyles[vendorAnimationProp + delayKey]));
|
595
604
|
|
596
|
-
|
597
|
-
|
598
|
-
forEach(element, function(element) {
|
599
|
-
if (element.nodeType == ELEMENT_NODE) {
|
600
|
-
var elementStyles = $window.getComputedStyle(element) || {};
|
605
|
+
var transitionDuration = Math.max(parseMaxTime(elementStyles[w3cTransitionProp + durationKey]),
|
606
|
+
parseMaxTime(elementStyles[vendorTransitionProp + durationKey]));
|
601
607
|
|
602
|
-
|
603
|
-
|
608
|
+
var animationDuration = Math.max(parseMaxTime(elementStyles[w3cAnimationProp + durationKey]),
|
609
|
+
parseMaxTime(elementStyles[vendorAnimationProp + durationKey]));
|
604
610
|
|
605
|
-
|
606
|
-
|
611
|
+
if(animationDuration > 0) {
|
612
|
+
animationDuration *= Math.max(parseInt(elementStyles[w3cAnimationProp + animationIterationCountKey]) || 0,
|
613
|
+
parseInt(elementStyles[vendorAnimationProp + animationIterationCountKey]) || 0,
|
614
|
+
1);
|
615
|
+
}
|
607
616
|
|
608
|
-
|
609
|
-
|
617
|
+
duration = Math.max(animationDelay + animationDuration,
|
618
|
+
transitionDelay + transitionDuration,
|
619
|
+
duration);
|
620
|
+
}
|
621
|
+
});
|
610
622
|
|
611
|
-
|
612
|
-
|
623
|
+
/* there is no point in performing a reflow if the animation
|
624
|
+
timeout is empty (this would cause a flicker bug normally
|
625
|
+
in the page */
|
626
|
+
if(duration > 0) {
|
627
|
+
var node = element[0];
|
613
628
|
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
}
|
629
|
+
//temporarily disable the transition so that the enter styles
|
630
|
+
//don't animate twice (this is here to avoid a bug in Chrome/FF).
|
631
|
+
node.style[w3cTransitionProp + propertyKey] = 'none';
|
632
|
+
node.style[vendorTransitionProp + propertyKey] = 'none';
|
619
633
|
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
}
|
634
|
+
var activeClassName = '';
|
635
|
+
forEach(className.split(' '), function(klass, i) {
|
636
|
+
activeClassName += (i > 0 ? ' ' : '') + klass + '-active';
|
624
637
|
});
|
625
638
|
|
639
|
+
//this triggers a reflow which allows for the transition animation to kick in
|
640
|
+
element.prop('clientWidth');
|
641
|
+
node.style[w3cTransitionProp + propertyKey] = '';
|
642
|
+
node.style[vendorTransitionProp + propertyKey] = '';
|
643
|
+
element.addClass(activeClassName);
|
644
|
+
|
626
645
|
$timeout(done, duration * 1000, false);
|
627
|
-
}
|
628
646
|
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
647
|
+
//this will automatically be called by $animate so
|
648
|
+
//there is no need to attach this internally to the
|
649
|
+
//timeout done method
|
650
|
+
return function onEnd(cancelled) {
|
651
|
+
element.removeClass(className);
|
652
|
+
element.removeClass(activeClassName);
|
634
653
|
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
654
|
+
//only when the animation is cancelled is the done()
|
655
|
+
//function not called for this animation therefore
|
656
|
+
//this must be also called
|
657
|
+
if(cancelled) {
|
658
|
+
done();
|
659
|
+
}
|
640
660
|
}
|
641
661
|
}
|
662
|
+
else {
|
663
|
+
element.removeClass(className);
|
664
|
+
done();
|
665
|
+
}
|
666
|
+
|
667
|
+
function parseMaxTime(str) {
|
668
|
+
var total = 0, values = angular.isString(str) ? str.split(/\s*,\s*/) : [];
|
669
|
+
forEach(values, function(value) {
|
670
|
+
total = Math.max(parseFloat(value) || 0, total);
|
671
|
+
});
|
672
|
+
return total;
|
673
|
+
}
|
642
674
|
}
|
643
675
|
|
644
676
|
return {
|
@@ -659,18 +691,17 @@ angular.module('ngAnimate', ['ng'])
|
|
659
691
|
}
|
660
692
|
};
|
661
693
|
|
694
|
+
function suffixClasses(classes, suffix) {
|
695
|
+
var className = '';
|
696
|
+
classes = angular.isArray(classes) ? classes : classes.split(/\s+/);
|
697
|
+
forEach(classes, function(klass, i) {
|
698
|
+
if(klass && klass.length > 0) {
|
699
|
+
className += (i > 0 ? ' ' : '') + klass + suffix;
|
700
|
+
}
|
701
|
+
});
|
702
|
+
return className;
|
703
|
+
}
|
662
704
|
}]);
|
663
|
-
|
664
|
-
function suffixClasses(classes, suffix) {
|
665
|
-
var className = '';
|
666
|
-
classes = angular.isArray(classes) ? classes : classes.split(/\s+/);
|
667
|
-
forEach(classes, function(klass, i) {
|
668
|
-
if(klass && klass.length > 0) {
|
669
|
-
className += (i > 0 ? ' ' : '') + klass + suffix;
|
670
|
-
}
|
671
|
-
});
|
672
|
-
return className;
|
673
|
-
}
|
674
705
|
}]);
|
675
706
|
|
676
707
|
|