- sortInfo: {
- field: 'name', direction: 'ASC'
- }
- },
- displayField:'name',
- valueField : 'id',
- hiddenName: 'country_id',
- typeAhead: true,
- forceSelection: true,
- //mode: 'local',
- triggerAction: 'all',
- tpl: new Ext.Template(
- '<div class="x-grid-cell-text x-btn button">',
- '<b>{name}</b> {address}',
- '</div>'
- ),
- queryParam: 'query[name]',
- loadingText: "Searching...",
- listWidth: 400,
-
- minChars: 2,
- pageSize:20,
- listeners : {
- adderclick : function()
- {
- var cb = this;
- Pman.Dialog.CoreCompanies.show( { id: 0 }, function(data) {
- cb.setFromData(data);
- });
+ allowBlank : true,
+ alwaysQuery : true,
+ displayField : 'name',
+ editable : false,
+ emptyText : "Select News",
+ fieldLabel : 'Journalist',
+ forceSelection : true,
+ idField : 'id',
+ loadingText : "Searching...",
+ minChars : 2,
+ pageSize : 20,
+ tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b>, {publication}, {country_tr}</div>',
+ triggerAction : 'all',
+ typeAhead : true,
+ valueField : 'id',
+ width : 480,
+ store : {
+ xtype: 'Store',
+ xns: Roo.data,
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+ o.params.campaign_id = _this.data.project_id;
+ }
+ },
+ isLocal : false,
+ 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"}
+ ]
+ }