Pman.Tab.AdminProjectManager.bjs
[Pman.Admin] / Pman.Tab.AdminProjectManager.bjs
1 {
2     "id": "roo-file-10",
3     "name": "Pman.Tab.AdminProjectManager",
4     "parent": "Pman.Tab.Admin",
5     "title": "Pman.Tab.AdminProjectManager",
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                                     "listeners": {
45                                         "|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}",
46                                         "|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"
47                                     },
48                                     "*prop": "grid",
49                                     "autoExpandColumn": "name",
50                                     "loadMask": true,
51                                     "xtype": "Grid",
52                                     "|xns": "Roo.grid",
53                                     "|": "function() {\n    \n}\n",
54                                     "items": [
55                                         {
56                                             "listeners": {
57                                                 "beforeload": "function (_self, options)\n{\n    if (!_this.searchBox) {\n        return false;\n    }  \n    o.params = o.params ? o.params : {};\n    o.params['query[project_search]'] = _this.searchBox.getValue();\n    o.params['query[project_filter]'] = _this.filter;\n}"
58                                             },
59                                             "*prop": "dataSource",
60                                             "remoteSort": true,
61                                             "xtype": "Store",
62                                             "|sortInfo": "{ field : 'code', direction: 'ASC' }",
63                                             "|xns": "Roo.data",
64                                             "items": [
65                                                 {
66                                                     "*prop": "proxy",
67                                                     "xtype": "HttpProxy",
68                                                     "method": "GET",
69                                                     "|url": "baseURL + '/Roo/Projects.php'",
70                                                     "|xns": "Roo.data"
71                                                 },
72                                                 {
73                                                     "|xns": "Roo.data",
74                                                     "xtype": "JsonReader",
75                                                     "totalProperty": "total",
76                                                     "root": "data",
77                                                     "*prop": "reader",
78                                                     "id": "id",
79                                                     "|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]"
80                                                 }
81                                             ]
82                                         },
83                                         {
84                                             "*prop": "footer",
85                                             "xtype": "PagingToolbar",
86                                             "pageSize": 25,
87                                             "displayInfo": true,
88                                             "displayMsg": "Displaying Projects{0} - {1} of {2}",
89                                             "emptyMsg": "No Projects found",
90                                             "|xns": "Roo"
91                                         },
92                                         {
93                                             "*prop": "toolbar",
94                                             "xtype": "Toolbar",
95                                             "|xns": "Roo",
96                                             "items": [
97                                                 {
98                                                     "text": "Add",
99                                                     "xtype": "Button",
100                                                     "cls": "x-btn-text-icon",
101                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
102                                                     "listeners": {
103                                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
104                                                     },
105                                                     "|xns": "Roo.Toolbar"
106                                                 },
107                                                 {
108                                                     "text": "Edit",
109                                                     "xtype": "Button",
110                                                     "cls": "x-btn-text-icon",
111                                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
112                                                     "listeners": {
113                                                         "|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"
114                                                     },
115                                                     "|xns": "Roo.Toolbar"
116                                                 },
117                                                 {
118                                                     "text": "Delete",
119                                                     "cls": "x-btn-text-icon",
120                                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
121                                                     "xtype": "Button",
122                                                     "listeners": {
123                                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'Projects'); \n}\n        "
124                                                     },
125                                                     "|xns": "Roo.Toolbar"
126                                                 }
127                                             ]
128                                         },
129                                         {
130                                             "xtype": "ColumnModel",
131                                             "header": "Type",
132                                             "width": 200,
133                                             "dataIndex": "type",
134                                             "|renderer": "function(v) { return String.format('{0}', v); }",
135                                             "|xns": "Roo.grid",
136                                             "*prop": "colModel[]"
137                                         },
138                                         {
139                                             "xtype": "ColumnModel",
140                                             "header": "Code",
141                                             "width": 200,
142                                             "dataIndex": "code",
143                                             "|renderer": "function(v) { return String.format('{0}', v); }",
144                                             "|xns": "Roo.grid",
145                                             "*prop": "colModel[]"
146                                         },
147                                         {
148                                             "xtype": "ColumnModel",
149                                             "header": "Name",
150                                             "width": 200,
151                                             "dataIndex": "name",
152                                             "|renderer": "function(v) { return String.format('{0}', v); }",
153                                             "|xns": "Roo.grid",
154                                             "*prop": "colModel[]"
155                                         },
156                                         {
157                                             "xtype": "ColumnModel",
158                                             "header": "Client",
159                                             "width": 75,
160                                             "dataIndex": "client_id",
161                                             "|renderer": "function(v) { return String.format('{0}', v); }",
162                                             "|xns": "Roo.grid",
163                                             "*prop": "colModel[]"
164                                         }
165                                     ]
166                                 }
167                             ]
168                         }
169                     ]
170                 }
171             ]
172         }
173     ],
174     "permname": "Core.Projects_All",
175     "modOrder": "002"
176 }