Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove duplicate code.

  • Loading branch information...
commit 87ff76ebac01a0df260dc61435cafb6fefd0aa54 1 parent fae23cc
@hyphyphyph authored
Showing with 9 additions and 3 deletions.
  1. +9 −1 build/ui.js
  2. +0 −2  lib/components/confirmation/confirmation.js
View
10 build/ui.js
@@ -563,6 +563,14 @@ Confirmation.prototype.render = function(options){
actions.find('.cancel').click(function(e){
e.preventDefault();
self.emit('cancel');
+ if(self.async){
+ self.callback(false, function () {
+ self.hide();
+ });
+ }
+ else {
+ (self.callback(false) !== false && self.hide());
+ }
self.callback(false)
self.hide();
});
@@ -576,7 +584,7 @@ Confirmation.prototype.render = function(options){
});
}
else{
- self.callback(true) !== false && self.hide();
+ (self.callback(true) !== false && self.hide());
}
});
};
View
2  lib/components/confirmation/confirmation.js
@@ -129,8 +129,6 @@ Confirmation.prototype.render = function(options){
else {
(self.callback(false) !== false && self.hide());
}
- self.callback(false)
- self.hide();
});
actions.find('.ok').click(function(e){
Please sign in to comment.
Something went wrong with that request. Please try again.