Skip to content

Commit

Permalink
Close swipeout on confirm-cancel using "data-close-on-cancel=true"
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Oct 10, 2015
1 parent 792f84e commit 4ce983e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/clicks.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,15 @@ app.initClickEvents = function () {
if (title) {
app.confirm(text, title, function () {
app.swipeoutDelete(clicked.parents('.swipeout'));
}, function () {
if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));
});
}
else {
app.confirm(text, function () {
app.swipeoutDelete(clicked.parents('.swipeout'));
}, function () {
if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));
});
}
}
Expand Down

0 comments on commit 4ce983e

Please sign in to comment.