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) {
82 if (!record.data.client_id.length || !record.data.client_secret.length) {
87 url : baseURL + '/Roo/Core_oauth_clients',
91 client_id : record.data.client_id,
92 client_secret : record.data.client_secret,
93 redirect_uri : record.data.redirect_uri
95 success : function(res) {
96 _this.grid.footer.onClick('refresh');
103 sortInfo : { field : 'client_id', direction: 'ASC' },
108 url : baseURL + '/Roo/Core_oauth_clients'
115 totalProperty : 'total',
126 'name': 'client_secret',
130 'name': 'redirect_uri',
147 var nr = _this.grid.ds.reader.newRow({
154 _this.grid.stopEditing();
155 _this.grid.ds.insert(_this.grid.ds.getCount(), nr);
156 _this.grid.startEditing(_this.grid.ds.getCount()-1, 0);
159 cls : 'x-btn-text-icon',
161 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
169 var cs = _this.grid.getSelectionModel().getSelectedCell();
171 Roo.MessageBox.alert("Error", "Select a cell");
174 _this.grid.stopEditing();
176 var r = _this.grid.ds.getAt(cs[0]);
178 Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete this client?", function (v){
184 url : baseURL + '/Roo/Core_oauth_clients',
189 success : function(res) {
190 _this.grid.footer.onClick('refresh');
196 cls : 'x-btn-text-icon',
198 icon : rootURL + '/Pman/templates/images/trash.gif'
203 xtype: 'PagingToolbar',
206 emptyMsg : "No Clients found",
211 xtype: 'ColumnModel',
213 dataIndex : 'client_id',
214 header : 'Client ID',
216 renderer : function(v) {
217 return String.format('{0}', v ? v : '');
230 xtype: 'ColumnModel',
232 dataIndex : 'client_secret',
233 header : 'Client Secret',
235 renderer : function(v) {
236 return String.format('{0}', v ? v : '');
249 xtype: 'ColumnModel',
251 dataIndex : 'redirect_uri',
252 header : 'Redirect URI',
254 renderer : function(v) {
255 return String.format('{0}', v ? v : '');
271 xtype: 'LayoutRegion',