1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.CoreOAuthClient = new Roo.XComponent({
6 part : ["Core","OAuthClient"],
7 order : '900-Pman.Tab.CoreOAuthClient',
9 parent : 'Pman.Tab.Admin',
10 name : "unnamed module",
18 xtype: 'NestedLayoutPanel',
21 title : "Oauth2 Clients",
23 xtype: 'BorderLayout',
30 activate : function() {
34 _this.grid.footer.onClick('first');
42 tableName : 'core_oauth_clients',
43 title : "Oauth2 Clients",
51 if (_this.panel.active) {
52 this.footer.onClick('first');
55 afteredit : function (e)
57 if(e.originalValue == e.value || !e.value.length){
65 autoExpandColumn : 'redirect_uri',
72 beforeload : function (_self, o){
73 o.params = o.params || {};
76 update : function (_self, record, operation)
78 if (operation != Roo.data.Record.COMMIT) {
83 if (typeof(_this.data._hide_name) != 'undefined') {
84 record.set('name', record.data.display_name);
86 if (!record.data.client_id.length || !record.data.client_secret.length) {
91 url : baseURL + '/Roo/Core_oauth_clients.php',
94 success : function(res) {
95 _this.gird.footer.onClick('refresh');
102 sortInfo : { field : 'client_id', direction: 'ASC' },
107 url : baseURL + '/Roo/Core_oauth_clients'
114 totalProperty : 'total',
121 'name': 'client_secret',
125 'name': 'redirect_uri',
142 var nr = _this.grid.ds.reader.newRow({
148 _this.grid.stopEditing();
149 _this.grid.ds.insert(_this.grid.ds.getCount(), nr);
150 _this.grid.startEditing(_this.grid.ds.getCount()-1, 1);
153 cls : 'x-btn-text-icon',
155 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
163 var cs = _this.grid.getSelectionModel().getSelectedCell();
165 Roo.MessageBox.alert("Error", "Select a cell");
168 _this.grid.stopEditing();
170 var r = _this.grid.ds.getAt(cs[0]);
172 _this.grid.ds.remove(r);
176 cls : 'x-btn-text-icon',
178 icon : rootURL + '/Pman/templates/images/trash.gif'
183 xtype: 'PagingToolbar',
186 emptyMsg : "No Clients found",
191 xtype: 'ColumnModel',
193 dataIndex : 'client_id',
194 header : 'Client ID',
196 renderer : function(v) {
197 return String.format('{0}', v ? v : '');
210 xtype: 'ColumnModel',
212 dataIndex : 'client_secret',
213 header : 'Client Secret',
215 renderer : function(v) {
216 return String.format('{0}', v ? v : '');
229 xtype: 'ColumnModel',
231 dataIndex : 'redirect_uri',
232 header : 'Redirect URI',
234 renderer : function(v) {
235 return String.format('{0}', v ? v : '');
251 xtype: 'LayoutRegion',