// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+Roo.namespace('Pman.Tab');
+
Pman.Tab.MtrackCal = new Roo.XComponent({
- part : ["MTrack","MtrackCal"],
- order : '100-Pman.Tab.MtrackCal',
- region : 'center',
- parent : 'Pman.Tab.DocumentsTab',
- name : "Pman.Tab.MtrackCal",
- disabled : false,
- permname : '',
- _tree : function()
- {
- var _this = this;
- var MODULE = this;
- return {
- xtype: 'GridPanel',
- xns: Roo,
- listeners : {
- activate : function (_self)
- {
- if (!_this.cal) {
- return;
- }
- _this.cal.setDate(new Date());
- }
- },
- region : 'center',
- title : "Schedule",
- grid : {
- xtype: 'Calendar',
- xns: Roo.grid,
- listeners : {
- render : function (grid)
- {
-
- _this.cal = grid;
- },
- eventclick : function (_self, Ev,r )
- {
- // show the dialog..
- // reload the calendar on exit.
- Roo.log(Ev);
- Roo.log(r);
- Pman.Dialog.MTrackTicket.show({ id : r.id } , function(res) {
- _this.cal.load();
-
- });
- },
- eventrender : function (_self, rec)
- {
-
- rec.data.time = ''; // not needed
- rec.data.title = rec.data.developer_id_name + ' ' + rec.data.project_id_name;
- rec.data.qtip = '#' + rec.data.id + ' ' + rec.data.summary;
-
- if (!rec.data.estimated) {
- rec.data.cls = "Greys-q3-6"; // grey...
- } else {
- rec.data.cls = 'RdYlGn-q' + rec.data.priority_id_seqid +'-7'
- }
-
-
- }
- },
- toolbar : {
- xtype: 'Toolbar',
- xns: Roo,
- items : [
- {
- xtype: 'ComboBox',
- xns: Roo.form,
- listeners : {
- select : function (combo, record, index)
- {
- _this.grid.footer.onClick('first');
-
- },
- render : function (_self)
- {
- _this.personSel = _self;
- }
- },
- allowBlank : true,
- displayField : 'name',
- editable : true,
- emptyText : "Select Person ",
- fieldLabel : 'Person ',
- forceSelection : true,
- listWidth : 600,
- loadingText : "Searching...",
- minChars : 2,
- name : 'person_id_name',
- pageSize : 20,
- qtip : "Select Person ",
- queryParam : 'query[name]',
- selectOnFocus : true,
- tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> ({company_id_name}) <{email}> </div>',
- triggerAction : 'all',
- typeAhead : true,
- valueField : 'id',
- width : 150,
- store : {
- xtype: 'Store',
- xns: Roo.data,
- listeners : {
- beforeload : function (_self, o)
- {
- o.params = o.params || {};
- o.company_id = Pman.Login.authUser.company_id;
- o.params['query[role]'] = 'DEVELOPER';
- }
- },
- sortInfo : { field : 'name' , direction : 'ASC' },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- url : baseURL + '/Roo/Person.php',
- method : 'GET'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total',
- fields : [
- {
- 'name': 'id',
- 'type': 'int'
- },
- {
- 'name': 'office_id',
- 'type': 'int'
- },
- {
- 'name': 'name',
- 'type': 'string'
- },
- {
- 'name': 'phone',
- 'type': 'string'
- },
- {
- 'name': 'fax',
- 'type': 'string'
- },
- {
- 'name': 'email',
- 'type': 'string'
- },
- {
- 'name': 'company_id',
- 'type': 'int'
- },
- {
- 'name': 'role',
- 'type': 'string'
- },
- {
- 'name': 'active',
- 'type': 'int'
- },
- {
- 'name': 'remarks',
- 'type': 'string'
- },
- {
- 'name': 'passwd',
- 'type': 'string'
- },
- {
- 'name': 'owner_id',
- 'type': 'int'
- },
- {
- 'name': 'lang',
- 'type': 'string'
- },
- {
- 'name': 'no_reset_sent',
- 'type': 'int'
- },
- {
- 'name': 'action_type',
- 'type': 'string'
- },
- {
- 'name': 'project_id',
- 'type': 'int'
- },
- {
- 'name': 'deleted_by',
- 'type': 'int'
- },
- {
- 'name': 'deleted_dt',
- 'type': 'date',
- 'dateFormat': 'Y-m-d'
- },
- {
- 'name': 'office_id_id',
- 'type': 'int'
- },
- {
- 'name': 'office_id_company_id',
- 'type': 'int'
- },
- {
- 'name': 'office_id_name',
- 'type': 'string'
- },
- {
- 'name': 'office_id_address',
- 'type': 'string'
- },
- {
- 'name': 'office_id_phone',
- 'type': 'string'
- },
- {
- 'name': 'office_id_fax',
- 'type': 'string'
- },
- {
- 'name': 'office_id_email',
- 'type': 'string'
- },
- {
- 'name': 'office_id_role',
- 'type': 'string'
- },
- {
- 'name': 'company_id_code',
- 'type': 'string'
- },
- {
- 'name': 'company_id_name',
- 'type': 'string'
- },
- {
- 'name': 'company_id_remarks',
- 'type': 'string'
- },
- {
- 'name': 'company_id_owner_id',
- 'type': 'int'
- },
- {
- 'name': 'company_id_address',
- 'type': 'string'
- },
- {
- 'name': 'company_id_tel',
- 'type': 'string'
- },
- {
- 'name': 'company_id_fax',
- 'type': 'string'
- },
- {
- 'name': 'company_id_email',
- 'type': 'string'
- },
- {
- 'name': 'company_id_id',
- 'type': 'int'
- },
- {
- 'name': 'company_id_isOwner',
- 'type': 'int'
- },
- {
- 'name': 'company_id_logo_id',
- 'type': 'int'
- },
- {
- 'name': 'company_id_background_color',
- 'type': 'string'
- },
- {
- 'name': 'company_id_comptype',
- 'type': 'string'
- },
- {
- 'name': 'company_id_url',
- 'type': 'string'
- },
- {
- 'name': 'company_id_main_office_id',
- 'type': 'int'
- },
- {
- 'name': 'company_id_created_by',
- 'type': 'int'
- },
- {
- 'name': 'company_id_created_dt',
- 'type': 'date'
- },
- {
- 'name': 'company_id_updated_by',
- 'type': 'int'
- },
- {
- 'name': 'company_id_updated_dt',
- 'type': 'date'
- },
- {
- 'name': 'company_id_passwd',
- 'type': 'string'
- },
- {
- 'name': 'company_id_dispatch_port',
- 'type': 'string'
- },
- {
- 'name': 'company_id_province',
- 'type': 'string'
- },
- {
- 'name': 'company_id_country',
- 'type': 'string'
- },
- {
- 'name': 'project_id_id',
- 'type': 'int'
- },
- {
- 'name': 'project_id_name',
- 'type': 'string'
- },
- {
- 'name': 'project_id_remarks',
- 'type': 'string'
- },
- {
- 'name': 'project_id_owner_id',
- 'type': 'int'
- },
- {
- 'name': 'project_id_code',
- 'type': 'string'
- },
- {
- 'name': 'project_id_active',
- 'type': 'int'
- },
- {
- 'name': 'project_id_type',
- 'type': 'string'
- },
- {
- 'name': 'project_id_client_id',
- 'type': 'int'
- },
- {
- 'name': 'project_id_team_id',
- 'type': 'int'
- },
- {
- 'name': 'project_id_file_location',
- 'type': 'string'
- },
- {
- 'name': 'project_id_open_date',
- 'type': 'date'
- },
- {
- 'name': 'project_id_open_by',
- 'type': 'int'
- },
- {
- 'name': 'project_id_close_date',
- 'type': 'date'
- },
- {
- 'name': 'project_id_countries',
- 'type': 'string'
- },
- {
- 'name': 'project_id_languages',
- 'type': 'string'
- },
- {
- 'name': 'project_id_agency_id',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_id',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_office_id',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_name',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_phone',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_fax',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_email',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_company_id',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_role',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_active',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_remarks',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_passwd',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_owner_id',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_lang',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_no_reset_sent',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_action_type',
- 'type': 'string'
- },
- {
- 'name': 'owner_id_project_id',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_deleted_by',
- 'type': 'int'
- },
- {
- 'name': 'owner_id_deleted_dt',
- 'type': 'date'
- }
- ]
- }
- }
- },
- {
- xtype: 'Button',
- xns: Roo.Toolbar,
- listeners : {
- click : function (_self, e)
- {
- _this.cal.load();
- }
- },
- cls : 'x-btn-icon',
- icon : rootURL + '/Pman/templates/images/search.gif'
- }
- ]
- },
- eventStore : {
- xtype: 'Store',
- xns: Roo.data,
- listeners : {
- beforeload : function (_self, o)
- {
- if (!_this.personSel) {
- return false;
- }
-
- o = o || {};
- o.params = o.params || {};
- o.params._future_schedule = 1;
- o.params['query[viewtype]']= 'active'
- o.params.limit= 999
- o.params.sort = 'summary';
- o.params.dir = 'ASC';
- var pid = _this.personSel.getValue();
- if (pid*1) {
- o.params['filter[developer_id]'] = pid;
- }
- try {
- o.params['filter[project_id]'] = Pman.Tab.DocumentsTab.panel.getProjectId();
- } catch(e) {
-
- }
- _this.cal.setDate(new Date());
-
- }
- },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/Roo/mtrack_ticket'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total'
- }
- }
- }
- };
+
+ _strings : {
+ '1243daf593fa297e07ab03bf06d925af' :"Searching...",
+ '340c2ee497b85d5954b01c64de7f44f6' :"Select Person ",
+ '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person ",
+ '25f7347236b51a5eae4ba01a7862cb55' :"Schedule"
+ },
+
+ part : ["MTrack", "MtrackCal" ],
+ order : '100-Pman.Tab.MtrackCal',
+ region : 'center',
+ parent : 'Pman.Tab.DocumentsTab',
+ name : "Pman.Tab.MtrackCal",
+ disabled : false,
+ permname : '',
+ _tree : function()
+ {
+ var _this = this;
+ var MODULE = this;
+ return {
+ region : 'center',
+ title : _this._strings['25f7347236b51a5eae4ba01a7862cb55'] /* Schedule */,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'GridPanel',
+ listeners : {
+ activate : function (_self)
+ {
+ if (!_this.cal) {
+ return;
+ }
+ _this.cal.setDate(new Date());
+ }
+ },
+ grid : {
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'Calendar',
+ listeners : {
+ eventclick : function (_self, Ev,r )
+ {
+ // show the dialog..
+ // reload the calendar on exit.
+ Roo.log(Ev);
+ Roo.log(r);
+ Pman.Dialog.MTrackTicket.show({ id : r.data.id } , function(res) {
+ // update the record..
+ // redra
+ Roo.log("ticket updated");
+ // start / end times? - not sent through, so it should not update..
+ for(k in res) {
+ r.data[k] = res[k];
+ }
+
+ _this.cal.renderEvents();
+
+
+ });
+ },
+ eventrender : function (_self, rec)
+ {
+
+ rec.data.time = ''; // not needed
+ rec.data.title = rec.data.developer_id_name + ' ' + rec.data.project_id_name;
+ rec.data.qtip = '#' + rec.data.id + ' ' + rec.data.summary;
+
+ if (!rec.data.estimated) {
+ rec.data.cls = "Greys-q3-6 fc-black-text "; // grey...
+ } else {
+ rec.data.cls = 'fc-black-text RdYlGn-q' + rec.data.priority_id_seqid +'-7'
+ }
+
+
+ },
+ render : function (grid)
+ {
+
+ _this.cal = grid;
+ }
+ },
+ eventStore : {
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'Store',
+ listeners : {
+ beforeload : function (_self, o)
+ {
+ if (!_this.personSel) {
+ return false;
+ }
+
+ o = o || {};
+ o.params = o.params || {};
+ o.params._future_schedule = 1;
+ o.params['query[viewtype]']= 'active';
+ o.params.limit= 999;
+ o.params.sort = 'summary';
+ o.params.dir = 'ASC';
+ var pid = _this.personSel.getValue();
+ if (pid*1) {
+ o.params['filter[developer_id]'] = pid;
+ }
+ try {
+ o.params['filter[project_id]'] = Pman.Tab.DocumentsTab.panel.getProjectId();
+ } catch(e) {
+
+ }
+ _this.cal.setDate(new Date());
+
+ }
+ },
+ proxy : {
+ method : 'GET',
+ url : baseURL + '/Roo/mtrack_ticket',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'HttpProxy'
+ },
+ reader : {
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'JsonReader'
+ }
+ },
+ toolbar : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'Toolbar',
+ items : [
+ {
+ allowBlank : true,
+ displayField : 'name',
+ editable : true,
+ emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
+ fieldLabel : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
+ forceSelection : true,
+ listWidth : 600,
+ loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+ minChars : 2,
+ name : 'person_id_name',
+ pageSize : 20,
+ qtip : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
+ queryParam : 'query[name]',
+ selectOnFocus : true,
+ tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> ({company_id_name}) <{email}> </div>',
+ triggerAction : 'all',
+ typeAhead : true,
+ valueField : 'id',
+ width : 150,
+ xns : Roo.form,
+ '|xns' : 'Roo.form',
+ xtype : 'ComboBox',
+ listeners : {
+ render : function (_self)
+ {
+ _this.personSel = _self;
+ },
+ select : function (combo, record, index)
+ {
+ _this.cal.load();
+
+ }
+ },
+ store : {
+ sortInfo : { field : 'name' , direction : 'ASC' },
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'Store',
+ listeners : {
+ beforeload : function (_self, o)
+ {
+ o.params = o.params || {};
+ o.company_id = Pman.Login.authUser.company_id;
+ o.params['query[role]'] = 'DEVELOPER';
+ }
+ },
+ proxy : {
+ method : 'GET',
+ url : baseURL + '/Roo/Person.php',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'HttpProxy'
+ },
+ reader : {
+ fields : [
+ {
+ 'name': 'id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'office_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'name',
+ 'type': 'string'
+ },
+ {
+ 'name': 'phone',
+ 'type': 'string'
+ },
+ {
+ 'name': 'fax',
+ 'type': 'string'
+ },
+ {
+ 'name': 'email',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'role',
+ 'type': 'string'
+ },
+ {
+ 'name': 'active',
+ 'type': 'int'
+ },
+ {
+ 'name': 'remarks',
+ 'type': 'string'
+ },
+ {
+ 'name': 'passwd',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'lang',
+ 'type': 'string'
+ },
+ {
+ 'name': 'no_reset_sent',
+ 'type': 'int'
+ },
+ {
+ 'name': 'action_type',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'deleted_by',
+ 'type': 'int'
+ },
+ {
+ 'name': 'deleted_dt',
+ 'type': 'date',
+ 'dateFormat': 'Y-m-d'
+ },
+ {
+ 'name': 'office_id_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'office_id_company_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'office_id_name',
+ 'type': 'string'
+ },
+ {
+ 'name': 'office_id_address',
+ 'type': 'string'
+ },
+ {
+ 'name': 'office_id_phone',
+ 'type': 'string'
+ },
+ {
+ 'name': 'office_id_fax',
+ 'type': 'string'
+ },
+ {
+ 'name': 'office_id_email',
+ 'type': 'string'
+ },
+ {
+ 'name': 'office_id_role',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_code',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_name',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_remarks',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_owner_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_address',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_tel',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_fax',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_email',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_isOwner',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_logo_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_background_color',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_comptype',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_url',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_main_office_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_created_by',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_created_dt',
+ 'type': 'date'
+ },
+ {
+ 'name': 'company_id_updated_by',
+ 'type': 'int'
+ },
+ {
+ 'name': 'company_id_updated_dt',
+ 'type': 'date'
+ },
+ {
+ 'name': 'company_id_passwd',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_dispatch_port',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_province',
+ 'type': 'string'
+ },
+ {
+ 'name': 'company_id_country',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'project_id_name',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_remarks',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_owner_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'project_id_code',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_active',
+ 'type': 'int'
+ },
+ {
+ 'name': 'project_id_type',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_client_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'project_id_team_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'project_id_file_location',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_open_date',
+ 'type': 'date'
+ },
+ {
+ 'name': 'project_id_open_by',
+ 'type': 'int'
+ },
+ {
+ 'name': 'project_id_close_date',
+ 'type': 'date'
+ },
+ {
+ 'name': 'project_id_countries',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_languages',
+ 'type': 'string'
+ },
+ {
+ 'name': 'project_id_agency_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_office_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_name',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_phone',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_fax',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_email',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_company_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_role',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_active',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_remarks',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_passwd',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_owner_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_lang',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_no_reset_sent',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_action_type',
+ 'type': 'string'
+ },
+ {
+ 'name': 'owner_id_project_id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_deleted_by',
+ 'type': 'int'
+ },
+ {
+ 'name': 'owner_id_deleted_dt',
+ 'type': 'date'
+ }
+ ],
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'JsonReader'
+ }
+ }
+ },
+ {
+ cls : 'x-btn-icon',
+ icon : rootURL + '/Pman/templates/images/search.gif',
+ xns : Roo.Toolbar,
+ '|xns' : 'Roo.Toolbar',
+ xtype : 'Button',
+ listeners : {
+ click : function (_self, e)
+ {
+ _this.cal.load();
+ }
+ }
+ }
+ ]
}
+ }
+ }; }
});