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             "listeners": {
10                 "activate": "function (_self)\n{\n    if (!_this.cal) {\n        return;\n    }\n    _this.cal.setDate(new Date());\n}"
11             },
12             "region": "center",
13             "title": "Schedule",
14             "xtype": "GridPanel",
15             "|xns": "Roo",
16             "items": [
17                 {
18                     "listeners": {
19                         "render": "function (grid)\n{\n    \n    _this.cal = grid;\n}",
20                         "eventclick": "function (_self, Ev,r )\n{\n    // show the dialog..\n    // reload the calendar on exit.\n    Roo.log(Ev);\n    Roo.log(r);\n}"
21                     },
22                     "*prop": "grid",
23                     "xtype": "Calendar",
24                     "|xns": "Roo.grid",
25                     "items": [
26                         {
27                             "|xns": "Roo",
28                             "xtype": "Toolbar",
29                             "*prop": "toolbar",
30                             "items": [
31                                 {
32                                     "listeners": {
33                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n  \n}",
34                                         "|render": "function (_self)\n{\n  _this.personSel = _self;\n}"
35                                     },
36                                     "allowBlank": true,
37                                     "displayField": "name",
38                                     "editable": true,
39                                     "emptyText": "Select Person ",
40                                     "fieldLabel": "Person ",
41                                     "forceSelection": true,
42                                     "listWidth": 600,
43                                     "loadingText": "Searching...",
44                                     "minChars": 2,
45                                     "name": "person_id_name",
46                                     "pageSize": 20,
47                                     "qtip": "Select Person ",
48                                     "queryParam": "query[name]",
49                                     "selectOnFocus": true,
50                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> ({company_id_name}) &lt;{email}&gt; </div>",
51                                     "triggerAction": "all",
52                                     "typeAhead": true,
53                                     "valueField": "id",
54                                     "width": 150,
55                                     "xtype": "ComboBox",
56                                     "|xns": "Roo.form",
57                                     "items": [
58                                         {
59                                             "listeners": {
60                                                 "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    o.company_id = Pman.Login.authUser.company_id;\n}"
61                                             },
62                                             "*prop": "store",
63                                             "xtype": "Store",
64                                             "|sortInfo": "{ field : 'name' , direction : 'ASC' }",
65                                             "|xns": "Roo.data",
66                                             "items": [
67                                                 {
68                                                     "*prop": "proxy",
69                                                     "xtype": "HttpProxy",
70                                                     "|url": "baseURL + '/Roo/Person.php'",
71                                                     "method": "GET",
72                                                     "|xns": "Roo.data"
73                                                 },
74                                                 {
75                                                     "*prop": "reader",
76                                                     "id": "id",
77                                                     "root": "data",
78                                                     "totalProperty": "total",
79                                                     "xtype": "JsonReader",
80                                                     "|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]",
81                                                     "|xns": "Roo.data"
82                                                 }
83                                             ]
84                                         }
85                                     ]
86                                 },
87                                 {
88                                     "listeners": {
89                                         "|click": "function (_self, e)\n{\n    _this.cal.load();\n}"
90                                     },
91                                     "cls": "x-btn-icon",
92                                     "xtype": "Button",
93                                     "|icon": "rootURL + '/Pman/templates/images/search.gif'",
94                                     "|xns": "Roo.Toolbar"
95                                 }
96                             ]
97                         },
98                         {
99                             "listeners": {
100                                 "beforeload": "function (_self, o)\n{\n    if (!_this.personSel) {\n        return false;\n    }\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 = _this.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       \n    }\n    _this.cal.setDate(new Date());\n    \n}"
101                             },
102                             "*prop": "eventStore",
103                             "xtype": "Store",
104                             "|xns": "Roo.data",
105                             "items": [
106                                 {
107                                     "*prop": "proxy",
108                                     "method": "GET",
109                                     "xtype": "HttpProxy",
110                                     "|url": "baseURL + '/Roo/mtrack_ticket'",
111                                     "|xns": "Roo.data"
112                                 },
113                                 {
114                                     "*prop": "reader",
115                                     "id": "id",
116                                     "root": "data",
117                                     "totalProperty": "total",
118                                     "xtype": "JsonReader",
119                                     "|xns": "Roo.data"
120                                 }
121                             ]
122                         }
123                     ]
124                 }
125             ]
126         }
127     ],
128     "permname": "",
129     "modOrder": "100"
130 }