Pman.Tab.MtrackCal.bjs
[Pman.MTrack] / Pman.Tab.MtrackCal.bjs
1 {
2     "id": "roo-file-360",
3     "name": "Pman.Tab.MtrackCal",
4     "parent": "Pman.Tab.DocumentsTab",
5     "title": "Pman.Tab.MtrackCal",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MtrackCal.bjs",
7     "items": [
8         {
9             "region": "center",
10             "title": "Schedule",
11             "xtype": "GridPanel",
12             "|xns": "Roo",
13             "items": [
14                 {
15                     "listeners": {
16                         "render": "function (grid)\n{\n    \n    _this.cal = grid;\n}",
17                         "eventclick": "function (_self, Ev)\n{\n    // show the dialog..\n    // reload the calendar on exit.\n    Roo.log(Ev);\n}"
18                     },
19                     "*prop": "grid",
20                     "xtype": "Calendar",
21                     "|xns": "Roo.grid",
22                     "items": [
23                         {
24                             "|xns": "Roo",
25                             "xtype": "Toolbar",
26                             "*prop": "toolbar",
27                             "items": [
28                                 {
29                                     "listeners": {
30                                         "|click": "function (_self, e)\n{\n    _this.grid.load();\n}"
31                                     },
32                                     "cls": "x-btn-icon",
33                                     "xtype": "Button",
34                                     "|icon": "rootURL + '/Pman/templates/images/search.gif'",
35                                     "|xns": "Roo.Toolbar"
36                                 },
37                                 {
38                                     "listeners": {
39                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n  \n}",
40                                         "|render": "function (_self)\n{\n  _this.personSel = _self;\n}"
41                                     },
42                                     "allowBlank": true,
43                                     "displayField": "name",
44                                     "editable": true,
45                                     "emptyText": "Select Person ",
46                                     "fieldLabel": "Person ",
47                                     "forceSelection": true,
48                                     "listWidth": 600,
49                                     "loadingText": "Searching...",
50                                     "minChars": 2,
51                                     "name": "person_id_name",
52                                     "pageSize": 20,
53                                     "qtip": "Select Person ",
54                                     "queryParam": "query[name]",
55                                     "selectOnFocus": true,
56                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> ({company_id_name}) &lt;{email}&gt; </div>",
57                                     "triggerAction": "all",
58                                     "typeAhead": true,
59                                     "valueField": "id",
60                                     "width": 150,
61                                     "xtype": "ComboBox",
62                                     "|xns": "Roo.form",
63                                     "items": [
64                                         {
65                                             "listeners": {
66                                                 "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    o.company_id = Pman.Login.authUser.company_id;\n}"
67                                             },
68                                             "*prop": "store",
69                                             "xtype": "Store",
70                                             "|sortInfo": "{ field : 'name' , direction : 'ASC' }",
71                                             "|xns": "Roo.data",
72                                             "items": [
73                                                 {
74                                                     "*prop": "proxy",
75                                                     "xtype": "HttpProxy",
76                                                     "|url": "baseURL + '/Roo/Person.php'",
77                                                     "method": "GET",
78                                                     "|xns": "Roo.data"
79                                                 },
80                                                 {
81                                                     "*prop": "reader",
82                                                     "id": "id",
83                                                     "root": "data",
84                                                     "totalProperty": "total",
85                                                     "xtype": "JsonReader",
86                                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'phone',\n        'type': 'string'\n    },\n    {\n        'name': 'fax',\n        'type': 'string'\n    },\n    {\n        'name': 'email',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'role',\n        'type': 'string'\n    },\n    {\n        'name': 'active',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'lang',\n        'type': 'string'\n    },\n    {\n        'name': 'no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'office_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'office_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'office_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_address',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_address',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_tel',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_isOwner',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_logo_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_background_color',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_comptype',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_url',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_main_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_created_by',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_created_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'company_id_updated_by',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_updated_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'company_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_dispatch_port',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_province',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_country',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_client_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_team_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_file_location',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_open_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_open_by',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_close_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_countries',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_languages',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_agency_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    {\n        'name': 'owner_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_dt',\n        'type': 'date'\n    }\n]",
87                                                     "|xns": "Roo.data"
88                                                 }
89                                             ]
90                                         }
91                                     ]
92                                 }
93                             ]
94                         },
95                         {
96                             "listeners": {
97                                 "beforeload": "function (_self, options)\n{\n   o = o || {};\n    o.params = o.params || {};\n    o.params._future_schedule = 1;\n    o.params['query[viewtype]']= 'active'\n    o.params.limit= 999\n    o.params.sort = 'summary';\n    o.params.dir = 'ASC';\n    var pid = personSel.getValue();\n    if (pid*1) {\n        o.params['filter[person_id]'] = pid;\n    }\n try { \n         o.params['filter[project_id]']   = Pman.Tab.DocumentsTab.panel.getProjectId();\n    } catch(e) {\n        o.params['filter[project_id]']   = MTrack.projectCombo.getValue();\n    }\n    \n}"
98                             },
99                             "*prop": "eventStore",
100                             "xtype": "Store",
101                             "|xns": "Roo.data",
102                             "items": [
103                                 {
104                                     "*prop": "proxy",
105                                     "|url": "baseURL + '/Roo/mtrack_ticket'",
106                                     "xtype": "HttpProxy",
107                                     "|xns": "Roo.data"
108                                 },
109                                 {
110                                     "*prop": "reader",
111                                     "id": "id",
112                                     "root": "data",
113                                     "totalProperty": "total",
114                                     "xtype": "JsonReader",
115                                     "|xns": "Roo.data"
116                                 }
117                             ]
118                         }
119                     ]
120                 }
121             ]
122         }
123     ],
124     "permname": "",
125     "modOrder": "100"
126 }