DataObjects/Core_person_signup.php
[Pman.Core] / Pman.Tab.CoreOAuthClient.bjs
index 2fe93e0..d39efd6 100644 (file)
@@ -51,7 +51,7 @@
                                         {
                                             "listeners": {
                                                 "beforeload": "function (_self, o){\n    o.params = o.params || {};\n\n}\n",
-                                                "update": "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n\n    if (!record.data.client_id.length || !record.data.client_secret.length) {\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Core_oauth_clients',\n        method : 'POST',\n        params : record.data,\n        success : function(res) {\n            _this.gird.footer.onClick('refresh');\n        }\n    });\n    \n}"
+                                                "update": "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n\n    if (!record.data.client_id.length || !record.data.client_secret.length) {\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Core_oauth_clients',\n        method : 'POST',\n        params : {\n            id : record.data.id,\n            client_id : record.data.client_id,\n            client_secret : record.data.client_secret,\n            redirect_uri : record.data.redirect_uri\n        },\n        success : function(res) {\n            _this.grid.footer.onClick('refresh');\n        }\n    });\n    \n}"
                                             },
                                             "*prop": "dataSource",
                                             "remoteSort": true,
@@ -84,7 +84,7 @@
                                             "items": [
                                                 {
                                                     "listeners": {
-                                                        "|click": "function()\n{\n    \n    var nr = _this.grid.ds.reader.newRow({\n        client_id : '',\n        client_secret : '',\n        redirect_uri : ''\n    });\n    \n    _this.grid.stopEditing();\n    _this.grid.ds.insert(_this.grid.ds.getCount(), nr); \n    _this.grid.startEditing(_this.grid.ds.getCount()-1, 1);\n}\n"
+                                                        "|click": "function()\n{\n    \n    var nr = _this.grid.ds.reader.newRow({\n        id : 0,\n        client_id : '',\n        client_secret : '',\n        redirect_uri : ''\n    });\n    \n    _this.grid.stopEditing();\n    _this.grid.ds.insert(_this.grid.ds.getCount(), nr); \n    _this.grid.startEditing(_this.grid.ds.getCount()-1, 0);\n}\n"
                                                     },
                                                     "cls": "x-btn-text-icon",
                                                     "text": "Add",
@@ -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    _this.grid.ds.remove(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    Roo.MessageBox.confirm(\"Confirm\", \"Are you sure you want to delete this client?\", function (v){\n        if (v != 'yes') {\n            return;\n        }\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",