Sha256: db36e32d1a25ebcd6ba0672b1bc5c2568d051a30c1b5ca78921741fb7c90c22b

Contents?: true

Size: 1.49 KB

Versions: 3

Compression:

Stored size: 1.49 KB

Contents

/**
 * angular-strap
 * @version v2.1.6 - 2015-01-11
 * @link http://mgcrea.github.io/angular-strap
 * @author Olivier Louvignes (olivier@mg-crea.com)
 * @license MIT License, http://www.opensource.org/licenses/MIT
 */
"use strict";angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var t=this.defaults={animation:"am-fade",prefixClass:"alert",prefixEvent:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(e,n){function a(a){var r={},i=angular.extend({},t,a);r=e(i),r.$scope.dismissable=!!i.dismissable,i.type&&(r.$scope.type=i.type);var o=r.show;return i.duration&&(r.show=function(){o(),n(function(){r.hide()},1e3*i.duration)}),r}return a}]}).directive("bsAlert",["$window","$sce","$alert",function(t,e,n){t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,a,r){var i={scope:t,element:a,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration","dismissable"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content","type"],function(n){r[n]&&r.$observe(n,function(a){t[n]=e.trustAsHtml(a)})}),r.bsAlert&&t.$watch(r.bsAlert,function(e){angular.isObject(e)?angular.extend(t,e):t.content=e},!0);var o=n(i);a.on(r.trigger||"click",o.toggle),t.$on("$destroy",function(){o&&o.destroy(),i=null,o=null})}}}]);
//# sourceMappingURL=alert.min.js.map

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
rails-angularstrap-2.2.0 vendor/assets/javascripts/angular-strap/dist/modules/alert.min.js
rails-angular-strap-2.1.6 vendor/assets/javascripts/angular-strap/modules/alert.min.js
rails-angular-strap-0.0.1 vendor/assets/javascripts/angular-strap/modules/alert.min.js