Delete documents

This commit is contained in:
Ruud
2014-02-12 08:16:10 +01:00
parent 96e8a909d8
commit a6be59bbea
2 changed files with 8 additions and 3 deletions
+5 -2
View File
@@ -55,12 +55,15 @@
(e).stop();
if(confirm('Are you sure?')){
var a = this;
new Request.JSON({
'url': api_base + 'database.document.delete',
'data': this.get('data-id'),
'data': {
'id': a.get('data-id')
},
'onSuccess': function(){
console.log(arguments);
a.getParent('tr').destroy();
}
}).send();
}