Pman.Tab.AdminProjectManager.bjs
[Pman.Admin] / Pman.Tab.AdminProjectManager.bjs
1 {
2     "id": "roo-file-188",
3     "name": "Pman.Tab.AdminProjectManager",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminProjectManager.bjs",
7     "items": [
8         {
9             "region": "center",
10             "title": "Projects",
11             "xtype": "NestedLayoutPanel",
12             "|xns": "Roo",
13             "items": [
14                 {
15                     "|xns": "Roo",
16                     "xtype": "BorderLayout",
17                     "*prop": "layout",
18                     "items": [
19                         {
20                             "|xns": "Roo",
21                             "xtype": "LayoutRegion",
22                             "*prop": "center"
23                         },
24                         {
25                             "*prop": "east",
26                             "xtype": "LayoutRegion",
27                             "|xns": "Roo",
28                             "width": 0,
29                             "listeners": {}
30                         },
31                         {
32                             "|xns": "Roo",
33                             "xtype": "GridPanel",
34                             "title": "Projects",
35                             "fitToframe": true,
36                             "fitContainer": true,
37                             "tableName": "Projects",
38                             "background": true,
39                             "region": "center",
40                             "listeners": {
41                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
42                             },
43                             "items": [
44                                 {
45                                     "*prop": "grid",
46                                     "xtype": "Grid",
47                                     "autoExpandColumn": "name",
48                                     "loadMask": true,
49                                     "listeners": {
50                                         "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
51                                         "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
52                                     },
53                                     "|xns": "Roo.grid",
54                                     "items": [
55                                         {
56                                             "*prop": "dataSource",
57                                             "xtype": "Store",
58                                             "remoteSort": true,
59                                             "|sortInfo": "{ field : 'name', direction: 'ASC' }",
60                                             "|xns": "Roo.data",
61                                             "items": [
62                                                 {
63                                                     "*prop": "proxy",
64                                                     "xtype": "HttpProxy",
65                                                     "method": "GET",
66                                                     "|url": "baseURL + '/Roo/Projects.php'",
67                                                     "|xns": "Roo.data"
68                                                 },
69                                                 {
70                                                     "|xns": "Roo.data",
71                                                     "xtype": "JsonReader",
72                                                     "totalProperty": "total",
73                                                     "root": "data",
74                                                     "*prop": "reader",
75                                                     "id": "id",
76                                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'code',\n        'type': 'string'\n    },\n    {\n        'name': 'active',\n        'type': 'int'\n    },\n    {\n        'name': 'type',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id',\n        'type': 'int'\n    },\n    {\n        'name': 'team_id',\n        'type': 'int'\n    },\n    {\n        'name': 'file_location',\n        'type': 'string'\n    },\n    {\n        'name': 'open_date',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'open_by',\n        'type': 'int'\n    },\n    {\n        'name': 'close_date',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'countries',\n        'type': 'string'\n    },\n    {\n        'name': 'languages',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_address',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_tel',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_isOwner',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_logo_id',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_background_color',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_comptype',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_url',\n        'type': 'string'\n    },\n    {\n        'name': 'client_id_main_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_created_by',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_created_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'client_id_updated_by',\n        'type': 'int'\n    },\n    {\n        'name': 'client_id_updated_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'client_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_address',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_tel',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_isOwner',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_logo_id',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_background_color',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_comptype',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_url',\n        'type': 'string'\n    },\n    {\n        'name': 'agency_id_main_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_created_by',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_created_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'agency_id_updated_by',\n        'type': 'int'\n    },\n    {\n        'name': 'agency_id_updated_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'agency_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'team_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'team_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'team_id_type',\n        'type': 'int'\n    },\n    {\n        'name': 'team_id_leader',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_id',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_name',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_email',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_role',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_active',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'open_by_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'open_by_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_project_id',\n        'type': 'int'\n    }\n]"
77                                                 }
78                                             ]
79                                         },
80                                         {
81                                             "*prop": "footer",
82                                             "xtype": "PagingToolbar",
83                                             "pageSize": 25,
84                                             "displayInfo": true,
85                                             "displayMsg": "Displaying Projects{0} - {1} of {2}",
86                                             "emptyMsg": "No Projects found",
87                                             "|xns": "Roo"
88                                         },
89                                         {
90                                             "*prop": "toolbar",
91                                             "xtype": "Toolbar",
92                                             "|xns": "Roo",
93                                             "items": [
94                                                 {
95                                                     "text": "Add",
96                                                     "xtype": "Button",
97                                                     "cls": "x-btn-text-icon",
98                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
99                                                     "listeners": {
100                                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
101                                                     },
102                                                     "|xns": "Roo.Toolbar"
103                                                 },
104                                                 {
105                                                     "text": "Edit",
106                                                     "xtype": "Button",
107                                                     "cls": "x-btn-text-icon",
108                                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
109                                                     "listeners": {
110                                                         "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
111                                                     },
112                                                     "|xns": "Roo.Toolbar"
113                                                 },
114                                                 {
115                                                     "text": "Delete",
116                                                     "cls": "x-btn-text-icon",
117                                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
118                                                     "xtype": "Button",
119                                                     "listeners": {
120                                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'Projects'); \n}\n        "
121                                                     },
122                                                     "|xns": "Roo.Toolbar"
123                                                 }
124                                             ]
125                                         },
126                                         {
127                                             "xtype": "ColumnModel",
128                                             "header": "Id",
129                                             "width": 75,
130                                             "dataIndex": "id",
131                                             "|renderer": "function(v) { return String.format('{0}', v); }",
132                                             "|xns": "Roo.grid",
133                                             "*prop": "colModel[]"
134                                         },
135                                         {
136                                             "xtype": "ColumnModel",
137                                             "header": "Name",
138                                             "width": 200,
139                                             "dataIndex": "name",
140                                             "|renderer": "function(v) { return String.format('{0}', v); }",
141                                             "|xns": "Roo.grid",
142                                             "*prop": "colModel[]"
143                                         },
144                                         {
145                                             "xtype": "ColumnModel",
146                                             "header": "Remarks",
147                                             "width": 200,
148                                             "dataIndex": "remarks",
149                                             "|renderer": "function(v) { return String.format('{0}', v); }",
150                                             "|xns": "Roo.grid",
151                                             "*prop": "colModel[]"
152                                         },
153                                         {
154                                             "xtype": "ColumnModel",
155                                             "header": "Owner",
156                                             "width": 75,
157                                             "dataIndex": "owner_id",
158                                             "|renderer": "function(v) { return String.format('{0}', v); }",
159                                             "|xns": "Roo.grid",
160                                             "*prop": "colModel[]"
161                                         },
162                                         {
163                                             "xtype": "ColumnModel",
164                                             "header": "Code",
165                                             "width": 200,
166                                             "dataIndex": "code",
167                                             "|renderer": "function(v) { return String.format('{0}', v); }",
168                                             "|xns": "Roo.grid",
169                                             "*prop": "colModel[]"
170                                         },
171                                         {
172                                             "xtype": "ColumnModel",
173                                             "header": "Active",
174                                             "width": 75,
175                                             "dataIndex": "active",
176                                             "|renderer": "function(v) { return String.format('{0}', v); }",
177                                             "|xns": "Roo.grid",
178                                             "*prop": "colModel[]"
179                                         },
180                                         {
181                                             "xtype": "ColumnModel",
182                                             "header": "Type",
183                                             "width": 200,
184                                             "dataIndex": "type",
185                                             "|renderer": "function(v) { return String.format('{0}', v); }",
186                                             "|xns": "Roo.grid",
187                                             "*prop": "colModel[]"
188                                         },
189                                         {
190                                             "xtype": "ColumnModel",
191                                             "header": "Client",
192                                             "width": 75,
193                                             "dataIndex": "client_id",
194                                             "|renderer": "function(v) { return String.format('{0}', v); }",
195                                             "|xns": "Roo.grid",
196                                             "*prop": "colModel[]"
197                                         },
198                                         {
199                                             "xtype": "ColumnModel",
200                                             "header": "Team",
201                                             "width": 75,
202                                             "dataIndex": "team_id",
203                                             "|renderer": "function(v) { return String.format('{0}', v); }",
204                                             "|xns": "Roo.grid",
205                                             "*prop": "colModel[]"
206                                         },
207                                         {
208                                             "xtype": "ColumnModel",
209                                             "header": "File location",
210                                             "width": 200,
211                                             "dataIndex": "file_location",
212                                             "|renderer": "function(v) { return String.format('{0}', v); }",
213                                             "|xns": "Roo.grid",
214                                             "*prop": "colModel[]"
215                                         },
216                                         {
217                                             "xtype": "ColumnModel",
218                                             "header": "Open date",
219                                             "width": 75,
220                                             "dataIndex": "open_date",
221                                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
222                                             "|xns": "Roo.grid",
223                                             "*prop": "colModel[]"
224                                         },
225                                         {
226                                             "xtype": "ColumnModel",
227                                             "header": "Open by",
228                                             "width": 75,
229                                             "dataIndex": "open_by",
230                                             "|renderer": "function(v) { return String.format('{0}', v); }",
231                                             "|xns": "Roo.grid",
232                                             "*prop": "colModel[]"
233                                         },
234                                         {
235                                             "xtype": "ColumnModel",
236                                             "header": "Close date",
237                                             "width": 75,
238                                             "dataIndex": "close_date",
239                                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
240                                             "|xns": "Roo.grid",
241                                             "*prop": "colModel[]"
242                                         },
243                                         {
244                                             "xtype": "ColumnModel",
245                                             "header": "Countries",
246                                             "width": 200,
247                                             "dataIndex": "countries",
248                                             "|renderer": "function(v) { return String.format('{0}', v); }",
249                                             "|xns": "Roo.grid",
250                                             "*prop": "colModel[]"
251                                         },
252                                         {
253                                             "xtype": "ColumnModel",
254                                             "header": "Languages",
255                                             "width": 200,
256                                             "dataIndex": "languages",
257                                             "|renderer": "function(v) { return String.format('{0}', v); }",
258                                             "|xns": "Roo.grid",
259                                             "*prop": "colModel[]"
260                                         },
261                                         {
262                                             "xtype": "ColumnModel",
263                                             "header": "Agency",
264                                             "width": 75,
265                                             "dataIndex": "agency_id",
266                                             "|renderer": "function(v) { return String.format('{0}', v); }",
267                                             "|xns": "Roo.grid",
268                                             "*prop": "colModel[]"
269                                         }
270                                     ]
271                                 }
272                             ]
273                         }
274                     ]
275                 }
276             ]
277         }
278     ],
279     "permname": "",
280     "modOrder": "001"
281 }