Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add confirm for deleting vaults

  • Loading branch information...
commit c44126a782b998512bfbf8c331c28dd1856a0b90 1 parent 3b0790d
@kevinpet authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 app/assets/javascripts/controllers.js.erb
View
7 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();
Please sign in to comment.
Something went wrong with that request. Please try again.