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                             "listeners": {
32                                 "|activate": "function() {\n    _this.panel = this;\n    _this.dialog = Pman.Dialog.CoreProject;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
33                             },
34                             "background": true,
35                             "fitContainer": true,
36                             "fitToframe": true,
37                             "region": "center",
38                             "tableName": "Projects",
39                             "title": "Projects",
40                             "xtype": "GridPanel",
41                             "|xns": "Roo",
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                                     "filter": "P,U",
49                                     "*prop": "grid",
50                                     "autoExpandColumn": "name",
51                                     "loadMask": true,
52                                     "xtype": "Grid",
53                                     "|getTypes": "function() {\n    return [\n        [  'U' , \"Project (Unconfirmed)\" ],\n        [  'P' , \"Project\" ],\n        [  'C' , \"Project (Closed)\" ],\n        [  'N' , \"Non-Project\" ],\n        [  'X' , \"Non-Project (Closed)\" ]\n\n    ];\n}\n",
54                                     "|typeToString": "function(v)\n{\n    var ar = this.getTypes();\n    var ret = '';\n    Roo.each(ar, function(a) {\n        if (a[0] == v) {\n            ret = a[1];\n            return false;\n        }\n    });\n    return ret;\n}\n",
55                                     "|xns": "Roo.grid",
56                                     "items": [
57                                         {
58                                             "listeners": {
59                                                 "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}"
60                                             },
61                                             "*prop": "dataSource",
62                                             "remoteSort": true,
63                                             "xtype": "Store",
64                                             "|sortInfo": "{ field : 'code', direction: 'ASC' }",
65                                             "|xns": "Roo.data",
66                                             "items": [
67                                                 {
68                                                     "*prop": "proxy",
69                                                     "xtype": "HttpProxy",
70                                                     "method": "GET",
71                                                     "|url": "baseURL + '/Roo/Projects.php'",
72                                                     "|xns": "Roo.data"
73                                                 },
74                                                 {
75                                                     "|xns": "Roo.data",
76                                                     "xtype": "JsonReader",
77                                                     "totalProperty": "total",
78                                                     "root": "data",
79                                                     "*prop": "reader",
80                                                     "id": "id",
81                                                     "|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]"
82                                                 }
83                                             ]
84                                         },
85                                         {
86                                             "*prop": "footer",
87                                             "displayInfo": true,
88                                             "displayMsg": "Displaying Projects {0} - {1} of {2}",
89                                             "emptyMsg": "No Projects found",
90                                             "pageSize": 25,
91                                             "xtype": "PagingToolbar",
92                                             "|xns": "Roo"
93                                         },
94                                         {
95                                             "*prop": "toolbar",
96                                             "xtype": "Toolbar",
97                                             "|xns": "Roo",
98                                             "items": [
99                                                 {
100                                                     "listeners": {
101                                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
102                                                     },
103                                                     "cls": "x-btn-text-icon",
104                                                     "text": "Add",
105                                                     "xtype": "Button",
106                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
107                                                     "|xns": "Roo.Toolbar"
108                                                 },
109                                                 {
110                                                     "text": "Edit",
111                                                     "xtype": "Button",
112                                                     "cls": "x-btn-text-icon",
113                                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
114                                                     "listeners": {
115                                                         "|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"
116                                                     },
117                                                     "|xns": "Roo.Toolbar"
118                                                 },
119                                                 {
120                                                     "|xns": "Roo.Toolbar",
121                                                     "xtype": "Separator"
122                                                 },
123                                                 {
124                                                     "listeners": {
125                                                         "render": "function (_self)\n{\n    _this.searchBox = _self;\n}",
126                                                         "specialkey": "function (_self, e)\n{\n\n}"
127                                                     },
128                                                     "xtype": "TextField",
129                                                     "|xns": "Roo.form"
130                                                 }
131                                             ]
132                                         },
133                                         {
134                                             "*prop": "colModel[]",
135                                             "dataIndex": "type",
136                                             "header": "Type",
137                                             "width": 200,
138                                             "xtype": "ColumnModel",
139                                             "|renderer": "function(v) { return _this.grid.typeToString(v);}",
140                                             "|xns": "Roo.grid"
141                                         },
142                                         {
143                                             "xtype": "ColumnModel",
144                                             "header": "Code",
145                                             "width": 200,
146                                             "dataIndex": "code",
147                                             "|renderer": "function(v) { return String.format('{0}', v); }",
148                                             "|xns": "Roo.grid",
149                                             "*prop": "colModel[]"
150                                         },
151                                         {
152                                             "xtype": "ColumnModel",
153                                             "header": "Name",
154                                             "width": 200,
155                                             "dataIndex": "name",
156                                             "|renderer": "function(v) { return String.format('{0}', v); }",
157                                             "|xns": "Roo.grid",
158                                             "*prop": "colModel[]"
159                                         },
160                                         {
161                                             "xtype": "ColumnModel",
162                                             "header": "Client",
163                                             "width": 75,
164                                             "dataIndex": "client_id",
165                                             "|renderer": "function(v) { return String.format('{0}', v); }",
166                                             "|xns": "Roo.grid",
167                                             "*prop": "colModel[]"
168                                         }
169                                     ]
170                                 }
171                             ]
172                         }
173                     ]
174                 }
175             ]
176         }
177     ],
178     "permname": "Core.Projects_All",
179     "modOrder": "002"
180 }