Pman.Tab.CoreOAuthClient.bjs
[Pman.Core] / Pman.Tab.CoreOAuthClient.bjs
1 {
2     "id": "roo-file-224",
3     "name": "Pman.Tab.CoreOAuthClient",
4     "parent": "Pman.Tab.Admin",
5     "title": "",
6     "path": "/home/edward/gitlive/Pman.Core/Pman.Tab.CoreOAuthClient.bjs",
7     "items": [
8         {
9             "region": "center",
10             "title": "Oauth2 Clients",
11             "xtype": "NestedLayoutPanel",
12             "|xns": "Roo",
13             "items": [
14                 {
15                     "|xns": "Roo",
16                     "xtype": "BorderLayout",
17                     "*prop": "layout",
18                     "items": [
19                         {
20                             "*prop": "center",
21                             "autoScroll": false,
22                             "split": true,
23                             "xtype": "LayoutRegion",
24                             "|xns": "Roo"
25                         },
26                         {
27                             "listeners": {
28                                 "|activate": "function() {\n    _this.panel = this;\n    \n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
29                             },
30                             "background": true,
31                             "fitContainer": true,
32                             "fitToframe": true,
33                             "region": "center",
34                             "tableName": "core_oauth_clients",
35                             "title": "Oauth2 Clients",
36                             "xtype": "GridPanel",
37                             "|xns": "Roo",
38                             "items": [
39                                 {
40                                     "listeners": {
41                                         "|render": "function() \n{\n    _this.grid = this; \n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
42                                         "afteredit": "function (e)\n{\n    Roo.log(e);\n    if(e.originalValue == e.value || !e.value.length){\n        return;\n    }\n    \n    Roo.log('commit');\n}"
43                                     },
44                                     "*prop": "grid",
45                                     "autoExpandColumn": "redirect_uri",
46                                     "clicksToEdit": 1,
47                                     "loadMask": true,
48                                     "xtype": "EditorGrid",
49                                     "|xns": "Roo.grid",
50                                     "items": [
51                                         {
52                                             "listeners": {
53                                                 "beforeload": "function (_self, o){\n    o.params = o.params || {};\n\n}\n"
54                                             },
55                                             "*prop": "dataSource",
56                                             "remoteSort": true,
57                                             "xtype": "Store",
58                                             "|sortInfo": "{ field : 'client_id', direction: 'ASC' }",
59                                             "|xns": "Roo.data",
60                                             "items": [
61                                                 {
62                                                     "*prop": "proxy",
63                                                     "method": "GET",
64                                                     "xtype": "HttpProxy",
65                                                     "|url": "baseURL + '/Roo/Core_oauth_clients'",
66                                                     "|xns": "Roo.data"
67                                                 },
68                                                 {
69                                                     "*prop": "reader",
70                                                     "id": "id",
71                                                     "root": "data",
72                                                     "totalProperty": "total",
73                                                     "xtype": "JsonReader",
74                                                     "|fields": "[\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]",
75                                                     "|xns": "Roo.data"
76                                                 }
77                                             ]
78                                         },
79                                         {
80                                             "|xns": "Roo",
81                                             "xtype": "Toolbar",
82                                             "*prop": "toolbar",
83                                             "items": [
84                                                 {
85                                                     "listeners": {
86                                                         "|click": "function()\n{\n    var status = _this.form.findField('pohead_status').getValue();\n    \n    if(status == 'C'){\n        Roo.MessageBox.alert(\"Error\", \"This PO has been closed\");\n        return;\n    }\n    \n    var ct  =    _this.grid.ds.getCount();\n    \n    var last = ct ? _this.grid.ds.getAt(ct-1).data.poitem_linenumber * 1 + 1 : 1;\n    \n    var dt = _this.form.findField('pohead_orderdate').getValue();\n    \n    var nr = _this.grid.ds.reader.newRow({\n        poitem_id : 0,\n        poitem_linenumber : last,\n        item_number : '',\n        item_descrip1 : '',\n        poitem_duedate : dt,\n        poitem_qty_ordered : 1,\n        poitem_unitprice : 0\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, 1);\n}\n"
87                                                     },
88                                                     "cls": "x-btn-text-icon",
89                                                     "text": "Add",
90                                                     "xtype": "Button",
91                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
92                                                     "|xns": "Roo.Toolbar"
93                                                 },
94                                                 {
95                                                     "listeners": {
96                                                         "|click": "function ()\n{\n    var status = _this.form.findField('pohead_status').getValue();\n    \n    if(status == 'C'){\n        Roo.MessageBox.alert(\"Error\", \"This PO has been closed\");\n        return;\n    }\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    var r = _this.grid.ds.getAt(cs[0]);\n    \n    if(r.data.poitem_qty_received * 1 > 0){\n        Roo.MessageBox.alert(\"Error\", \"This item has been receipted\");\n        return;\n    }\n    \n    \n    _this.grid.ds.remove(r);\n   \n}"
97                                                     },
98                                                     "cls": "x-btn-text-icon",
99                                                     "text": "Remove",
100                                                     "xtype": "Button",
101                                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
102                                                     "|xns": "Roo.Toolbar"
103                                                 }
104                                             ]
105                                         },
106                                         {
107                                             "*prop": "footer",
108                                             "displayInfo": true,
109                                             "emptyMsg": "No Clients found",
110                                             "pageSize": 25,
111                                             "xtype": "PagingToolbar",
112                                             "|xns": "Roo"
113                                         },
114                                         {
115                                             "*prop": "colModel[]",
116                                             "dataIndex": "client_id",
117                                             "header": "Client ID",
118                                             "width": 150,
119                                             "xtype": "ColumnModel",
120                                             "|renderer": "function(v) { \n    return String.format('{0}', v ? v : '');\n}",
121                                             "|xns": "Roo.grid",
122                                             "items": [
123                                                 {
124                                                     "|xns": "Roo.grid",
125                                                     "xtype": "GridEditor",
126                                                     "*prop": "editor",
127                                                     "items": [
128                                                         {
129                                                             "*prop": "field",
130                                                             "xtype": "TextField",
131                                                             "|xns": "Roo.form"
132                                                         }
133                                                     ]
134                                                 }
135                                             ]
136                                         },
137                                         {
138                                             "*prop": "colModel[]",
139                                             "dataIndex": "client_secret",
140                                             "header": "Client Secret",
141                                             "width": 150,
142                                             "xtype": "ColumnModel",
143                                             "|renderer": "function(v) { \n    return String.format('{0}', v ? v : '');\n}",
144                                             "|xns": "Roo.grid",
145                                             "items": [
146                                                 {
147                                                     "|xns": "Roo.grid",
148                                                     "xtype": "GridEditor",
149                                                     "*prop": "editor",
150                                                     "items": [
151                                                         {
152                                                             "*prop": "field",
153                                                             "xtype": "TextField",
154                                                             "|xns": "Roo.form"
155                                                         }
156                                                     ]
157                                                 }
158                                             ]
159                                         },
160                                         {
161                                             "*prop": "colModel[]",
162                                             "dataIndex": "redirect_uri",
163                                             "header": "Redirect URI",
164                                             "width": 150,
165                                             "xtype": "ColumnModel",
166                                             "|renderer": "function(v) { \n    return String.format('{0}', v ? v : '');\n}",
167                                             "|xns": "Roo.grid",
168                                             "items": [
169                                                 {
170                                                     "|xns": "Roo.grid",
171                                                     "xtype": "GridEditor",
172                                                     "*prop": "editor",
173                                                     "items": [
174                                                         {
175                                                             "*prop": "field",
176                                                             "xtype": "TextField",
177                                                             "|xns": "Roo.form"
178                                                         }
179                                                     ]
180                                                 }
181                                             ]
182                                         }
183                                     ]
184                                 }
185                             ]
186                         }
187                     ]
188                 }
189             ]
190         }
191     ],
192     "permname": "",
193     "modOrder": "900"
194 }