fixed className shortcut on element notification - closes #11
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ module.exports = (grunt) ->
|
||||
|
||||
concat:
|
||||
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'
|
||||
|
||||
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/
|
||||
* Copyright (c) 2013 Jaime Pillora - MIT
|
||||
* Copyright (c) 2014 Jaime Pillora - MIT
|
||||
*/
|
||||
(function(window,document,$,undefined) {
|
||||
'use strict';
|
||||
@@ -303,9 +303,8 @@ Notification = (function() {
|
||||
};
|
||||
|
||||
Notification.prototype.setGlobalPosition = function() {
|
||||
var align, anchor, css, key, main, pAlign, pMain, position;
|
||||
position = this.getPosition();
|
||||
pMain = position[0], pAlign = position[1];
|
||||
var align, anchor, css, key, main, pAlign, pMain, _ref;
|
||||
_ref = this.getPosition(), pMain = _ref[0], pAlign = _ref[1];
|
||||
main = positions[pMain];
|
||||
align = positions[pAlign];
|
||||
key = pMain + "|" + pAlign;
|
||||
@@ -451,7 +450,7 @@ Notification = (function() {
|
||||
if ($.isPlainObject(options)) {
|
||||
$.extend(this.options, options);
|
||||
} else if ($.type(options) === 'string') {
|
||||
this.options.color = options;
|
||||
this.options.className = options;
|
||||
}
|
||||
if (this.container && !data) {
|
||||
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/
|
||||
* Copyright (c) 2013 Jaime Pillora - MIT
|
||||
* Copyright (c) 2014 Jaime Pillora - MIT
|
||||
*/
|
||||
(function(window,document,$,undefined) {
|
||||
'use strict';
|
||||
@@ -303,9 +303,8 @@ Notification = (function() {
|
||||
};
|
||||
|
||||
Notification.prototype.setGlobalPosition = function() {
|
||||
var align, anchor, css, key, main, pAlign, pMain, position;
|
||||
position = this.getPosition();
|
||||
pMain = position[0], pAlign = position[1];
|
||||
var align, anchor, css, key, main, pAlign, pMain, _ref;
|
||||
_ref = this.getPosition(), pMain = _ref[0], pAlign = _ref[1];
|
||||
main = positions[pMain];
|
||||
align = positions[pAlign];
|
||||
key = pMain + "|" + pAlign;
|
||||
@@ -451,7 +450,7 @@ Notification = (function() {
|
||||
if ($.isPlainObject(options)) {
|
||||
$.extend(this.options, options);
|
||||
} else if ($.type(options) === 'string') {
|
||||
this.options.color = options;
|
||||
this.options.className = options;
|
||||
}
|
||||
if (this.container && !data) {
|
||||
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",
|
||||
"repo": "https://github.com/jpillora/grunt-source-web.git",
|
||||
"repo": "https://github.com/jpillora/grunt-source-web",
|
||||
"output": {
|
||||
"html": "../index.html"
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
| Contributing more styles is easy!
|
||||
ol
|
||||
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 Click 'Fork'
|
||||
li Enter your new style
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
|
||||
p
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
+2
-4
@@ -329,9 +329,7 @@ class Notification
|
||||
|
||||
|
||||
setGlobalPosition: () ->
|
||||
position = @getPosition()
|
||||
|
||||
[pMain, pAlign] = position
|
||||
[pMain, pAlign] = @getPosition()
|
||||
|
||||
main = positions[pMain]
|
||||
align = positions[pAlign]
|
||||
@@ -481,7 +479,7 @@ class Notification
|
||||
$.extend @options, options
|
||||
#shortcut special case
|
||||
else if $.type(options) is 'string'
|
||||
@options.color = options
|
||||
@options.className = options
|
||||
|
||||
if @container and not data
|
||||
@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