Pman.Tab.CoreOAuthClient.bjs
authorEdward <edward@roojs.com>
Wed, 25 Jun 2014 04:59:38 +0000 (12:59 +0800)
committerEdward <edward@roojs.com>
Wed, 25 Jun 2014 04:59:38 +0000 (12:59 +0800)
Pman.Tab.CoreOAuthClient.js

Pman.Tab.CoreOAuthClient.bjs
Pman.Tab.CoreOAuthClient.js

index 177a700..7e34bad 100644 (file)
@@ -94,7 +94,7 @@
                                                 },
                                                 {
                                                     "listeners": {
-                                                        "|click": "function ()\n{   \n    var cs = _this.grid.getSelectionModel().getSelectedCell();\n    if (!cs) {\n        Roo.MessageBox.alert(\"Error\", \"Select a cell\");\n        return;\n    }\n    _this.grid.stopEditing();\n \n    var r = _this.grid.ds.getAt(cs[0]);\n    \n    Roo.log(r);\n   \n}"
+                                                        "|click": "function ()\n{   \n    var cs = _this.grid.getSelectionModel().getSelectedCell();\n    if (!cs) {\n        Roo.MessageBox.alert(\"Error\", \"Select a cell\");\n        return;\n    }\n    _this.grid.stopEditing();\n \n    var r = _this.grid.ds.getAt(cs[0]);\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Core_oauth_clients',\n        method : 'POST',\n        params : {\n            _delete : r.data.id\n        },\n        success : function(res) {\n            _this.grid.footer.onClick('refresh');\n        }\n    });\n   \n}"
                                                     },
                                                     "cls": "x-btn-text-icon",
                                                     "text": "Remove",
index e0f7a15..08758a9 100644 (file)
@@ -170,7 +170,16 @@ Pman.Tab.CoreOAuthClient = new Roo.XComponent({
                                              
                                                 var r = _this.grid.ds.getAt(cs[0]);
                                                 
-                                                Roo.log(r);
+                                                new Pman.Request({
+                                                    url : baseURL + '/Roo/Core_oauth_clients',
+                                                    method : 'POST',
+                                                    params : {
+                                                        _delete : r.data.id
+                                                    },
+                                                    success : function(res) {
+                                                        _this.grid.footer.onClick('refresh');
+                                                    }
+                                                });
                                                
                                             }
                                         },