Skip to content

Commit

Permalink
Merge pull request #11 from niftylettuce/master
Browse files Browse the repository at this point in the history
Added iOS support and .fade.in classes. Part 1 of 2 for Pull request #11.
  • Loading branch information
JasonGiedymin committed Jul 1, 2012
2 parents fa826fe + 421631b commit 0ace87f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions index.js
Expand Up @@ -5,16 +5,17 @@ module.exports = function(req, res) {
messages = req.flash();
types = Object.keys(messages);
len = types.length;
if (!len) return '';
if (!len) return '<div id="messages"></div>';
buf.push('<div id="messages">');
for (i = 0; 0 <= len ? i < len : i > len; 0 <= len ? i++ : i--) {
type = types[i];
msgs = messages[type];
if (msgs != null) {
if (msgs !== null) {
for (j = 0, _ref = msgs.length; 0 <= _ref ? j < _ref : j > _ref; 0 <= _ref ? j++ : j--) {
msg = msgs[j];
buf.push("<div class=\"alert alert-" + type + "\">");
buf.push("<a class=\"close\" data-dismiss=\"alert\">&times;</a>");
buf.push("<div class=\"alert alert-" + type + " fade in\">");
buf.push('<button type="button" class="close" data-dismiss="alert">&times;</button>');
// buf.push("<a href=\"#\" class=\"close\" data-dismiss=\"alert\">&times;</a>");
buf.push(msg);
buf.push("</div>");
}
Expand Down
5 changes: 4 additions & 1 deletion package.json
@@ -1,7 +1,10 @@
{ "name": "express-messages-bootstrap"
, "description": "Express flash notification message rendering compatible with Twitter's Bootstrap v2.0+. Based on TJ Holowaychuk's express-messages."
, "version": "0.0.9"
, "version": "0.1.0"
, "author": "Jason Giedymin <jasong@apache.org>"
, "contributors": [
{ "name": "Nick Baugh", "email": "niftylettuce@gmail.com" }
]
, "keywords": ["express", "bootstrap", "flash"]
, "repository": "git://github.com/JasonGiedymin/express-messages-bootstrap"
, "main": "index"
Expand Down

0 comments on commit 0ace87f

Please sign in to comment.