{
- "id": "roo-file-224",
- "name": "Pman.Tab.AdminOAuthClient",
- "parent": "Pman.Tab.Admin",
- "title": "",
- "path": "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminOAuthClient.bjs",
- "items": [
+ "name" : "Pman.Tab.AdminOAuthClient",
+ "parent" : "Pman.Tab.Admin",
+ "title" : "",
+ "path" : "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminOAuthClient.bjs",
+ "permname" : "",
+ "modOrder" : "900",
+ "strings" : {
+ "16f63df432feae9fab6840eabc9d3704" : "No Clients found",
+ "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
+ "76525f0f34b48475e5ca33f71d296f3b" : "Client ID",
+ "27499763cc523271e74f32ff4f740a7f" : "Redirect URI",
+ "1063e38cb53d94d386f21227fcd84717" : "Remove",
+ "0c95cb44ad29b66991e47d3e27fecadc" : "Oauth2 Clients",
+ "734082edf44417dd19cc65943aa65c36" : "Client Secret"
+ },
+ "items" : [
+ {
+ "region" : "center",
+ "xtype" : "NestedLayoutPanel",
+ "title" : "Oauth2 Clients",
+ "$ xns" : "Roo",
+ "items" : [
+ {
+ "xtype" : "BorderLayout",
+ "$ xns" : "Roo",
+ "* prop" : "layout",
+ "items" : [
+ {
+ "autoScroll" : false,
+ "xtype" : "LayoutRegion",
+ "$ xns" : "Roo",
+ "split" : true,
+ "* prop" : "center"
+ },
+ {
+ "listeners" : {
+ "|activate" : "function() {\n _this.panel = this;\n \n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
+ },
+ "fitToframe" : true,
+ "background" : true,
+ "region" : "center",
+ "title" : "Oauth2 Clients",
+ "xtype" : "GridPanel",
+ "fitContainer" : true,
+ "$ xns" : "Roo",
+ "tableName" : "core_oauth_clients",
+ "items" : [
{
- "region": "center",
- "title": "Oauth2 Clients",
- "xtype": "NestedLayoutPanel",
- "|xns": "Roo",
- "items": [
- {
- "|xns": "Roo",
- "xtype": "BorderLayout",
- "*prop": "layout",
- "items": [
- {
- "*prop": "center",
- "autoScroll": false,
- "split": true,
- "xtype": "LayoutRegion",
- "|xns": "Roo"
- },
- {
- "listeners": {
- "|activate": "function() {\n _this.panel = this;\n \n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
- },
- "background": true,
- "fitContainer": true,
- "fitToframe": true,
- "region": "center",
- "tableName": "core_oauth_clients",
- "title": "Oauth2 Clients",
- "xtype": "GridPanel",
- "|xns": "Roo",
- "items": [
- {
- "listeners": {
- "|render": "function() \n{\n _this.grid = this; \n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
- "afteredit": "function (e)\n{\n if(e.originalValue == e.value || !e.value.length){\n return false;\n }\n \n Roo.log('commit it');\n e.record.commit();\n}"
- },
- "*prop": "grid",
- "autoExpandColumn": "redirect_uri",
- "clicksToEdit": 1,
- "loadMask": true,
- "xtype": "EditorGrid",
- "|xns": "Roo.grid",
- "items": [
- {
- "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 : {\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,
- "xtype": "Store",
- "|sortInfo": "{ field : 'client_id', direction: 'ASC' }",
- "|xns": "Roo.data",
- "items": [
- {
- "*prop": "proxy",
- "method": "GET",
- "xtype": "HttpProxy",
- "|url": "baseURL + '/Roo/Core_oauth_clients'",
- "|xns": "Roo.data"
- },
- {
- "*prop": "reader",
- "id": "id",
- "root": "data",
- "totalProperty": "total",
- "xtype": "JsonReader",
- "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'client_id',\n 'type': 'string'\n },\n {\n 'name': 'client_secret',\n 'type': 'string'\n },\n {\n 'name': 'redirect_uri',\n 'type': 'string'\n }\n]",
- "|xns": "Roo.data"
- }
- ]
- },
- {
- "|xns": "Roo",
- "xtype": "Toolbar",
- "*prop": "toolbar",
- "items": [
- {
- "listeners": {
- "|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",
- "xtype": "Button",
- "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
- "|xns": "Roo.Toolbar"
- },
- {
- "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.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",
- "xtype": "Button",
- "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
- "|xns": "Roo.Toolbar"
- }
- ]
- },
- {
- "*prop": "footer",
- "displayInfo": true,
- "emptyMsg": "No Clients found",
- "pageSize": 25,
- "xtype": "PagingToolbar",
- "|xns": "Roo"
- },
- {
- "*prop": "colModel[]",
- "dataIndex": "client_id",
- "header": "Client ID",
- "width": 150,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n return String.format('{0}', v ? v : '');\n}",
- "|xns": "Roo.grid",
- "items": [
- {
- "|xns": "Roo.grid",
- "xtype": "GridEditor",
- "*prop": "editor",
- "items": [
- {
- "*prop": "field",
- "allowBlank": false,
- "xtype": "TextField",
- "|xns": "Roo.form"
- }
- ]
- }
- ]
- },
- {
- "*prop": "colModel[]",
- "dataIndex": "client_secret",
- "header": "Client Secret",
- "width": 150,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n return String.format('{0}', v ? v : '');\n}",
- "|xns": "Roo.grid",
- "items": [
- {
- "|xns": "Roo.grid",
- "xtype": "GridEditor",
- "*prop": "editor",
- "items": [
- {
- "*prop": "field",
- "allowBlank": false,
- "xtype": "TextField",
- "|xns": "Roo.form"
- }
- ]
- }
- ]
- },
- {
- "*prop": "colModel[]",
- "dataIndex": "redirect_uri",
- "header": "Redirect URI",
- "width": 150,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { \n return String.format('{0}', v ? v : '');\n}",
- "|xns": "Roo.grid",
- "items": [
- {
- "|xns": "Roo.grid",
- "xtype": "GridEditor",
- "*prop": "editor",
- "items": [
- {
- "*prop": "field",
- "xtype": "TextField",
- "|xns": "Roo.form"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
+ "listeners" : {
+ "|render" : "function() \n{\n _this.grid = this; \n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
+ "afteredit" : "function (e)\n{\n if(e.originalValue == e.value || !e.value.length){\n return false;\n }\n \n Roo.log('commit it');\n e.record.commit();\n}"
+ },
+ "autoExpandColumn" : "redirect_uri",
+ "xtype" : "EditorGrid",
+ "loadMask" : true,
+ "clicksToEdit" : 1,
+ "$ xns" : "Roo.grid",
+ "* prop" : "grid",
+ "items" : [
+ {
+ "listeners" : {
+ "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}",
+ "beforeload" : "function (_self, o){\n o.params = o.params || {};\n\n}\n"
+ },
+ "xtype" : "Store",
+ "remoteSort" : true,
+ "$ sortInfo" : "{ field : 'client_id', direction: 'ASC' }",
+ "$ xns" : "Roo.data",
+ "* prop" : "dataSource",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/Roo/Core_oauth_clients'",
+ "xtype" : "HttpProxy",
+ "method" : "GET",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
+ },
+ {
+ "id" : "id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'client_id',\n 'type': 'string'\n },\n {\n 'name': 'client_secret',\n 'type': 'string'\n },\n {\n 'name': 'redirect_uri',\n 'type': 'string'\n }\n]",
+ "$ xns" : "Roo.data",
+ "* prop" : "reader",
+ "totalProperty" : "total"
+ }
+ ]
+ },
+ {
+ "xtype" : "Toolbar",
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "listeners" : {
+ "|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"
+ },
+ "text" : "Add",
+ "xtype" : "Button",
+ "cls" : "x-btn-text-icon",
+ "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "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.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}"
+ },
+ "text" : "Remove",
+ "xtype" : "Button",
+ "cls" : "x-btn-text-icon",
+ "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+ "$ xns" : "Roo.Toolbar"
+ }
+ ]
+ },
+ {
+ "pageSize" : 25,
+ "xtype" : "PagingToolbar",
+ "emptyMsg" : "No Clients found",
+ "$ xns" : "Roo",
+ "displayInfo" : true,
+ "* prop" : "footer"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Client ID",
+ "width" : 150,
+ "$ renderer" : "function(v) { \n return String.format('{0}', v ? v : '');\n}",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "client_id",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "TextField",
+ "allowBlank" : false,
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Client Secret",
+ "width" : 150,
+ "$ renderer" : "function(v) { \n return String.format('{0}', v ? v : '');\n}",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "client_secret",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "TextField",
+ "allowBlank" : false,
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Redirect URI",
+ "width" : 150,
+ "$ renderer" : "function(v) { \n return String.format('{0}', v ? v : '');\n}",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "redirect_uri",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "TextField",
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
- ],
- "permname": "",
- "modOrder": "900"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
\ No newline at end of file
// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
-Pman.Tab.CoreOAuthClient = new Roo.XComponent({
- part : ["Admin","OAuthClient"],
- order : '900-Pman.Tab.AdminOAuthClient',
- region : 'center',
- parent : 'Pman.Tab.Admin',
- name : "unnamed module",
- disabled : false,
- permname : '',
- _tree : function()
- {
- var _this = this;
- var MODULE = this;
- return {
- xtype: 'NestedLayoutPanel',
- xns: Roo,
- region : 'center',
- title : "Oauth2 Clients",
- layout : {
- xtype: 'BorderLayout',
- xns: Roo,
- items : [
- {
- xtype: 'GridPanel',
- xns: Roo,
- listeners : {
- activate : function() {
- _this.panel = this;
-
- if (_this.grid) {
- _this.grid.footer.onClick('first');
- }
- }
+Roo.namespace('Pman.Tab');
+
+Pman.Tab.AdminOAuthClient = new Roo.XComponent({
+
+ _strings : {
+ '16f63df432feae9fab6840eabc9d3704' :"No Clients found",
+ 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
+ '76525f0f34b48475e5ca33f71d296f3b' :"Client ID",
+ '27499763cc523271e74f32ff4f740a7f' :"Redirect URI",
+ '1063e38cb53d94d386f21227fcd84717' :"Remove",
+ '0c95cb44ad29b66991e47d3e27fecadc' :"Oauth2 Clients",
+ '734082edf44417dd19cc65943aa65c36' :"Client Secret"
+ },
+
+ part : ["Admin", "OAuthClient" ],
+ order : '900-Pman.Tab.AdminOAuthClient',
+ region : 'center',
+ parent : 'Pman.Tab.Admin',
+ name : "unnamed module",
+ disabled : false,
+ permname : '',
+ _tree : function()
+ {
+ var _this = this;
+ var MODULE = this;
+ return {
+ region : 'center',
+ title : _this._strings['0c95cb44ad29b66991e47d3e27fecadc'] /* Oauth2 Clients */,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'NestedLayoutPanel',
+ layout : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'BorderLayout',
+ center : {
+ autoScroll : false,
+ split : true,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'LayoutRegion'
+ },
+ items : [
+ {
+ background : true,
+ fitContainer : true,
+ fitToframe : true,
+ region : 'center',
+ tableName : 'core_oauth_clients',
+ title : _this._strings['0c95cb44ad29b66991e47d3e27fecadc'] /* Oauth2 Clients */,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'GridPanel',
+ listeners : {
+ activate : function() {
+ _this.panel = this;
+
+ if (_this.grid) {
+ _this.grid.footer.onClick('first');
+ }
+ }
+ },
+ grid : {
+ autoExpandColumn : 'redirect_uri',
+ clicksToEdit : 1,
+ loadMask : true,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'EditorGrid',
+ listeners : {
+ afteredit : function (e)
+ {
+ if(e.originalValue == e.value || !e.value.length){
+ return false;
+ }
+
+ Roo.log('commit it');
+ e.record.commit();
+ },
+ render : function()
+ {
+ _this.grid = this;
+ if (_this.panel.active) {
+ this.footer.onClick('first');
+ }
+ }
+ },
+ footer : {
+ displayInfo : true,
+ emptyMsg : _this._strings['16f63df432feae9fab6840eabc9d3704'] /* No Clients found */,
+ pageSize : 25,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'PagingToolbar'
+ },
+ toolbar : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'Toolbar',
+ items : [
+ {
+ cls : 'x-btn-text-icon',
+ icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
+ text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+ xns : Roo.Toolbar,
+ '|xns' : 'Roo.Toolbar',
+ xtype : 'Button',
+ listeners : {
+ click : function()
+ {
+
+ var nr = _this.grid.ds.reader.newRow({
+ id : 0,
+ client_id : '',
+ client_secret : '',
+ redirect_uri : ''
+ });
+
+ _this.grid.stopEditing();
+ _this.grid.ds.insert(_this.grid.ds.getCount(), nr);
+ _this.grid.startEditing(_this.grid.ds.getCount()-1, 0);
+ }
+ }
+ },
+ {
+ cls : 'x-btn-text-icon',
+ icon : rootURL + '/Pman/templates/images/trash.gif',
+ text : _this._strings['1063e38cb53d94d386f21227fcd84717'] /* Remove */,
+ xns : Roo.Toolbar,
+ '|xns' : 'Roo.Toolbar',
+ xtype : 'Button',
+ listeners : {
+ click : function ()
+ {
+ var cs = _this.grid.getSelectionModel().getSelectedCell();
+ if (!cs) {
+ Roo.MessageBox.alert("Error", "Select a cell");
+ return;
+ }
+ _this.grid.stopEditing();
+
+ var r = _this.grid.ds.getAt(cs[0]);
+
+ Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete this client?", function (v){
+ if (v != 'yes') {
+ return;
+ }
+
+ new Pman.Request({
+ url : baseURL + '/Roo/Core_oauth_clients',
+ method : 'POST',
+ params : {
+ _delete : r.data.id
},
- background : true,
- fitContainer : true,
- fitToframe : true,
- region : 'center',
- tableName : 'core_oauth_clients',
- title : "Oauth2 Clients",
- grid : {
- xtype: 'EditorGrid',
- xns: Roo.grid,
- listeners : {
- render : function()
- {
- _this.grid = this;
- if (_this.panel.active) {
- this.footer.onClick('first');
- }
- },
- afteredit : function (e)
- {
- if(e.originalValue == e.value || !e.value.length){
- return false;
- }
-
- Roo.log('commit it');
- e.record.commit();
- }
- },
- autoExpandColumn : 'redirect_uri',
- clicksToEdit : 1,
- loadMask : true,
- dataSource : {
- xtype: 'Store',
- xns: Roo.data,
- listeners : {
- beforeload : function (_self, o){
- o.params = o.params || {};
-
- },
- update : function (_self, record, operation)
- {
- if (operation != Roo.data.Record.COMMIT) {
- return;
- }
-
- if (!record.data.client_id.length || !record.data.client_secret.length) {
- return;
- }
-
- new Pman.Request({
- url : baseURL + '/Roo/Core_oauth_clients',
- method : 'POST',
- params : {
- id : record.data.id,
- client_id : record.data.client_id,
- client_secret : record.data.client_secret,
- redirect_uri : record.data.redirect_uri
- },
- success : function(res) {
- _this.grid.footer.onClick('refresh');
- }
- });
-
- }
- },
- remoteSort : true,
- sortInfo : { field : 'client_id', direction: 'ASC' },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/Roo/Core_oauth_clients'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total',
- fields : [
- {
- 'name': 'id',
- 'type': 'int'
- },
- {
- 'name': 'client_id',
- 'type': 'string'
- },
- {
- 'name': 'client_secret',
- 'type': 'string'
- },
- {
- 'name': 'redirect_uri',
- 'type': 'string'
- }
- ]
- }
- },
- toolbar : {
- xtype: 'Toolbar',
- xns: Roo,
- items : [
- {
- xtype: 'Button',
- xns: Roo.Toolbar,
- listeners : {
- click : function()
- {
-
- var nr = _this.grid.ds.reader.newRow({
- id : 0,
- client_id : '',
- client_secret : '',
- redirect_uri : ''
- });
-
- _this.grid.stopEditing();
- _this.grid.ds.insert(_this.grid.ds.getCount(), nr);
- _this.grid.startEditing(_this.grid.ds.getCount()-1, 0);
- }
- },
- cls : 'x-btn-text-icon',
- text : "Add",
- icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
- },
- {
- xtype: 'Button',
- xns: Roo.Toolbar,
- listeners : {
- click : function ()
- {
- var cs = _this.grid.getSelectionModel().getSelectedCell();
- if (!cs) {
- Roo.MessageBox.alert("Error", "Select a cell");
- return;
- }
- _this.grid.stopEditing();
-
- var r = _this.grid.ds.getAt(cs[0]);
-
- Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete this client?", function (v){
- if (v != 'yes') {
- return;
- }
-
- new Pman.Request({
- url : baseURL + '/Roo/Core_oauth_clients',
- method : 'POST',
- params : {
- _delete : r.data.id
- },
- success : function(res) {
- _this.grid.footer.onClick('refresh');
- }
- });
- });
- }
- },
- cls : 'x-btn-text-icon',
- text : "Remove",
- icon : rootURL + '/Pman/templates/images/trash.gif'
- }
- ]
- },
- footer : {
- xtype: 'PagingToolbar',
- xns: Roo,
- displayInfo : true,
- emptyMsg : "No Clients found",
- pageSize : 25
- },
- colModel : [
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'client_id',
- header : 'Client ID',
- width : 150,
- renderer : function(v) {
- return String.format('{0}', v ? v : '');
- },
- editor : {
- xtype: 'GridEditor',
- xns: Roo.grid,
- field : {
- xtype: 'TextField',
- xns: Roo.form,
- allowBlank : false
- }
- }
- },
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'client_secret',
- header : 'Client Secret',
- width : 150,
- renderer : function(v) {
- return String.format('{0}', v ? v : '');
- },
- editor : {
- xtype: 'GridEditor',
- xns: Roo.grid,
- field : {
- xtype: 'TextField',
- xns: Roo.form,
- allowBlank : false
- }
- }
- },
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'redirect_uri',
- header : 'Redirect URI',
- width : 150,
- renderer : function(v) {
- return String.format('{0}', v ? v : '');
- },
- editor : {
- xtype: 'GridEditor',
- xns: Roo.grid,
- field : {
- xtype: 'TextField',
- xns: Roo.form
- }
- }
- }
- ]
+ success : function(res) {
+ _this.grid.footer.onClick('refresh');
}
- }
- ],
- center : {
- xtype: 'LayoutRegion',
- xns: Roo,
- autoScroll : false,
- split : true
- }
+ });
+ });
}
- };
- }
+ }
+ }
+ ]
+ },
+ dataSource : {
+ remoteSort : true,
+ sortInfo : { field : 'client_id', direction: 'ASC' },
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'Store',
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+
+ },
+ update : function (_self, record, operation)
+ {
+ if (operation != Roo.data.Record.COMMIT) {
+ return;
+ }
+
+ if (!record.data.client_id.length || !record.data.client_secret.length) {
+ return;
+ }
+
+ new Pman.Request({
+ url : baseURL + '/Roo/Core_oauth_clients',
+ method : 'POST',
+ params : {
+ id : record.data.id,
+ client_id : record.data.client_id,
+ client_secret : record.data.client_secret,
+ redirect_uri : record.data.redirect_uri
+ },
+ success : function(res) {
+ _this.grid.footer.onClick('refresh');
+ }
+ });
+
+ }
+ },
+ proxy : {
+ method : 'GET',
+ url : baseURL + '/Roo/Core_oauth_clients',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'HttpProxy'
+ },
+ reader : {
+ fields : [
+ {
+ 'name': 'id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'client_id',
+ 'type': 'string'
+ },
+ {
+ 'name': 'client_secret',
+ 'type': 'string'
+ },
+ {
+ 'name': 'redirect_uri',
+ 'type': 'string'
+ }
+ ],
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'JsonReader'
+ }
+ },
+ colModel : [
+ {
+ dataIndex : 'client_id',
+ header : _this._strings['76525f0f34b48475e5ca33f71d296f3b'] /* Client ID */,
+ renderer : function(v) {
+ return String.format('{0}', v ? v : '');
+ },
+ width : 150,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'ColumnModel',
+ editor : {
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'GridEditor',
+ field : {
+ allowBlank : false,
+ xns : Roo.form,
+ '|xns' : 'Roo.form',
+ xtype : 'TextField'
+ }
+ }
+ },
+ {
+ dataIndex : 'client_secret',
+ header : _this._strings['734082edf44417dd19cc65943aa65c36'] /* Client Secret */,
+ renderer : function(v) {
+ return String.format('{0}', v ? v : '');
+ },
+ width : 150,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'ColumnModel',
+ editor : {
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'GridEditor',
+ field : {
+ allowBlank : false,
+ xns : Roo.form,
+ '|xns' : 'Roo.form',
+ xtype : 'TextField'
+ }
+ }
+ },
+ {
+ dataIndex : 'redirect_uri',
+ header : _this._strings['27499763cc523271e74f32ff4f740a7f'] /* Redirect URI */,
+ renderer : function(v) {
+ return String.format('{0}', v ? v : '');
+ },
+ width : 150,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'ColumnModel',
+ editor : {
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'GridEditor',
+ field : {
+ xns : Roo.form,
+ '|xns' : 'Roo.form',
+ xtype : 'TextField'
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }; }
});