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