xns: Roo,
listeners : {
activate : function() {
- _this.wpanel = this;
- if (_this.wgrid) {
- _this.wgrid.footer.onClick('first');
+ _this.panel = this;
+ if (_this.grid) {
+ _this.grid.footer.onClick('first');
}
}
},
- background : true,
+ background : false,
fitContainer : true,
fitToframe : true,
region : 'west',
- tableName : 'clipping_journalist',
- title : "Publication Lists",
+ tableName : 'Events',
+ title : "Events",
grid : {
xtype: 'Grid',
xns: Roo.grid,
listeners : {
- render : function()
- {
- _this.wgrid = this;
+ render : function() {
+ _this.grid = this;
//_this.dialog = Pman.Dialog.FILL_IN
- if (_this.wpanel.active) {
+ if (_this.panel.active) {
this.footer.onClick('first');
}
}
},
- autoExpandColumn : 'publication',
+ autoExpandColumn : 'event_when',
loadMask : true,
+ sm : {
+ xtype: 'RowSelectionModel',
+ xns: Roo.grid,
+ listeners : {
+ afterselectionchange : function (_self)
+ {
+
+ if (!this.getSelected()) {
+ _this.viewPanel.setContent("Nothing Selected");
+ return;
+ }
+
+ _this.viewPanel.setContent("data");
+ }
+ },
+ singleSelect : true
+ },
dataSource : {
xtype: 'Store',
xns: Roo.data,
listeners : {
beforeload : function (_self, o)
{
- o.params = o.params || {};
- o.params._list = 1;
+ Roo.log(_this.data);
+ o.params = o.parmas || {};
+ o.action = 'AUTOSAVE';
+
}
},
remoteSort : true,
- sortInfo : { field : 'publication', direction: 'ASC' },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/Roo/Groups.php'
- },
+ sortInfo : { field: 'event_when', direction: 'DESC'},
reader : {
xtype: 'JsonReader',
xns: Roo.data,
'type': 'int'
},
{
- 'name': 'name',
+ 'name': 'person_name',
'type': 'string'
},
{
- 'name': 'type',
- 'type': 'int'
+ 'name': 'event_when',
+ 'type': 'date',
+ 'dateFormat': 'Y-m-d'
},
{
- 'name': 'leader',
- 'type': 'int'
- },
- {
- 'name': 'leader_id',
- 'type': 'int'
- },
- {
- 'name': 'leader_office_id',
- 'type': 'int'
- },
- {
- 'name': 'leader_name',
- 'type': 'string'
- },
- {
- 'name': 'leader_phone',
+ 'name': 'action',
'type': 'string'
},
{
- 'name': 'leader_fax',
+ 'name': 'ipaddr',
'type': 'string'
},
{
- 'name': 'leader_email',
- 'type': 'string'
- },
- {
- 'name': 'leader_company_id',
+ 'name': 'on_id',
'type': 'int'
},
{
- 'name': 'leader_role',
+ 'name': 'on_table',
'type': 'string'
},
{
- 'name': 'leader_active',
+ 'name': 'person_id',
'type': 'int'
},
{
- 'name': 'leader_remarks',
+ 'name': 'remarks',
'type': 'string'
},
{
- 'name': 'leader_passwd',
- 'type': 'string'
+ 'name': 'person_id_id',
+ 'type': 'int'
},
{
- 'name': 'leader_owner_id',
+ 'name': 'person_id_office_id',
'type': 'int'
},
{
- 'name': 'leader_lang',
+ 'name': 'person_id_name',
'type': 'string'
},
{
- 'name': 'leader_no_reset_sent',
- 'type': 'int'
+ 'name': 'person_id_phone',
+ 'type': 'string'
},
{
- 'name': 'leader_action_type',
+ 'name': 'person_id_fax',
'type': 'string'
},
{
- 'name': 'leader_project_id',
- 'type': 'int'
+ 'name': 'person_id_email',
+ 'type': 'string'
},
{
- 'name': 'leader_deleted_by',
+ 'name': 'person_id_company_id',
'type': 'int'
},
{
- 'name': 'leader_deleted_dt',
- 'type': 'date'
- },
- {
- 'name': 'leader_firstname',
+ 'name': 'person_id_role',
'type': 'string'
},
{
- 'name': 'leader_lastname',
- 'type': 'string'
+ 'name': 'person_id_active',
+ 'type': 'int'
},
{
- 'name': 'leader_name_facebook',
+ 'name': 'person_id_remarks',
'type': 'string'
},
{
- 'name': 'leader_url_blog',
+ 'name': 'person_id_passwd',
'type': 'string'
},
{
- 'name': 'leader_url_twitter',
- 'type': 'string'
+ 'name': 'person_id_owner_id',
+ 'type': 'int'
},
{
- 'name': 'leader_url_linkedin',
+ 'name': 'person_id_lang',
'type': 'string'
},
{
- 'name': 'leader_crm_lead_percentage',
+ 'name': 'person_id_no_reset_sent',
'type': 'int'
},
{
- 'name': 'leader_crm_industry_id',
- 'type': 'int'
+ 'name': 'person_id_action_type',
+ 'type': 'string'
},
{
- 'name': 'leader_crm_updated_action_id',
+ 'name': 'person_id_project_id',
'type': 'int'
},
{
- 'name': 'leader_crm_created_action_id',
+ 'name': 'person_id_deleted_by',
'type': 'int'
},
{
- 'name': 'leader_crm_type_id',
- 'type': 'int'
+ 'name': 'person_id_deleted_dt',
+ 'type': 'date'
}
]
+ },
+ proxy : {
+ xtype: 'HttpProxy',
+ xns: Roo.data,
+ method : 'GET',
+ url : baseURL + '/Roo/Events.php'
}
},
footer : {
xtype: 'PagingToolbar',
xns: Roo,
displayInfo : true,
- displayMsg : "Displaying Publication{0} - {1} of {2}",
+ displayMsg : "{0} - {1} of {2}",
emptyMsg : "Nothing found",
pageSize : 25
},
{
xtype: 'ColumnModel',
xns: Roo.grid,
- dataIndex : 'publication',
- header : 'Publication Lists',
- width : 200,
- renderer : function(v) { return String.format('{0}', v); }
+ dataIndex : 'event_when',
+ header : 'Date',
+ width : 100,
+ renderer : function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }
}
]
}
},
{
- xtype: 'GridPanel',
+ xtype: 'ContentPanel',
xns: Roo,
listeners : {
- activate : function() {
- _this.panel = this;
- if (_this.grid) {
- _this.grid.footer.onClick('first');
- }
+ render : function (_self)
+ {
+ _this.viewPanel = _self;
}
},
- background : true,
+ background : false,
fitContainer : true,
- fitToframe : true,
- region : 'center',
- tableName : 'clipping_journalist',
- title : "Journalist",
- grid : {
- xtype: 'EditorGrid',
- xns: Roo.grid,
- listeners : {
- render : function()
- {
- _this.grid = this;
- if (_this.panel.active) {
- this.footer.onClick('first');
- }
- }
- },
- autoExpandColumn : 'name',
- clicksToEdit : 1,
- loadMask : true,
- dataSource : {
- xtype: 'Store',
- xns: Roo.data,
- listeners : {
- beforeload : function (_self, o)
- {
- o.params = o.params || {};
- if (!_this.data.campaign_id) {
- Roo.log('Missing campaign id!?');
- return false;
- }
- o.params.campaign_id = _this.data.campaign_id;
- }
- },
- remoteSort : true,
- sortInfo : { field : 'name', direction: 'ASC' },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/Roo/clipping_journalist.php'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total',
- fields : [
- {
- 'name': 'id',
- 'type': 'int'
- },
- {
- 'name': 'name',
- 'type': 'string'
- },
- {
- 'name': 'publication',
- 'type': 'string'
- }
- ]
- }
- },
- footer : {
- xtype: 'PagingToolbar',
- xns: Roo,
- displayInfo : true,
- displayMsg : "Displaying Journalist {0} - {1} of {2}",
- emptyMsg : "Nothing found",
- pageSize : 25
- },
- colModel : [
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'name',
- header : 'Name',
- width : 100,
- renderer : function(v,x,r)
- {
- return String.format('{0}', v ? v : '');
- }
- },
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'publication',
- header : 'Publication',
- width : 300,
- renderer : function(v,x,r)
- {
- return String.format('{0}', v ? v : '');
- },
- editor : {
- xtype: 'GridEditor',
- xns: Roo.grid
- }
- }
- ]
- }
+ fitToFrame : true,
+ region : 'center'
}
],
center : {
xtype: 'LayoutRegion',
- xns: Roo,
- split : true,
- titlebar : false
+ xns: Roo
},
west : {
xtype: 'LayoutRegion',
- xns: Roo
+ xns: Roo,
+ split : true,
+ width : 200
},
buttons : [
{