Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing namespace option and removing unused local variables #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Notify.js
=====

> A simple, yet fully customizable notification library
> A simple, yet fully customizable notification library (Fork that includes namespace option)

See demos and full documentation at:

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notifyjs",
"version": "0.4.1",
"version": "0.4.3",
"homepage": "http://notifyjs.com/",
"authors": [
"Jaime Pillora <dev@jpillora.com>"
Expand Down
8 changes: 5 additions & 3 deletions dist/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
};

var incr = function(obj, pos, val) {
var opp, temp;
var opp;
if (typeof val === "string") {
val = parseInt(val, 10);
} else if (typeof val !== "number") {
Expand All @@ -243,7 +243,6 @@
return;
}
opp = positions[opposites[pos.charAt(0)]];
temp = pos;
if (obj[opp] !== undefined) {
pos = positions[opp.charAt(0)];
val = -val;
Expand Down Expand Up @@ -281,6 +280,9 @@
this.options = inherit(pluginOptions, $.isPlainObject(options) ? options : {});
this.loadHTML();
this.wrapper = $(coreStyle.html);
if (this.options.namespace) {
$(this.wrapper).addClass(this.options.namespace);
}
if (this.options.clickToHide) {
this.wrapper.addClass(pluginClassName + "-hidable");
}
Expand Down Expand Up @@ -552,7 +554,7 @@
if (prev) {
prev.destroy();
}
var curr = new Notification($(this), data, options);
new Notification($(this), data, options);
});
return this;
};
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Notify.js",
"name": "notifyjs-browser",
"version": "0.4.2",
"title": "Notify.js - Fork that includes namespace",
"name": "@oizulain/notifyjs-browser",
"version": "0.4.3",
"author": {
"name": "Jaime Pillora"
},
Expand All @@ -12,14 +12,18 @@
"email": "me@evancarroll.com"
}
],
"repository" : {
"type" : "git",
"url" : "https://github.com/oizulain/notifyjs"
},
"homepage": "http://notifyjs.com/",
"license": "MIT",
"main": "dist/notify.js",
"scripts": {
"test": "npm run lint",
"lint": "jshint ./dist/*.js"
},
"peerDependencies": {
"dependencies": {
"jquery": ">=1.11.0"
},
"devDependencies": {
Expand Down