minor fixes

This commit is contained in:
Jaime Pillora
2013-06-21 09:44:21 +10:00
parent 74c55d476e
commit 00013d1865
6 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -28,8 +28,8 @@ module.exports = (grunt) ->
src: 'dist/<%= pkg.name %>.js'
dest: '.'
wrapper: [
"<%= banner %>(function(window,document,undefined) {\n"
"\n}(window,document));"
"<%= banner %>(function(window,document,$,undefined) {\n"
"\n}(window,document,jQuery));"
]
concat:
@@ -58,7 +58,7 @@ module.exports = (grunt) ->
grunt.loadNpmTasks "grunt-contrib-concat"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadTasks "./node_modules/grunt-contrib-coffee/tasks"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-wrap"
# Default task.
+4 -4
View File
@@ -1,8 +1,8 @@
/** Notify.js - v0.0.1 - 2013/06/14
/** Notify.js - v0.0.1 - 2013/06/21
* http://notifyjs.com/
* Copyright (c) 2013 Jaime Pillora - MIT
*/
(function(window,document,undefined) {
(function(window,document,$,undefined) {
'use strict';
var Notification, addStyle, coreStyle, createElem, defaults, encode, getAnchorElement, getStyle, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
@@ -436,7 +436,7 @@ Notification = (function() {
if (!this.rawHTML) {
data = encode(data);
if (this.options.breakNewLines) {
data = data.replace(/\n/, '<br/>');
data = data.replace(/\n/g, '<br/>');
}
}
this.text.html(data);
@@ -506,7 +506,7 @@ $(function() {
});
});
}(window,document));
}(window,document,jQuery));
$.notify.addStyle("bootstrap", {
html: "<div>\n<span data-notify-text></span>\n</div>",
+2 -2
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -1,8 +1,8 @@
/** Notify.js - v0.0.1 - 2013/06/14
/** Notify.js - v0.0.1 - 2013/06/21
* http://notifyjs.com/
* Copyright (c) 2013 Jaime Pillora - MIT
*/
(function(window,document,undefined) {
(function(window,document,$,undefined) {
'use strict';
var Notification, addStyle, coreStyle, createElem, defaults, encode, getAnchorElement, getStyle, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
@@ -436,7 +436,7 @@ Notification = (function() {
if (!this.rawHTML) {
data = encode(data);
if (this.options.breakNewLines) {
data = data.replace(/\n/, '<br/>');
data = data.replace(/\n/g, '<br/>');
}
}
this.text.html(data);
@@ -506,4 +506,4 @@ $(function() {
});
});
}(window,document));
}(window,document,jQuery));
+2 -2
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -165,6 +165,7 @@ pluginOptions =
arrowShow: true
arrowSize: 5
breakNewLines: true
# autoReposition: true
elementPosition: 'bottom'
globalPosition: 'top right'
style: 'bootstrap'
@@ -191,7 +192,6 @@ defaults = (opts) ->
createElem = (tag) ->
$ "<#{tag}></#{tag}>"
# references to global anchor positions
globalAnchors = {}
@@ -478,7 +478,7 @@ class Notification
#escape
unless @rawHTML
data = encode(data)
data = data.replace(/\n/,'<br/>') if @options.breakNewLines
data = data.replace(/\n/g,'<br/>') if @options.breakNewLines
#update content
@text.html(data)