From e54e6ff8cc124a19967dcc86d251ff25b5cf0c0e Mon Sep 17 00:00:00 2001 From: Orion Date: Sat, 28 Jan 2017 18:55:53 +0300 Subject: [PATCH 1/2] Update angular-notify.html coz $interpolateProvider can be configured to another symbols e.g. {$ $} --- angular-notify.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/angular-notify.html b/angular-notify.html index 3c00178..a938e53 100755 --- a/angular-notify.html +++ b/angular-notify.html @@ -4,8 +4,7 @@ $position === 'right' ? 'cg-notify-message-right' : '']" ng-style="{'margin-left': $centerMargin}"> -
- {{$message}} +
@@ -17,4 +16,4 @@ Close -
\ No newline at end of file +
From 888dfa759c5f1a7c081fd2be9d4528ebec9fb280 Mon Sep 17 00:00:00 2001 From: orion Date: Sat, 28 Jan 2017 19:05:23 +0300 Subject: [PATCH 2/2] build --- dist/angular-notify.js | 5 ++--- dist/angular-notify.min.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dist/angular-notify.js b/dist/angular-notify.js index c28ef1b..973c847 100644 --- a/dist/angular-notify.js +++ b/dist/angular-notify.js @@ -165,8 +165,7 @@ angular.module('cgNotify').run(['$templateCache', function($templateCache) { " $position === 'right' ? 'cg-notify-message-right' : '']\"\n" + " ng-style=\"{'margin-left': $centerMargin}\">\n" + "\n" + - "
\n" + - " {{$message}}\n" + + "
\n" + "
\n" + "\n" + "
\n" + @@ -178,7 +177,7 @@ angular.module('cgNotify').run(['$templateCache', function($templateCache) { " Close\n" + " \n" + "\n" + - "
" + "
\n" ); }]); diff --git a/dist/angular-notify.min.js b/dist/angular-notify.min.js index 59b4b38..23eea99 100644 --- a/dist/angular-notify.min.js +++ b/dist/angular-notify.min.js @@ -1 +1 @@ -angular.module("cgNotify",[]).factory("notify",["$timeout","$http","$compile","$templateCache","$rootScope",function(a,b,c,d,e){var f=10,g=15,h=1e4,i="angular-notify.html",j="center",k=document.body,l=0,m=[],n=[],o=function(o){"object"!=typeof o&&(o={message:o}),o.duration=o.duration?o.duration:h,o.templateUrl=o.templateUrl?o.templateUrl:i,o.container=o.container?o.container:k,o.classes=o.classes?o.classes:"";var p=o.scope?o.scope.$new():e.$new();if(p.$position=o.position?o.position:j,p.$message=o.message,p.$classes=o.classes,p.$messageTemplate=o.messageTemplate,l>0)for(var q=n.length+1-l,r=0;q>r;r++)n[r].$close();b.get(o.templateUrl,{cache:d}).then(function(b){var d=c(b.data)(p);if(d.bind("webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd",function(a){("opacity"===a.propertyName||0===a.currentTarget.style.opacity||a.originalEvent&&"opacity"===a.originalEvent.propertyName)&&(d.remove(),m.splice(m.indexOf(d),1),n.splice(n.indexOf(p),1),i())}),o.messageTemplate){for(var e,h=0;h=0;c--){var d=10,e=m[c],h=e[0].offsetHeight,i=b+h+d;e.attr("data-closing")?i+=20:b+=h+g,e.css("top",i+"px").css("margin-top","-"+(h+d)+"px").css("visibility","visible"),a++}};a(function(){i()}),o.duration>0&&a(function(){p.$close()},o.duration)},function(a){throw new Error("Template specified for cgNotify ("+o.templateUrl+") could not be loaded. "+a)});var s={};return s.close=function(){p.$close&&p.$close()},Object.defineProperty(s,"message",{get:function(){return p.$message},set:function(a){p.$message=a}}),n.push(p),s};return o.config=function(a){f=angular.isUndefined(a.startTop)?f:a.startTop,g=angular.isUndefined(a.verticalSpacing)?g:a.verticalSpacing,h=angular.isUndefined(a.duration)?h:a.duration,i=a.templateUrl?a.templateUrl:i,j=angular.isUndefined(a.position)?j:a.position,k=a.container?a.container:k,l=a.maximumOpen?a.maximumOpen:l},o.closeAll=function(){for(var a=m.length-1;a>=0;a--){var b=m[a];b.css("opacity",0)}},o}]),angular.module("cgNotify").run(["$templateCache",function(a){"use strict";a.put("angular-notify.html","
\n\n
\n {{$message}}\n
\n\n"+'
\n \n
\n\n \n\n
')}]); \ No newline at end of file +angular.module("cgNotify",[]).factory("notify",["$timeout","$http","$compile","$templateCache","$rootScope",function(a,b,c,d,e){var f=10,g=15,h=1e4,i="angular-notify.html",j="center",k=document.body,l=0,m=[],n=[],o=function(o){"object"!=typeof o&&(o={message:o}),o.duration=o.duration?o.duration:h,o.templateUrl=o.templateUrl?o.templateUrl:i,o.container=o.container?o.container:k,o.classes=o.classes?o.classes:"";var p=o.scope?o.scope.$new():e.$new();if(p.$position=o.position?o.position:j,p.$message=o.message,p.$classes=o.classes,p.$messageTemplate=o.messageTemplate,l>0)for(var q=n.length+1-l,r=0;q>r;r++)n[r].$close();b.get(o.templateUrl,{cache:d}).then(function(b){var d=c(b.data)(p);if(d.bind("webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd",function(a){("opacity"===a.propertyName||0===a.currentTarget.style.opacity||a.originalEvent&&"opacity"===a.originalEvent.propertyName)&&(d.remove(),m.splice(m.indexOf(d),1),n.splice(n.indexOf(p),1),i())}),o.messageTemplate){for(var e,h=0;h=0;c--){var d=10,e=m[c],h=e[0].offsetHeight,i=b+h+d;e.attr("data-closing")?i+=20:b+=h+g,e.css("top",i+"px").css("margin-top","-"+(h+d)+"px").css("visibility","visible"),a++}};a(function(){i()}),o.duration>0&&a(function(){p.$close()},o.duration)},function(a){throw new Error("Template specified for cgNotify ("+o.templateUrl+") could not be loaded. "+a)});var s={};return s.close=function(){p.$close&&p.$close()},Object.defineProperty(s,"message",{get:function(){return p.$message},set:function(a){p.$message=a}}),n.push(p),s};return o.config=function(a){f=angular.isUndefined(a.startTop)?f:a.startTop,g=angular.isUndefined(a.verticalSpacing)?g:a.verticalSpacing,h=angular.isUndefined(a.duration)?h:a.duration,i=a.templateUrl?a.templateUrl:i,j=angular.isUndefined(a.position)?j:a.position,k=a.container?a.container:k,l=a.maximumOpen?a.maximumOpen:l},o.closeAll=function(){for(var a=m.length-1;a>=0;a--){var b=m[a];b.css("opacity",0)}},o}]),angular.module("cgNotify").run(["$templateCache",function(a){"use strict";a.put("angular-notify.html","
\n\n"+'
\n
\n\n
\n \n
\n\n \n\n
\n')}]); \ No newline at end of file