php warnings
[Pman.MTrack] / Pman.Tab.MtrackCal.bjs
1 {
2  "name" : "Pman.Tab.MtrackCal",
3  "parent" : "Pman.Tab.DocumentsTab",
4  "title" : "Pman.Tab.MtrackCal",
5  "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MtrackCal.bjs",
6  "permname" : "",
7  "modOrder" : "100",
8  "strings" : {
9   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
10   "340c2ee497b85d5954b01c64de7f44f6" : "Select Person ",
11   "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person ",
12   "25f7347236b51a5eae4ba01a7862cb55" : "Schedule"
13  },
14  "items" : [
15   {
16    "listeners" : {
17     "activate" : "function (_self)\n{\n    if (!_this.cal) {\n        return;\n    }\n    _this.cal.setDate(new Date());\n}"
18    },
19    "region" : "center",
20    "xtype" : "GridPanel",
21    "title" : "Schedule",
22    "$ xns" : "Roo",
23    "items" : [
24     {
25      "listeners" : {
26       "eventrender" : "function (_self, rec)\n{\n    \n    rec.data.time = ''; // not needed\n    rec.data.title = rec.data.developer_id_name + ' ' + rec.data.project_id_name;\n    rec.data.qtip  = '#' + rec.data.id + ' ' + rec.data.summary;\n    \n    if (!rec.data.estimated) {\n        rec.data.cls = \"Greys-q3-6 fc-black-text  \"; // grey...\n    } else {\n        rec.data.cls = 'fc-black-text RdYlGn-q' + rec.data.priority_id_seqid +'-7'\n    }\n    \n                    \n}",
27       "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      Pman.Dialog.MTrackTicket.show({ id : r.data.id } , function(res) {\n        // update the record..\n        // redra\n        Roo.log(\"ticket updated\");\n        // start / end times? - not sent through, so it should not update..\n        for(k in res) {\n            r.data[k] = res[k];\n        }\n        \n        _this.cal.renderEvents();\n        \n    \n    });\n}",
28       "render" : "function (grid)\n{\n    \n    _this.cal = grid;\n}"
29      },
30      "xtype" : "Calendar",
31      "$ xns" : "Roo.grid",
32      "* prop" : "grid",
33      "items" : [
34       {
35        "xtype" : "Toolbar",
36        "$ xns" : "Roo",
37        "* prop" : "toolbar",
38        "items" : [
39         {
40          "listeners" : {
41           "|render" : "function (_self)\n{\n  _this.personSel = _self;\n}",
42           "|select" : "function (combo, record, index)\n{\n  _this.cal.load();\n  \n}",
43           "select" : "function (combo, record, index)\n{\n\n}"
44          },
45          "listWidth" : 600,
46          "triggerAction" : "all",
47          "fieldLabel" : "Person ",
48          "forceSelection" : true,
49          "selectOnFocus" : true,
50          "pageSize" : 20,
51          "displayField" : "name",
52          "emptyText" : "Select Person ",
53          "minChars" : 2,
54          "valueField" : "id",
55          "xtype" : "ComboBox",
56          "allowBlank" : true,
57          "typeAhead" : true,
58          "editable" : true,
59          "width" : 150,
60          "$ xns" : "Roo.form",
61          "name" : "person_id_name",
62          "qtip" : "Select Person ",
63          "queryParam" : "query[name]",
64          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> ({company_id_name}) &lt;{email}&gt; </div>",
65          "loadingText" : "Searching...",
66          "items" : [
67           {
68            "listeners" : {
69             "|beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    o.company_id = Pman.Login.authUser.company_id;\n    o.params['query[role]'] = 'DEVELOPER';\n}"
70            },
71            "xtype" : "Store",
72            "$ sortInfo" : "{ field : 'name' , direction : 'ASC' }",
73            "$ xns" : "Roo.data",
74            "* prop" : "store",
75            "items" : [
76             {
77              "$ url" : "baseURL + '/Roo/Person.php'",
78              "xtype" : "HttpProxy",
79              "method" : "GET",
80              "$ xns" : "Roo.data",
81              "* prop" : "proxy"
82             },
83             {
84              "id" : "id",
85              "root" : "data",
86              "xtype" : "JsonReader",
87              "$ 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]",
88              "$ xns" : "Roo.data",
89              "* prop" : "reader",
90              "totalProperty" : "total"
91             }
92            ]
93           }
94          ]
95         },
96         {
97          "listeners" : {
98           "|click" : "function (_self, e)\n{\n    _this.cal.load();\n}"
99          },
100          "xtype" : "Button",
101          "cls" : "x-btn-icon",
102          "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
103          "$ xns" : "Roo.Toolbar"
104         }
105        ]
106       },
107       {
108        "listeners" : {
109         "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[developer_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}"
110        },
111        "xtype" : "Store",
112        "$ xns" : "Roo.data",
113        "* prop" : "eventStore",
114        "items" : [
115         {
116          "$ url" : "baseURL + '/Roo/mtrack_ticket'",
117          "xtype" : "HttpProxy",
118          "method" : "GET",
119          "$ xns" : "Roo.data",
120          "* prop" : "proxy"
121         },
122         {
123          "id" : "id",
124          "root" : "data",
125          "xtype" : "JsonReader",
126          "$ xns" : "Roo.data",
127          "* prop" : "reader",
128          "totalProperty" : "total"
129         }
130        ]
131       }
132      ]
133     }
134    ]
135   }
136  ]
137 }