From 068ac887cf906c899520334b5e1acbe73e33ccb3 Mon Sep 17 00:00:00 2001 From: oizulain Date: Thu, 23 Jun 2016 13:27:56 +0200 Subject: [PATCH 1/2] Introducing namespace option and removing unused local variables --- dist/notify.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/notify.js b/dist/notify.js index 3971640..942be4d 100644 --- a/dist/notify.js +++ b/dist/notify.js @@ -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") { @@ -243,7 +243,6 @@ return; } opp = positions[opposites[pos.charAt(0)]]; - temp = pos; if (obj[opp] !== undefined) { pos = positions[opp.charAt(0)]; val = -val; @@ -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"); } @@ -552,7 +554,7 @@ if (prev) { prev.destroy(); } - var curr = new Notification($(this), data, options); + new Notification($(this), data, options); }); return this; }; From b7a92764a6dc9d1818b7e3a32fd5553d80649e30 Mon Sep 17 00:00:00 2001 From: oizulain Date: Thu, 30 Jun 2016 12:51:54 +0200 Subject: [PATCH 2/2] Modifications for npm package --- README.md | 2 +- bower.json | 2 +- package.json | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 520f3de..dd8e07d 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/bower.json b/bower.json index 8f7529e..d1ce9f2 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "notifyjs", - "version": "0.4.1", + "version": "0.4.3", "homepage": "http://notifyjs.com/", "authors": [ "Jaime Pillora " diff --git a/package.json b/package.json index 7152b76..fade9de 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -12,6 +12,10 @@ "email": "me@evancarroll.com" } ], + "repository" : { + "type" : "git", + "url" : "https://github.com/oizulain/notifyjs" + }, "homepage": "http://notifyjs.com/", "license": "MIT", "main": "dist/notify.js", @@ -19,7 +23,7 @@ "test": "npm run lint", "lint": "jshint ./dist/*.js" }, - "peerDependencies": { + "dependencies": { "jquery": ">=1.11.0" }, "devDependencies": {