X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Dialog.CoreNotifyRecur.js;h=cd0cc568ef9a9f023c264c51127ca4dbddd9faf9;hb=785ac58794401417fd53388436e399c4bb044be9;hp=22034fa8e660ed7e85f1bba2632c45b21aff6f89;hpb=d5944d2b6158a352e164dddc76753ca425421aa2;p=Pman.Core diff --git a/Pman.Dialog.CoreNotifyRecur.js b/Pman.Dialog.CoreNotifyRecur.js index 22034fa8..cd0cc568 100644 --- a/Pman.Dialog.CoreNotifyRecur.js +++ b/Pman.Dialog.CoreNotifyRecur.js @@ -239,8 +239,27 @@ Pman.Dialog.CoreNotifyRecur = { listeners : { click : function() { - var s = _this.grid.getSelectionModel().getSelected(); - Roo.log(s); + _this.grid.stopEditing(); + var s = _this.grid.selModel.getSelectedCell() + if (!s) { + Roo.MessageBox.alert("Error", "Select row"); + return; + } + + new Pman.Request({ + url : baseURL + '/Roo/core_notify_recur', + method : 'POST', + params : { + _delete : _this.grid.ds.getAt(s[0]).data.id, + }, + success : function() { + _this.grid.ds.load({}); + }, + failure : function() { + Roo.MessageBox.alert("Error", "Deleting failed - try reloading"); + } + }); + } }, cls : 'x-btn-text-icon',