Skip to content

Commit

Permalink
Rename 'closeOnAnyClick' property
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 16, 2015
1 parent d947661 commit 7973a12
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Or:
You can pass additional options with the `data-remodal-options` attribute.
```html
<div class="remodal" data-remodal-id="modal"
data-remodal-options="hashTracking: false, closeOnAnyClick: false">
data-remodal-options="hashTracking: false, closeOnOutsideClick: false">

<button data-remodal-action="close" class="remodal-close"></button>
<h1>Remodal</h1>
Expand Down Expand Up @@ -112,7 +112,7 @@ If true, closes the modal window after clicking the cancel button.

If true, closes the modal window after pressing the ESC key.

#### closeOnAnyClick
#### closeOnOutsideClick
`Default: true`

If true, closes the modal window by clicking anywhere on the page.
Expand Down
2 changes: 1 addition & 1 deletion examples/index-zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h2>Another one window</h2>
// closeOnConfirm: true,
// closeOnCancel: true,
// closeOnEscape: true,
// closeOnAnyClick: true,
// closeOnOutsideClick: true,
// modifier: ''
// }
// };
Expand Down
2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h2>Another one window</h2>
// closeOnConfirm: true,
// closeOnCancel: true,
// closeOnEscape: true,
// closeOnAnyClick: true,
// closeOnOutsideClick: true,
// modifier: ''
// }
// };
Expand Down
4 changes: 2 additions & 2 deletions src/remodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
closeOnConfirm: true,
closeOnCancel: true,
closeOnEscape: true,
closeOnAnyClick: true,
closeOnOutsideClick: true,
modifier: ''
}, global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.DEFAULTS);

Expand Down Expand Up @@ -534,7 +534,7 @@
return;
}

if (remodal.settings.closeOnAnyClick) {
if (remodal.settings.closeOnOutsideClick) {
remodal.close();
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/remodal.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<div class="remodal" data-remodal-id="modal2"
data-remodal-options="hashTracking: false,
closeOnConfirm:false,closeOnCancel: false, closeOnEscape: false , closeOnAnyClick: false,
closeOnConfirm:false,closeOnCancel: false, closeOnEscape: false , closeOnOutsideClick: false,
modifier : without-animation with-test-class">

<a data-remodal-action="close" class="remodal-close"></a>
Expand Down
4 changes: 2 additions & 2 deletions test/remodal_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
closeOnConfirm: false,
closeOnCancel: false,
closeOnEscape: false,
closeOnAnyClick: false,
closeOnOutsideClick: false,
modifier: 'without-animation with-test-class'
}, 'options are correctly parsed');
});
Expand Down Expand Up @@ -371,7 +371,7 @@
remodal.open();
});

QUnit.asyncTest('"closeOnAnyClick" option', function(assert) {
QUnit.asyncTest('"closeOnOutsideClick" option', function(assert) {
var $wrapper = $('[data-remodal-id=modal2]').parent();
var remodal = $wrapper.children().remodal();

Expand Down

0 comments on commit 7973a12

Please sign in to comment.