Skip to content

Commit 10aa0f7

Browse files
Arjan KempesArjan Kempes
authored andcommitted
Push version number and updated dist files
1 parent 721b481 commit 10aa0f7

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-flashmessage",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"homepage": "https://github.com/akempes/angular-flashmessage",
55
"authors": [
66
"Arjan Kempes <a_kempes@msn.com>"

dist/flashmessage.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ angular.module('flashMessage', ['ng'])
1010
wrapperTemplate : 'flashMessage/wrapper.html',
1111
template : 'flashMessage/message.html',
1212
showClose : true,
13-
clickToClose : true
13+
clickToClose : true,
14+
useTranslation : false
1415
},
1516
types = [
1617
{
@@ -45,10 +46,13 @@ angular.module('flashMessage', ['ng'])
4546
types[index] = item;
4647
}
4748

49+
return this;
4850
};
4951

5052
this.setConfig = function (data) {
5153
options = angular.extend(options, data);
54+
55+
return this;
5256
};
5357

5458
this.$get = ['$q', '$interval', '$rootScope', function( $q, $interval, $rootScope ) {
@@ -79,7 +83,7 @@ angular.module('flashMessage', ['ng'])
7983
};
8084

8185
angular.forEach(types, function (item) {
82-
me[item.type] = function (data, persist, delay, showClose, template, clickToClose) {
86+
me[item.type] = function (data, persist, delay, showClose, template, clickToClose, useTranslation) {
8387

8488
var index = types.map(function(x){ return x.type; }).indexOf(item.type),
8589
msg;
@@ -99,6 +103,8 @@ angular.module('flashMessage', ['ng'])
99103
template : getValue([ template, types[index].template, options.template, 0 ]),
100104
clickToClose : getValue([ clickToClose, types[index].clickToClose, options.clickToClose, 0 ]),
101105
showClose : getValue([ showClose, types[index].showClose, options.showClose, 0 ]),
106+
useTranslation : getValue([ useTranslation, types[index].useTranslation, options.useTranslation, false ]),
107+
102108
close : function (data) {
103109
if(data==='clickToClose' && !msg.clickToClose){
104110
return;
@@ -184,7 +190,8 @@ angular.module('flashMessage', ['ng'])
184190

185191
$templateCache.put('flashMessage/message.html',
186192

187-
'<span class="flash-message-body" ng-bind-html="msg.data | allowHtmlInMessage"></span>' +
193+
'<span class="flash-message-body" ng-if="!msg.useTranslation" ng-bind-html="msg.data | allowHtmlInMessage"></span>' +
194+
'<span class="flash-message-body" ng-if="msg.useTranslation" ng-bind-html="msg.data | translate | allowHtmlInMessage"></span>' +
188195
'<span class="flash-message-close flash-message-clickable" ng-if="msg.showClose" ng-click="msg.close(\'close\')">&times;</span>'
189196

190197
);

dist/flashmessage.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-flashmessage",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"dependencies": {},
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)