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

stop click event from propagating #8

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
bdebd2e
start to move over to DEA custom API and params
pbojinov Mar 28, 2014
d732cc8
include dependencies in bower file
pbojinov Mar 28, 2014
387a4c3
implement text notification html
pbojinov Mar 28, 2014
10ab31c
add example of text notification
pbojinov Mar 28, 2014
8a65096
add image notification template
pbojinov Mar 28, 2014
2be9090
add open sans as default font-face
pbojinov Mar 31, 2014
7bcb621
working version, need to change API again
pbojinov Mar 31, 2014
1a5dc2c
clean up the demo form
pbojinov Mar 31, 2014
e142074
clean up the demo form
pbojinov Mar 31, 2014
922e3e0
change namespace to DEA
pbojinov Mar 31, 2014
be0978a
update rest of API
pbojinov Mar 31, 2014
9097503
start sending everything to notification from options
pbojinov Mar 31, 2014
db057a8
move over notifications html to handlebar templates
pbojinov Apr 2, 2014
65f339b
redesign and implement new client UI, migrate over client interface t…
pbojinov Apr 3, 2014
1fe46f3
remove all the flatui redesign, lets keep it simple KISS
pbojinov Apr 3, 2014
5fdba08
forgot jquery
pbojinov Apr 3, 2014
dced59f
fix notification window to expand to content size, pretty much 100% f…
pbojinov Apr 3, 2014
6bfd906
dynamic windows for text working, fixes #2
pbojinov Apr 3, 2014
624577f
fix icon from being cut off when no description is available. fixes #5
pbojinov Apr 3, 2014
5655114
fix #8 image notification height; fix #4 image notifications now impl…
pbojinov Apr 3, 2014
3b801ee
fix text notifications from breaking due to image loading code
pbojinov Apr 3, 2014
0b25900
oops, wrong param in the options.type
pbojinov Apr 3, 2014
b31484c
notification event target and id is availabe in the create callback
pbojinov Apr 9, 2014
03cb518
got the events working and commented
pbojinov Apr 9, 2014
8a166d8
ignore media files
pbojinov Apr 10, 2014
232cb53
fixes #1 distinguish button clicks, add close notification api and bu…
pbojinov Apr 10, 2014
4ebf322
close previous notification when creating new one, fixes #3
pbojinov Apr 10, 2014
c133df8
add callback to dea.notifications.clear
pbojinov Apr 10, 2014
01882e8
remove notification id from create cb
pbojinov Apr 10, 2014
509bda0
update readme, remove id from cb
pbojinov Apr 10, 2014
69e6cf1
update readme
pbojinov Apr 10, 2014
8d2ba94
update readme
pbojinov Apr 10, 2014
7b69ce0
add Grunt for building executable, move over project to src
pbojinov Apr 15, 2014
577078f
update readme on how to build exec
pbojinov Apr 15, 2014
85c7428
Bug: Node-Webkit toolbar is visible in Popup on Windows
semmel May 16, 2014
80d2999
Exchanged demo images with liberally licensed HTML5 Logos
semmel May 16, 2014
7335a6e
Typo in pathname
semmel May 16, 2014
76d306c
Merge pull request #11 from semmel/master
pbojinov May 20, 2014
f03da1e
trying out a different name, probably going to change. add banner and…
pbojinov May 20, 2014
63ddc50
add link to documentation on the front
pbojinov May 20, 2014
2c4a65a
Update README.md
pbojinov May 20, 2014
885e9aa
Make the X a ×.
CWSpear Jun 5, 2014
0a962bf
Merge pull request #13 from CWSpear/patch-1
pbojinov Jun 5, 2014
368cec3
Prevent taskbar icon for the notification window
oronbz Jul 23, 2014
8936541
Merge pull request #14 from oronbz/patch-1
pbojinov Jul 29, 2014
5e2f7b3
Added *.iml (more JetBrains files) to ,gitignore
adam-lynch Aug 3, 2014
c2124e6
Added gulpfile which creates ZIPs up .nw file
adam-lynch Aug 3, 2014
5ca0c56
Checking in bower assets
adam-lynch Aug 3, 2014
ed103ef
Gulpfile uses node-webkit-builder to build .exe, etc.
adam-lynch Aug 3, 2014
8d5351c
Added note that >=0.9.2 is needed because of setShowInTaskbar
adam-lynch Aug 3, 2014
9c8b91c
Removed npm-debug.log
adam-lynch Aug 3, 2014
5501434
Renamed to nodeifications everywhere
adam-lynch Aug 3, 2014
a52b99e
Renamed .nw file to nodeifications.nw
adam-lynch Aug 3, 2014
e485f63
Update README.md
pbojinov Aug 5, 2014
a1a2f12
Merge branch 'gulp' of https://github.com/adam-lynch/nodeifications i…
adam-lynch Aug 5, 2014
8f07874
Marking as private in package.json
adam-lynch Aug 5, 2014
b018fad
add new contrib
pbojinov Aug 5, 2014
6c3d713
add commit_images to gitignore
pbojinov Aug 5, 2014
2717563
Merge branch 'gulp'
pbojinov Aug 6, 2014
89b174c
update readme instructions for running demo app; rename css to make n…
pbojinov Aug 6, 2014
6fec0a3
Update README.md
pbojinov Aug 6, 2014
6c283a0
Update README.md
pbojinov Aug 6, 2014
b845cdd
Update README.md
pbojinov Oct 29, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
desktop-notify.nw
*.nw
.idea/
*.iml
media/
node_modules/
webkitbuilds/
cache/
*.logcommit_images
commit_images/
66 changes: 50 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,68 @@
##NW Desktop Notifications
# Nodeifications

A simple system for creating desktop notifications for [node-webkit](https://github.com/rogerwang/node-webkit) applications.
Simple cross platform desktop notifications for [node-webkit](https://github.com/rogerwang/node-webkit) apps, inspired by [Chrome Notifications](https://developer.chrome.com/apps/notifications).

![Nodeifications Intro Banner](doc/images/nodeifications-wide.jpg)

##Usage
## [API Documentation](https://github.com/pbojinov/nodeifications/wiki) on the wiki

By including nw-desktop-notifications.js and nw-desktop-notifications.html in your project you can create desktop notifications for your application by calling:
## Getting Started

window.LOCAL_NW.desktopNotifications.notify(iconUrl, title, content, clickHandlerCallback);
1. Include the javascript `nodeifications.js` in your application

2. Include the HTML template `nodeifications.html` in your application

##Running the demo
3. Create a notification using the API: `DEA.notifications.create(options, callback);`

(1) Clone this project
## Running the demo app

(2) cd into the project
1. Clone this project

(3) make the nw zip file
git clone [email protected]:pbojinov/nodeifications.git

./make-nw
2. Run `npm install`

(4) Run the nw application
3. Make the nw zip file by running the default gulp task

nw desktop-notify.nw
gulp

(This assumes you have nw aliased to node-webkit)
4. `cd` into the project `/src`

alias nw='~/Applications/node-webkit.app/Contents/MacOS/node-webkit'
5. Run the nw application

nodewebkit nodeifications.nw

##Update the Look-and-Feel
## Building for Production

You can update the look and feel of the desktop notifications by updating the css embedded (via style tag) in nw-desktop-notifications.html.
From the root of the project:

npm install

gulp build

Then run the executable/app from inside `/webkitbuilds`

## Application Flow

1. Call the API to create a new notification.

2. `nodeifications.js` creates the HTML template using the user provided content

3. `nodeifications.js` created the notification and appends the template to the created notification window.

4. `nodeifications.html` is simply the container for the content. It handles closing itself and sending off interaction events back to the parent who initiated the notification.

## Notes

- node-webkit version `0.9.2` or later is required for this example (because [`Window.setShowInTaskbar`](https://github.com/rogerwang/node-webkit/wiki/Window#windowsetshowintaskbarboolean-show) is used).


## Notification Types

### Text

![Text Notification](doc/images/text_notification.png)

### Image

![Image Notification](doc/images/image_notification.png)
Binary file removed desktop-notify.png
Binary file not shown.
Binary file added doc/images/image_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/nodeifications-wide.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/text_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();

var paths = {
sourceFiles: './src/**/**'
};

// setup up node-webkit-builder
var nw = new (require('node-webkit-builder'))({
buildDir: './webkitbuilds',
files: paths.sourceFiles,
platforms: ['win', 'osx', 'linux32', 'linux64']
});

// tasks:

gulp.task('default', ['generate-nw']);

gulp.task('build', function(done){
nw.build()
.then(done)
.catch(done);
});

gulp.task('generate-nw', function(){
return gulp.src(paths.sourceFiles, {dot: true})
.pipe($.zip('nodeifications.nw'))
.pipe(gulp.dest('./src'));
});
70 changes: 0 additions & 70 deletions index.html

This file was deleted.

2 changes: 0 additions & 2 deletions make-nw.sh

This file was deleted.

129 changes: 0 additions & 129 deletions nw-desktop-notifications.html

This file was deleted.

Loading