fixed className shortcut on element notification - closes #11
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ module.exports = (grunt) ->
|
|||||||
|
|
||||||
concat:
|
concat:
|
||||||
combined:
|
combined:
|
||||||
src: ['dist/<%= pkg.name %>.js', 'dist/styles/*.js']
|
src: ['dist/<%= pkg.name %>.js', 'dist/styles/bootstrap/<%= pkg.name %>-bootstrap.js']
|
||||||
dest: 'dist/<%= pkg.name %>-combined.js'
|
dest: 'dist/<%= pkg.name %>-combined.js'
|
||||||
|
|
||||||
uglify:
|
uglify:
|
||||||
|
|||||||
Vendored
+5
-6
@@ -1,6 +1,6 @@
|
|||||||
/** Notify.js - v0.3.1 - 2013/07/05
|
/** Notify.js - v0.3.1 - 2014/02/06
|
||||||
* http://notifyjs.com/
|
* http://notifyjs.com/
|
||||||
* Copyright (c) 2013 Jaime Pillora - MIT
|
* Copyright (c) 2014 Jaime Pillora - MIT
|
||||||
*/
|
*/
|
||||||
(function(window,document,$,undefined) {
|
(function(window,document,$,undefined) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@@ -303,9 +303,8 @@ Notification = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Notification.prototype.setGlobalPosition = function() {
|
Notification.prototype.setGlobalPosition = function() {
|
||||||
var align, anchor, css, key, main, pAlign, pMain, position;
|
var align, anchor, css, key, main, pAlign, pMain, _ref;
|
||||||
position = this.getPosition();
|
_ref = this.getPosition(), pMain = _ref[0], pAlign = _ref[1];
|
||||||
pMain = position[0], pAlign = position[1];
|
|
||||||
main = positions[pMain];
|
main = positions[pMain];
|
||||||
align = positions[pAlign];
|
align = positions[pAlign];
|
||||||
key = pMain + "|" + pAlign;
|
key = pMain + "|" + pAlign;
|
||||||
@@ -451,7 +450,7 @@ Notification = (function() {
|
|||||||
if ($.isPlainObject(options)) {
|
if ($.isPlainObject(options)) {
|
||||||
$.extend(this.options, options);
|
$.extend(this.options, options);
|
||||||
} else if ($.type(options) === 'string') {
|
} else if ($.type(options) === 'string') {
|
||||||
this.options.color = options;
|
this.options.className = options;
|
||||||
}
|
}
|
||||||
if (this.container && !data) {
|
if (this.container && !data) {
|
||||||
this.show(false);
|
this.show(false);
|
||||||
|
|||||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Vendored
+5
-6
@@ -1,6 +1,6 @@
|
|||||||
/** Notify.js - v0.3.1 - 2013/07/05
|
/** Notify.js - v0.3.1 - 2014/02/06
|
||||||
* http://notifyjs.com/
|
* http://notifyjs.com/
|
||||||
* Copyright (c) 2013 Jaime Pillora - MIT
|
* Copyright (c) 2014 Jaime Pillora - MIT
|
||||||
*/
|
*/
|
||||||
(function(window,document,$,undefined) {
|
(function(window,document,$,undefined) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@@ -303,9 +303,8 @@ Notification = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Notification.prototype.setGlobalPosition = function() {
|
Notification.prototype.setGlobalPosition = function() {
|
||||||
var align, anchor, css, key, main, pAlign, pMain, position;
|
var align, anchor, css, key, main, pAlign, pMain, _ref;
|
||||||
position = this.getPosition();
|
_ref = this.getPosition(), pMain = _ref[0], pAlign = _ref[1];
|
||||||
pMain = position[0], pAlign = position[1];
|
|
||||||
main = positions[pMain];
|
main = positions[pMain];
|
||||||
align = positions[pAlign];
|
align = positions[pAlign];
|
||||||
key = pMain + "|" + pAlign;
|
key = pMain + "|" + pAlign;
|
||||||
@@ -451,7 +450,7 @@ Notification = (function() {
|
|||||||
if ($.isPlainObject(options)) {
|
if ($.isPlainObject(options)) {
|
||||||
$.extend(this.options, options);
|
$.extend(this.options, options);
|
||||||
} else if ($.type(options) === 'string') {
|
} else if ($.type(options) === 'string') {
|
||||||
this.options.color = options;
|
this.options.className = options;
|
||||||
}
|
}
|
||||||
if (this.container && !data) {
|
if (this.container && !data) {
|
||||||
this.show(false);
|
this.show(false);
|
||||||
|
|||||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"source": "~/.grunt-sources/web",
|
"source": "~/.grunt-sources/web",
|
||||||
"repo": "https://github.com/jpillora/grunt-source-web.git",
|
"repo": "https://github.com/jpillora/grunt-source-web",
|
||||||
"output": {
|
"output": {
|
||||||
"html": "../index.html"
|
"html": "../index.html"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
| Contributing more styles is easy!
|
| Contributing more styles is easy!
|
||||||
ol
|
ol
|
||||||
li.
|
li.
|
||||||
Click <a href="https://github.com/jpillora/notifyjs/new/master/src/styles" target="_blank">this</a> link
|
Click <a href="https://github.com/jpillora/notifyjs/new/gh-pages/src/styles" target="_blank">this</a> link
|
||||||
li Sign into GitHub (if you're not already)
|
li Sign into GitHub (if you're not already)
|
||||||
li Click 'Fork'
|
li Click 'Fork'
|
||||||
li Enter your new style
|
li Enter your new style
|
||||||
|
|||||||
@@ -249,7 +249,7 @@
|
|||||||
|
|
||||||
p
|
p
|
||||||
ul.square
|
ul.square
|
||||||
li: a(href="https://github.com/jpillora/notifyjs/tree/master/dist/styles/bootstrap", target="_blank") bootstrap
|
li: a(href="https://github.com/jpillora/notifyjs/tree/gh-pages/dist/styles/bootstrap", target="_blank") bootstrap
|
||||||
ul.square
|
ul.square
|
||||||
li: a(href="https://github.com/jpillora/notifyjs/tree/master/dist/styles/metro", target="_blank") metro
|
li: a(href="https://github.com/jpillora/notifyjs/tree/gh-pages/dist/styles/metro", target="_blank") metro
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -470,4 +470,4 @@ $.notify({
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+2
-4
@@ -329,9 +329,7 @@ class Notification
|
|||||||
|
|
||||||
|
|
||||||
setGlobalPosition: () ->
|
setGlobalPosition: () ->
|
||||||
position = @getPosition()
|
[pMain, pAlign] = @getPosition()
|
||||||
|
|
||||||
[pMain, pAlign] = position
|
|
||||||
|
|
||||||
main = positions[pMain]
|
main = positions[pMain]
|
||||||
align = positions[pAlign]
|
align = positions[pAlign]
|
||||||
@@ -481,7 +479,7 @@ class Notification
|
|||||||
$.extend @options, options
|
$.extend @options, options
|
||||||
#shortcut special case
|
#shortcut special case
|
||||||
else if $.type(options) is 'string'
|
else if $.type(options) is 'string'
|
||||||
@options.color = options
|
@options.className = options
|
||||||
|
|
||||||
if @container and not data
|
if @container and not data
|
||||||
@show false
|
@show false
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
* Styles in CoffeeScript go here, which will be compiled into `dist/styles`
|
||||||
|
* Styles in JavaScript can go straight in `dist/styles/`
|
||||||
Reference in New Issue
Block a user