+++ /dev/null
-{
- "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" : [
- {
- "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"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-//<script type="text/javascript">
-
-// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
-
-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
- },
- success : function(res) {
- _this.grid.footer.onClick('refresh');
- }
- });
- });
- }
- }
- }
- ]
- },
- 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'
- }
- }
- }
- ]
- }
- }
- ]
- }
- }; }
-});