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

Added clickedOverlay action #107

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions addon/components/modal-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export default Ember.Component.extend({
},

actions: {
clickedOverlay() {
if (this.get('clickOutsideToClose')) {
this.sendAction('close');
}
},
close() {
this.sendAction('close');
}
Expand Down
2 changes: 1 addition & 1 deletion addon/templates/current/components/modal-dialog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="{{wrapperClassNamesString}} {{wrapper-class}}">
{{#modal-dialog-overlay
classNameBindings='overlayClassNamesString translucentOverlay:translucent overlay-class'
action='close'
action='clickedOverlay'
}}
{{#ember-modal-dialog-positioned-container classNameBindings="containerClassNamesString targetAttachmentClass container-class"
targetAttachment=targetAttachment
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.3",
"ember-legacy-views": "0.2.0",
"ember-suave": "1.2.0",
"ember-suave": "1.2.3",
"ember-tether": "^0.1.3",
"ember-truth-helpers": "1.2.0",
"ember-try": "0.0.6",
Expand All @@ -57,4 +57,4 @@
"configPath": "tests/dummy/config",
"demoURL": "http://yapplabs.github.io/ember-modal-dialog/"
}
}
}
1 change: 1 addition & 0 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<script src="assets/dummy.js"></script>
<script src="testem.js"></script>
<script src="assets/test-loader.js"></script>
<script src="assets/tests.js"></script>

{{content-for 'body-footer'}}
{{content-for 'test-body-footer'}}
Expand Down