|
1 | 1 | /** |
2 | 2 | * angular-strap |
3 | | - * @version v2.3.2 - 2015-09-15 |
| 3 | + * @version v2.3.3 - 2015-09-24 |
4 | 4 | * @link http://mgcrea.github.io/angular-strap |
5 | 5 | * @author Olivier Louvignes <[email protected]> (https://github.com/mgcrea) |
6 | 6 | * @license MIT License, http://www.opensource.org/licenses/MIT |
|
3611 | 3611 | } |
3612 | 3612 | }; |
3613 | 3613 | } ]); |
3614 | | - angular.module('mgcrea.ngStrap.aside', [ 'mgcrea.ngStrap.modal' ]).provider('$aside', function() { |
3615 | | - var defaults = this.defaults = { |
3616 | | - animation: 'am-fade-and-slide-right', |
3617 | | - prefixClass: 'aside', |
3618 | | - prefixEvent: 'aside', |
3619 | | - placement: 'right', |
3620 | | - templateUrl: 'aside/aside.tpl.html', |
3621 | | - contentTemplate: false, |
3622 | | - container: false, |
3623 | | - element: null, |
3624 | | - backdrop: true, |
3625 | | - keyboard: true, |
3626 | | - html: false, |
3627 | | - show: true |
3628 | | - }; |
3629 | | - this.$get = [ '$modal', function($modal) { |
3630 | | - function AsideFactory(config) { |
3631 | | - var $aside = {}; |
3632 | | - var options = angular.extend({}, defaults, config); |
3633 | | - $aside = $modal(options); |
3634 | | - return $aside; |
3635 | | - } |
3636 | | - return AsideFactory; |
3637 | | - } ]; |
3638 | | - }).directive('bsAside', [ '$window', '$sce', '$aside', function($window, $sce, $aside) { |
3639 | | - var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout; |
3640 | | - return { |
3641 | | - restrict: 'EAC', |
3642 | | - scope: true, |
3643 | | - link: function postLink(scope, element, attr, transclusion) { |
3644 | | - var options = { |
3645 | | - scope: scope, |
3646 | | - element: element, |
3647 | | - show: false |
3648 | | - }; |
3649 | | - angular.forEach([ 'template', 'templateUrl', 'controller', 'controllerAs', 'contentTemplate', 'placement', 'backdrop', 'keyboard', 'html', 'container', 'animation' ], function(key) { |
3650 | | - if (angular.isDefined(attr[key])) options[key] = attr[key]; |
3651 | | - }); |
3652 | | - var falseValueRegExp = /^(false|0|)$/i; |
3653 | | - angular.forEach([ 'backdrop', 'keyboard', 'html', 'container' ], function(key) { |
3654 | | - if (angular.isDefined(attr[key]) && falseValueRegExp.test(attr[key])) options[key] = false; |
3655 | | - }); |
3656 | | - angular.forEach([ 'title', 'content' ], function(key) { |
3657 | | - attr[key] && attr.$observe(key, function(newValue, oldValue) { |
3658 | | - scope[key] = $sce.trustAsHtml(newValue); |
3659 | | - }); |
3660 | | - }); |
3661 | | - attr.bsAside && scope.$watch(attr.bsAside, function(newValue, oldValue) { |
3662 | | - if (angular.isObject(newValue)) { |
3663 | | - angular.extend(scope, newValue); |
3664 | | - } else { |
3665 | | - scope.content = newValue; |
3666 | | - } |
3667 | | - }, true); |
3668 | | - var aside = $aside(options); |
3669 | | - element.on(attr.trigger || 'click', aside.toggle); |
3670 | | - scope.$on('$destroy', function() { |
3671 | | - if (aside) aside.destroy(); |
3672 | | - options = null; |
3673 | | - aside = null; |
3674 | | - }); |
3675 | | - } |
3676 | | - }; |
3677 | | - } ]); |
3678 | 3614 | angular.module('mgcrea.ngStrap.button', []).provider('$button', function() { |
3679 | 3615 | var defaults = this.defaults = { |
3680 | 3616 | activeClass: 'active', |
|
3794 | 3730 | } |
3795 | 3731 | }; |
3796 | 3732 | } ]); |
| 3733 | + angular.module('mgcrea.ngStrap.aside', [ 'mgcrea.ngStrap.modal' ]).provider('$aside', function() { |
| 3734 | + var defaults = this.defaults = { |
| 3735 | + animation: 'am-fade-and-slide-right', |
| 3736 | + prefixClass: 'aside', |
| 3737 | + prefixEvent: 'aside', |
| 3738 | + placement: 'right', |
| 3739 | + templateUrl: 'aside/aside.tpl.html', |
| 3740 | + contentTemplate: false, |
| 3741 | + container: false, |
| 3742 | + element: null, |
| 3743 | + backdrop: true, |
| 3744 | + keyboard: true, |
| 3745 | + html: false, |
| 3746 | + show: true |
| 3747 | + }; |
| 3748 | + this.$get = [ '$modal', function($modal) { |
| 3749 | + function AsideFactory(config) { |
| 3750 | + var $aside = {}; |
| 3751 | + var options = angular.extend({}, defaults, config); |
| 3752 | + $aside = $modal(options); |
| 3753 | + return $aside; |
| 3754 | + } |
| 3755 | + return AsideFactory; |
| 3756 | + } ]; |
| 3757 | + }).directive('bsAside', [ '$window', '$sce', '$aside', function($window, $sce, $aside) { |
| 3758 | + var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout; |
| 3759 | + return { |
| 3760 | + restrict: 'EAC', |
| 3761 | + scope: true, |
| 3762 | + link: function postLink(scope, element, attr, transclusion) { |
| 3763 | + var options = { |
| 3764 | + scope: scope, |
| 3765 | + element: element, |
| 3766 | + show: false |
| 3767 | + }; |
| 3768 | + angular.forEach([ 'template', 'templateUrl', 'controller', 'controllerAs', 'contentTemplate', 'placement', 'backdrop', 'keyboard', 'html', 'container', 'animation' ], function(key) { |
| 3769 | + if (angular.isDefined(attr[key])) options[key] = attr[key]; |
| 3770 | + }); |
| 3771 | + var falseValueRegExp = /^(false|0|)$/i; |
| 3772 | + angular.forEach([ 'backdrop', 'keyboard', 'html', 'container' ], function(key) { |
| 3773 | + if (angular.isDefined(attr[key]) && falseValueRegExp.test(attr[key])) options[key] = false; |
| 3774 | + }); |
| 3775 | + angular.forEach([ 'title', 'content' ], function(key) { |
| 3776 | + attr[key] && attr.$observe(key, function(newValue, oldValue) { |
| 3777 | + scope[key] = $sce.trustAsHtml(newValue); |
| 3778 | + }); |
| 3779 | + }); |
| 3780 | + attr.bsAside && scope.$watch(attr.bsAside, function(newValue, oldValue) { |
| 3781 | + if (angular.isObject(newValue)) { |
| 3782 | + angular.extend(scope, newValue); |
| 3783 | + } else { |
| 3784 | + scope.content = newValue; |
| 3785 | + } |
| 3786 | + }, true); |
| 3787 | + var aside = $aside(options); |
| 3788 | + element.on(attr.trigger || 'click', aside.toggle); |
| 3789 | + scope.$on('$destroy', function() { |
| 3790 | + if (aside) aside.destroy(); |
| 3791 | + options = null; |
| 3792 | + aside = null; |
| 3793 | + }); |
| 3794 | + } |
| 3795 | + }; |
| 3796 | + } ]); |
3797 | 3797 | angular.module('mgcrea.ngStrap.alert', [ 'mgcrea.ngStrap.modal' ]).provider('$alert', function() { |
3798 | 3798 | var defaults = this.defaults = { |
3799 | 3799 | animation: 'am-fade', |
|
0 commit comments