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