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)
60 autoExpandColumn : 'redirect_uri',
67 beforeload : function (_self, o){
68 o.params = o.params || {};
73 sortInfo : { field : 'client_id', direction: 'ASC' },
78 url : baseURL + '/Roo/Core_oauth_clients'
85 totalProperty : 'total',
92 'name': 'client_secret',
96 'name': 'redirect_uri',
112 var status = _this.form.findField('pohead_status').getValue();
115 Roo.MessageBox.alert("Error", "This PO has been closed");
119 var ct = _this.grid.ds.getCount();
121 var last = ct ? _this.grid.ds.getAt(ct-1).data.poitem_linenumber * 1 + 1 : 1;
123 var dt = _this.form.findField('pohead_orderdate').getValue();
125 var nr = _this.grid.ds.reader.newRow({
127 poitem_linenumber : last,
131 poitem_qty_ordered : 1,
135 _this.grid.stopEditing();
136 _this.grid.ds.insert(_this.grid.ds.getCount(), nr);
137 _this.grid.startEditing(_this.grid.ds.getCount()-1, 1);
140 cls : 'x-btn-text-icon',
142 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
150 var status = _this.form.findField('pohead_status').getValue();
153 Roo.MessageBox.alert("Error", "This PO has been closed");
157 var cs = _this.grid.getSelectionModel().getSelectedCell();
159 Roo.MessageBox.alert("Error", "Select a cell");
162 _this.grid.stopEditing();
163 var r = _this.grid.ds.getAt(cs[0]);
165 if(r.data.poitem_qty_received * 1 > 0){
166 Roo.MessageBox.alert("Error", "This item has been receipted");
171 _this.grid.ds.remove(r);
175 cls : 'x-btn-text-icon',
177 icon : rootURL + '/Pman/templates/images/trash.gif'
182 xtype: 'PagingToolbar',
185 emptyMsg : "No Clients found",
190 xtype: 'ColumnModel',
192 dataIndex : 'client_id',
193 header : 'Client ID',
195 renderer : function(v) {
196 return String.format('{0}', v ? v : '');
208 xtype: 'ColumnModel',
210 dataIndex : 'client_secret',
211 header : 'Client Secret',
213 renderer : function(v) {
214 return String.format('{0}', v ? v : '');
226 xtype: 'ColumnModel',
228 dataIndex : 'redirect_uri',
229 header : 'Redirect URI',
231 renderer : function(v) {
232 return String.format('{0}', v ? v : '');
248 xtype: 'LayoutRegion',