Skip to content

Commit

Permalink
updating package.json and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmit committed Jul 24, 2015
1 parent 3fb8dd7 commit 0993065
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ember-onbeforeunload

This README outlines the details of collaborating on this Ember addon.
An addon to conditionally prompt the user when transitioning between routes or closing the browser.

## Implementing

Expand All @@ -9,13 +9,15 @@ This README outlines the details of collaborating on this Ember addon.
import Ember from 'ember';

export default Ember.Controller.extend({
// `isDirty` on the current route's controller
// is the property which determines whether or not to
// prompt a confirmation dialog. Normally, this would be
// checking if the controller's model is dirty
/*
`isDirty` on the current route's controller
is the property which determines whether or not to
prompt a confirmation dialog. Normally, this would be
checking if the controller's model is dirty
*/
isDirty: Ember.computed('model', function() {
return this.get('model.isDirty')
})
return this.get('model.isDirty')
})
});
```

Expand All @@ -25,10 +27,10 @@ import Ember from 'ember';
import ConfirmationMixin from 'ember-onbeforeunload/confirmation';

export default Ember.Route.extend(ConfirmationMixin, {
confirmationMessage(model) {
const name = Ember.get(model, 'name');
return `You have unsaved changes for ${name}, are you sure you want to continue?`;
}
confirmationMessage(model) {
const name = Ember.get(model, 'name');
return `You have unsaved changes for ${name}, are you sure you want to continue?`;
}
});
```

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember-onbeforeunload",
"version": "0.0.1",
"description": "An addon to conditionally prompt the user when transitioning between routes and/or closing the browser.",
"version": "0.1.0",
"description": "An addon to conditionally prompt the user when transitioning between routes or closing the browser.",
"directories": {
"doc": "doc",
"test": "tests"
Expand All @@ -11,11 +11,11 @@
"build": "ember build",
"test": "ember try:testall"
},
"repository": "",
"repository": "https://github.com/jasonmit/ember-onbeforeunload",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"author": "Jason Mitchell <jason.mitchell.w@gmail.com>",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
Expand Down

0 comments on commit 0993065

Please sign in to comment.