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                         },
29                         {
30                             "|xns": "Roo",
31                             "xtype": "GridPanel",
32                             "title": "Projects",
33                             "fitToframe": true,
34                             "fitContainer": true,
35                             "tableName": "Projects",
36                             "background": true,
37                             "region": "center",
38                             "listeners": {
39                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
40                             },
41                             "items": [
42                                 {
43                                     "*prop": "grid",
44                                     "xtype": "Grid",
45                                     "autoExpandColumn": "name",
46                                     "loadMask": true,
47                                     "listeners": {
48                                         "|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}",
49                                         "|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"
50                                     },
51                                     "|xns": "Roo.grid",
52                                     "items": [
53                                         {
54                                             "*prop": "dataSource",
55                                             "xtype": "Store",
56                                             "remoteSort": true,
57                                             "|sortInfo": "{ field : 'name', direction: 'ASC' }",
58                                             "|xns": "Roo.data",
59                                             "items": [
60                                                 {
61                                                     "*prop": "proxy",
62                                                     "xtype": "HttpProxy",
63                                                     "method": "GET",
64                                                     "|url": "baseURL + '/Roo/Projects.php'",
65                                                     "|xns": "Roo.data"
66                                                 },
67                                                 {
68                                                     "|xns": "Roo.data",
69                                                     "xtype": "JsonReader",
70                                                     "totalProperty": "total",
71                                                     "root": "data",
72                                                     "*prop": "reader",
73                                                     "id": "id",
74                                                     "|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]"
75                                                 }
76                                             ]
77                                         },
78                                         {
79                                             "*prop": "footer",
80                                             "xtype": "PagingToolbar",
81                                             "pageSize": 25,
82                                             "displayInfo": true,
83                                             "displayMsg": "Displaying Projects{0} - {1} of {2}",
84                                             "emptyMsg": "No Projects found",
85                                             "|xns": "Roo"
86                                         },
87                                         {
88                                             "*prop": "toolbar",
89                                             "xtype": "Toolbar",
90                                             "|xns": "Roo",
91                                             "items": [
92                                                 {
93                                                     "text": "Add",
94                                                     "xtype": "Button",
95                                                     "cls": "x-btn-text-icon",
96                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
97                                                     "listeners": {
98                                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
99                                                     },
100                                                     "|xns": "Roo.Toolbar"
101                                                 },
102                                                 {
103                                                     "text": "Edit",
104                                                     "xtype": "Button",
105                                                     "cls": "x-btn-text-icon",
106                                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
107                                                     "listeners": {
108                                                         "|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"
109                                                     },
110                                                     "|xns": "Roo.Toolbar"
111                                                 },
112                                                 {
113                                                     "text": "Delete",
114                                                     "cls": "x-btn-text-icon",
115                                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
116                                                     "xtype": "Button",
117                                                     "listeners": {
118                                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'Projects'); \n}\n        "
119                                                     },
120                                                     "|xns": "Roo.Toolbar"
121                                                 }
122                                             ]
123                                         },
124                                         {
125                                             "xtype": "ColumnModel",
126                                             "header": "Id",
127                                             "width": 75,
128                                             "dataIndex": "id",
129                                             "|renderer": "function(v) { return String.format('{0}', v); }",
130                                             "|xns": "Roo.grid",
131                                             "*prop": "colModel[]"
132                                         },
133                                         {
134                                             "xtype": "ColumnModel",
135                                             "header": "Name",
136                                             "width": 200,
137                                             "dataIndex": "name",
138                                             "|renderer": "function(v) { return String.format('{0}', v); }",
139                                             "|xns": "Roo.grid",
140                                             "*prop": "colModel[]"
141                                         },
142                                         {
143                                             "xtype": "ColumnModel",
144                                             "header": "Remarks",
145                                             "width": 200,
146                                             "dataIndex": "remarks",
147                                             "|renderer": "function(v) { return String.format('{0}', v); }",
148                                             "|xns": "Roo.grid",
149                                             "*prop": "colModel[]"
150                                         },
151                                         {
152                                             "xtype": "ColumnModel",
153                                             "header": "Owner",
154                                             "width": 75,
155                                             "dataIndex": "owner_id",
156                                             "|renderer": "function(v) { return String.format('{0}', v); }",
157                                             "|xns": "Roo.grid",
158                                             "*prop": "colModel[]"
159                                         },
160                                         {
161                                             "xtype": "ColumnModel",
162                                             "header": "Code",
163                                             "width": 200,
164                                             "dataIndex": "code",
165                                             "|renderer": "function(v) { return String.format('{0}', v); }",
166                                             "|xns": "Roo.grid",
167                                             "*prop": "colModel[]"
168                                         },
169                                         {
170                                             "xtype": "ColumnModel",
171                                             "header": "Active",
172                                             "width": 75,
173                                             "dataIndex": "active",
174                                             "|renderer": "function(v) { return String.format('{0}', v); }",
175                                             "|xns": "Roo.grid",
176                                             "*prop": "colModel[]"
177                                         },
178                                         {
179                                             "xtype": "ColumnModel",
180                                             "header": "Type",
181                                             "width": 200,
182                                             "dataIndex": "type",
183                                             "|renderer": "function(v) { return String.format('{0}', v); }",
184                                             "|xns": "Roo.grid",
185                                             "*prop": "colModel[]"
186                                         },
187                                         {
188                                             "xtype": "ColumnModel",
189                                             "header": "Client",
190                                             "width": 75,
191                                             "dataIndex": "client_id",
192                                             "|renderer": "function(v) { return String.format('{0}', v); }",
193                                             "|xns": "Roo.grid",
194                                             "*prop": "colModel[]"
195                                         },
196                                         {
197                                             "xtype": "ColumnModel",
198                                             "header": "Team",
199                                             "width": 75,
200                                             "dataIndex": "team_id",
201                                             "|renderer": "function(v) { return String.format('{0}', v); }",
202                                             "|xns": "Roo.grid",
203                                             "*prop": "colModel[]"
204                                         },
205                                         {
206                                             "xtype": "ColumnModel",
207                                             "header": "File location",
208                                             "width": 200,
209                                             "dataIndex": "file_location",
210                                             "|renderer": "function(v) { return String.format('{0}', v); }",
211                                             "|xns": "Roo.grid",
212                                             "*prop": "colModel[]"
213                                         },
214                                         {
215                                             "xtype": "ColumnModel",
216                                             "header": "Open date",
217                                             "width": 75,
218                                             "dataIndex": "open_date",
219                                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
220                                             "|xns": "Roo.grid",
221                                             "*prop": "colModel[]"
222                                         },
223                                         {
224                                             "xtype": "ColumnModel",
225                                             "header": "Open by",
226                                             "width": 75,
227                                             "dataIndex": "open_by",
228                                             "|renderer": "function(v) { return String.format('{0}', v); }",
229                                             "|xns": "Roo.grid",
230                                             "*prop": "colModel[]"
231                                         },
232                                         {
233                                             "xtype": "ColumnModel",
234                                             "header": "Close date",
235                                             "width": 75,
236                                             "dataIndex": "close_date",
237                                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
238                                             "|xns": "Roo.grid",
239                                             "*prop": "colModel[]"
240                                         },
241                                         {
242                                             "xtype": "ColumnModel",
243                                             "header": "Countries",
244                                             "width": 200,
245                                             "dataIndex": "countries",
246                                             "|renderer": "function(v) { return String.format('{0}', v); }",
247                                             "|xns": "Roo.grid",
248                                             "*prop": "colModel[]"
249                                         },
250                                         {
251                                             "xtype": "ColumnModel",
252                                             "header": "Languages",
253                                             "width": 200,
254                                             "dataIndex": "languages",
255                                             "|renderer": "function(v) { return String.format('{0}', v); }",
256                                             "|xns": "Roo.grid",
257                                             "*prop": "colModel[]"
258                                         },
259                                         {
260                                             "xtype": "ColumnModel",
261                                             "header": "Agency",
262                                             "width": 75,
263                                             "dataIndex": "agency_id",
264                                             "|renderer": "function(v) { return String.format('{0}', v); }",
265                                             "|xns": "Roo.grid",
266                                             "*prop": "colModel[]"
267                                         }
268                                     ]
269                                 }
270                             ]
271                         }
272                     ]
273                 }
274             ]
275         }
276     ],
277     "permname": "",
278     "modOrder": "001"
279 }