Permalink
Browse files

add confirm for deleting vaults

  • Loading branch information...
1 parent 3b0790d commit c44126a782b998512bfbf8c331c28dd1856a0b90 @kevinpet committed Dec 23, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 app/assets/javascripts/controllers.js.erb
@@ -62,7 +62,6 @@ function VaultsCtrl(Blob, Aes) {
this.resource = new Blob();
}
}
- Vault.prototype.name = "Untitled";
Vault.prototype.locked = true;
Vault.prototype.lock = function() {
if (this.locked) {
@@ -149,8 +148,10 @@ function VaultsCtrl(Blob, Aes) {
}
}
this.remove = function(vault) {
- this.vaults.splice(this.vaults.indexOf(vault),1);
- vault.resource.$delete();
+ if (confirm("Permanently remove '" + vault.resource.name + "'?")) {
+ this.vaults.splice(this.vaults.indexOf(vault),1);
+ vault.resource.$delete();
+ }
}
this.lock = function(vault) {
vault.lock();

0 comments on commit c44126a

Please sign in to comment.