updated
This commit is contained in:
Vendored
+14
-3
@@ -1,11 +1,11 @@
|
||||
/** Notify.js - v0.0.1 - 2013/06/06
|
||||
/** Notify.js - v0.0.1 - 2013/06/11
|
||||
* http://notifyjs.com/
|
||||
* Copyright (c) 2013 Jaime Pillora - MIT
|
||||
*/
|
||||
(function(window,document,undefined) {
|
||||
'use strict';
|
||||
|
||||
var Notification, addStyle, coreStyle, createElem, defaults, getAnchorElement, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
|
||||
var Notification, addStyle, coreStyle, createElem, defaults, getAnchorElement, getStyle, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
pluginName = 'notify';
|
||||
@@ -61,8 +61,18 @@ stylePrefixes = {
|
||||
"border-radius": ["-webkit-", "-moz-"]
|
||||
};
|
||||
|
||||
getStyle = function(name) {
|
||||
return styles[name];
|
||||
};
|
||||
|
||||
addStyle = function(name, def) {
|
||||
var cssText, _ref;
|
||||
if (!name) {
|
||||
throw "Missing Style name";
|
||||
}
|
||||
if (!def) {
|
||||
throw "Missing Style definition";
|
||||
}
|
||||
if ((_ref = styles[name]) != null ? _ref.cssElem : void 0) {
|
||||
if (window.console) {
|
||||
console.warn("" + pluginName + ": overwriting style '" + name + "'");
|
||||
@@ -466,7 +476,8 @@ $.fn[pluginName] = function(data, options) {
|
||||
$.extend($[pluginName], {
|
||||
defaults: defaults,
|
||||
addStyle: addStyle,
|
||||
pluginOptions: pluginOptions
|
||||
pluginOptions: pluginOptions,
|
||||
getStyle: getStyle
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+14
-3
@@ -1,11 +1,11 @@
|
||||
/** Notify.js - v0.0.1 - 2013/06/06
|
||||
/** Notify.js - v0.0.1 - 2013/06/11
|
||||
* http://notifyjs.com/
|
||||
* Copyright (c) 2013 Jaime Pillora - MIT
|
||||
*/
|
||||
(function(window,document,undefined) {
|
||||
'use strict';
|
||||
|
||||
var Notification, addStyle, coreStyle, createElem, defaults, getAnchorElement, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
|
||||
var Notification, addStyle, coreStyle, createElem, defaults, getAnchorElement, getStyle, globalAnchors, hAligns, incr, inherit, insertCSS, mainPositions, opposites, parsePosition, pluginClassName, pluginName, pluginOptions, positions, realign, stylePrefixes, styles, vAligns,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
pluginName = 'notify';
|
||||
@@ -61,8 +61,18 @@ stylePrefixes = {
|
||||
"border-radius": ["-webkit-", "-moz-"]
|
||||
};
|
||||
|
||||
getStyle = function(name) {
|
||||
return styles[name];
|
||||
};
|
||||
|
||||
addStyle = function(name, def) {
|
||||
var cssText, _ref;
|
||||
if (!name) {
|
||||
throw "Missing Style name";
|
||||
}
|
||||
if (!def) {
|
||||
throw "Missing Style definition";
|
||||
}
|
||||
if ((_ref = styles[name]) != null ? _ref.cssElem : void 0) {
|
||||
if (window.console) {
|
||||
console.warn("" + pluginName + ": overwriting style '" + name + "'");
|
||||
@@ -466,7 +476,8 @@ $.fn[pluginName] = function(data, options) {
|
||||
$.extend($[pluginName], {
|
||||
defaults: defaults,
|
||||
addStyle: addStyle,
|
||||
pluginOptions: pluginOptions
|
||||
pluginOptions: pluginOptions,
|
||||
getStyle: getStyle
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+9
-1
@@ -101,8 +101,16 @@ coreStyle =
|
||||
stylePrefixes =
|
||||
"border-radius": ["-webkit-", "-moz-"]
|
||||
|
||||
getStyle = (name) ->
|
||||
styles[name]
|
||||
|
||||
addStyle = (name, def) ->
|
||||
|
||||
unless name
|
||||
throw "Missing Style name"
|
||||
unless def
|
||||
throw "Missing Style definition"
|
||||
|
||||
if styles[name]?.cssElem
|
||||
if window.console
|
||||
console.warn "#{pluginName}: overwriting style '#{name}'"
|
||||
@@ -511,7 +519,7 @@ $.fn[pluginName] = (data, options) ->
|
||||
@
|
||||
|
||||
#extra methods
|
||||
$.extend $[pluginName], { defaults, addStyle, pluginOptions }
|
||||
$.extend $[pluginName], { defaults, addStyle, pluginOptions, getStyle }
|
||||
|
||||
#when ready
|
||||
$ ->
|
||||
|
||||
Reference in New Issue
Block a user