Skip to content

Commit ef15fa6

Browse files
committed
Merge pull request #27 from stanlemon/develop
1.4.0
2 parents 3ab98df + f59c1c6 commit ef15fa6

20 files changed

+385
-410
lines changed

Gruntfile.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ module.exports = function(grunt) {
1313
}
1414
},
1515
},
16+
less: {
17+
jgrowl: {
18+
files: {
19+
"jquery.jgrowl.css": "less/jgrowl.less"
20+
}
21+
}
22+
},
1623
cssmin: {
17-
minify: {
24+
jgrowl: {
1825
expand: true,
1926
src: 'jquery.jgrowl.css',
2027
ext: '.jgrowl.min.css'
@@ -33,18 +40,22 @@ module.exports = function(grunt) {
3340
}
3441
},
3542
watch: {
36-
files: ['<%= jshint.files %>'],
37-
tasks: ['jshint', 'qunit']
43+
scripts: {
44+
files: ['jquery.jgrowl.js', 'less/*'],
45+
tasks: ['jshint', 'less', 'cssmin', 'uglify'],
46+
options: {
47+
spawn: false,
48+
},
49+
},
3850
}
3951
});
4052

4153
grunt.loadNpmTasks('grunt-contrib-uglify');
4254
grunt.loadNpmTasks('grunt-contrib-cssmin');
4355
grunt.loadNpmTasks('grunt-contrib-jshint');
4456
grunt.loadNpmTasks('grunt-contrib-watch');
57+
grunt.loadNpmTasks('grunt-contrib-less');
4558

4659
grunt.registerTask('test', ['jshint']);
47-
48-
grunt.registerTask('default', ['jshint', 'uglify', 'cssmin']);
49-
60+
grunt.registerTask('default', ['jshint', 'uglify', 'less', 'cssmin']);
5061
};

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# jGrowl
22
jGrowl is a jQuery plugin that raises unobtrusive messages within the browser, similar to the way that OS X's Growl Framework works. The idea is simple, deliver notifications to the end user in a noticeable way that doesn't obstruct the work flow and yet keeps the user informed.
33

4+
## Installation
5+
jGrowl can be added to your project using package managers like bower and npm or directly into your html using cdnjs, as well as the good old fashioned copy-paste into your project directory.
6+
7+
Use cdnjs:
8+
9+
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js" />
10+
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js"></script>
11+
12+
Install with bower
13+
14+
bower install https://github.com/stanlemon/jGrowl.git#master
15+
16+
Install with
17+
18+
npm install jgrowl
19+
420
## Example usages
521
// Sample 1
622
$.jGrowl("Hello world!");

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jGrowl",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"homepage": "https://github.com/stanlemon/jGrowl",
55
"authors": [
66
"Stan Lemon <stosh1985@gmail.com>"

examples/bootstrap.html

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta name="description" content="">
8+
<meta name="author" content="">
9+
10+
<title>jGrowl and Bootstrap</title>
11+
12+
<link rel="stylesheet" href="../jquery.jgrowl.css" type="text/css"/>
13+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
14+
15+
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
16+
<!--[if lt IE 9]>
17+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
18+
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
19+
<![endif]-->
20+
21+
<style>
22+
body {
23+
padding-top: 50px;
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
<div id="jGrowl-container1" class="jGrowl top-right"></div>
30+
31+
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
32+
<div class="container">
33+
<div class="navbar-header">
34+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
35+
<span class="sr-only">Toggle navigation</span>
36+
<span class="icon-bar"></span>
37+
<span class="icon-bar"></span>
38+
<span class="icon-bar"></span>
39+
</button>
40+
<a class="navbar-brand" href="#">jGrowl</a>
41+
</div>
42+
<div class="collapse navbar-collapse">
43+
<ul class="nav navbar-nav">
44+
<li class="active"><a href="#">Home</a></li>
45+
<li><a href="#about">About</a></li>
46+
<li><a href="#contact">Contact</a></li>
47+
</ul>
48+
</div><!--/.nav-collapse -->
49+
</div>
50+
</div>
51+
52+
<div class="container">
53+
54+
<div>
55+
<h1>jGrowl and Bootstrap</h1>
56+
<p class="lead">This is a Bootstrap starter template with jGrowl integrated. As you can see it's extremely easy to make jGrowl look and feel like part of Bootstrap.</p>
57+
</div>
58+
<div id="jGrowl-container2" class="jGrowl"></div>
59+
</div><!-- /.container -->
60+
61+
62+
<!-- Bootstrap core JavaScript
63+
================================================== -->
64+
<!-- Placed at the end of the document so the pages load faster -->
65+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
66+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
67+
<script type="text/javascript" src="../jquery.jgrowl.js"></script>
68+
<script type="text/javascript">
69+
(function($){
70+
$(function(){
71+
$.jGrowl.defaults.closerTemplate = '<div class="alert alert-info">Close All</div>';
72+
73+
var alertTypes = ['success', 'info', 'warning', 'danger'];
74+
75+
for (var i=0; i<10; i++) {
76+
setTimeout(function(){
77+
var alertType = alertTypes[Math.floor(Math.random()*alertTypes.length)];
78+
79+
$('#jGrowl-container1').jGrowl({
80+
header: alertType.substring(0, 1).toUpperCase() + alertType.substring(1) + ' Notification',
81+
message: 'Hello world ',
82+
group: 'alert-' + alertType,
83+
life: 5000
84+
});
85+
}, i*2000);
86+
}
87+
});
88+
})(jQuery);
89+
</script>
90+
</body>
91+
</html>

examples/iphone.png

-9.41 KB
Binary file not shown.

examples/jgrowl-pool.html

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)