Skip to content

Commit

Permalink
Added css file and ready for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
JanStevens committed May 25, 2014
1 parent bf1f0fa commit 61caa54
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 21 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ app.config(['growlProvider', function(growlProvider) {
```

You can override the global option and hide the close button in single messages too:

````javascript
app.controller("demoCtrl", ['$scope', 'growl', function($scope, growl) {
$scope.addSpecialWarnMessage = function() {
Expand Down Expand Up @@ -371,6 +371,11 @@ A safer option to alter the view of the growl notifications is to change the css
The icons used in the notification are included in the css as base64 strings. The original images (white and colored) can be found in the src/images folder.

##Changelog
**0.6.1** - 25 May 2014
* Fixes edge case where message test is not a string
* Fixes style issue where close button was floating outside the alert
* Fixes issue [#12](https://github.com/JanStevens/angular-growl-2/issues/12), [#15](https://github.com/JanStevens/angular-growl-2/issues/15), [#16](https://github.com/JanStevens/angular-growl-2/issues/16)

**0.6.0** - 16 Apr 2014
* [CHANGE] remove enableHtml, `$sce.trustAsHtml` is always run on the message text
* Possible to set global possition for non-inline growl messages (thanks @pauloprea)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
],
"name": "angular-growl-v2",
"description": "growl like notifications for angularJS projects, using bootstrap alert classes",
"version": "0.6.0",
"version": "0.6.1",
"homepage": "http://janstevens.github.io/angular-growl-2",
"repository": {
"type": "git",
Expand Down
115 changes: 115 additions & 0 deletions build/angular-growl.css

Large diffs are not rendered by default.

28 changes: 16 additions & 12 deletions build/angular-growl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* angular-growl-v2 - v0.6.0 - 2014-04-16
* angular-growl-v2 - v0.6.1 - 2014-05-25
* http://janstevens.github.io/angular-growl-2
* Copyright (c) 2014 Marco Rinck,Jan Stevens; Licensed MIT
*/
Expand Down Expand Up @@ -27,13 +27,15 @@ angular.module('angular-growl').directive('growl', [
var referenceId = $scope.reference || 0;
$scope.inlineMessage = $scope.inline || growl.inlineMessages();
function addMessage(message) {
message.text = $sce.trustAsHtml(message.text);
$scope.messages.push(message);
if (message.ttl && message.ttl !== -1) {
$timeout(function () {
$scope.deleteMessage(message);
}, message.ttl);
}
$timeout(function () {
message.text = $sce.trustAsHtml(String(message.text));
$scope.messages.push(message);
if (message.ttl && message.ttl !== -1) {
$timeout(function () {
$scope.deleteMessage(message);
}, message.ttl);
}
}, true);
}
$rootScope.$on('growlMessage', function (event, message) {
var found;
Expand Down Expand Up @@ -67,7 +69,8 @@ angular.module('angular-growl').directive('growl', [
'alert-danger': message.severity === 'error',
'alert-info': message.severity === 'info',
'alert-warning': message.severity === 'warning',
'icon': message.disableIcons === false
'icon': message.disableIcons === false,
'alert-dismissable': !message.disableCloseButton
};
};
$scope.wrapperClasses = function () {
Expand All @@ -94,7 +97,7 @@ angular.module('angular-growl').run([
'$templateCache',
function ($templateCache) {
'use strict';
$templateCache.put('templates/growl/growl.html', '<div class="growl-container" ng-class="wrapperClasses()">' + '<div class="growl-item alert" ng-repeat="message in messages" ng-class="alertClasses(message)">' + '<button type="button" class="close" ng-click="deleteMessage(message)" ng-show="!message.disableCloseButton">&times;</button>' + '<h4 class="growl-title" ng-show="message.title" ng-bind="message.title"></h4>' + '<div class="growl-message" ng-bind-html="message.text"></div>' + '</div>' + '</div>');
$templateCache.put('templates/growl/growl.html', '<div class="growl-container" ng-class="wrapperClasses()">' + '<div class="growl-item alert" ng-repeat="message in messages" ng-class="alertClasses(message)">' + '<button type="button" class="close" data-dismiss="alert" aria-hidden="true" ng-click="deleteMessage(message)" ng-show="!message.disableCloseButton">&times;</button>' + '<h4 class="growl-title" ng-show="message.title" ng-bind="message.title"></h4>' + '<div class="growl-message" ng-bind-html="message.text"></div>' + '</div>' + '</div>');
}
]);
angular.module('angular-growl').provider('growl', function () {
Expand Down Expand Up @@ -185,9 +188,10 @@ angular.module('angular-growl').provider('growl', function () {
function broadcastMessage(message) {
if (translate) {
message.text = translate(message.text, message.variables);
} else {
var polation = $interpolate(message.text);
message.text = polation(message.variables);
}
var polation = $interpolate(message.text);
message.text = polation(message.variables);
$rootScope.$broadcast('growlMessage', message);
}
function sendMessage(text, config, severity) {
Expand Down
4 changes: 2 additions & 2 deletions build/angular-growl.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/angular-growl.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,20 @@ module.exports = function (grunt) {
banner: '<%= meta.banner %>'
},
src: '<%= concat.core.dest %>',
dest: '<%= concat.core.dest %>'
dest: '<%= concat.core.dest %>',
},

core: {
src: ['<%= lib_files.core %>'],
dest: '<%= build_dir %>/angular-growl.js'
},

css: {
options: {
banner: '<%= meta.banner %>'
},
src: ['<%= lib_files.css %>'],
dest: '<%= build_dir %>/angular-growl.css'
}
},

Expand Down Expand Up @@ -150,6 +158,7 @@ module.exports = function (grunt) {

grunt.registerTask('build:core', [
'concat:core',
'concat:css',
'ngmin:core',
'concat:banner',
'uglify:core',
Expand All @@ -160,4 +169,4 @@ module.exports = function (grunt) {
grunt.registerTask('dev', ['jshint', 'karma:unit', 'watch:livereload']);

require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-growl-v2",
"version": "0.6.0",
"version": "0.6.1",
"description": "growl like notifications for angularJS projects, using bootstrap alert classes",
"repository": {
"type": "git",
Expand Down

0 comments on commit 61caa54

Please sign in to comment.