background : true,
closable : false,
collapsible : false,
- height : 150,
+ height : 180,
modal : true,
resizable : false,
title : _this._strings['790f855c2139f2faecb810519e90b833'],
- width : 400,
+ width : 600,
xns : Roo,
xtype : 'LayoutDialog',
buttons : [
xtype : 'Button',
listeners : {
click : function() {
-
- var name = _this.form.findField('name').getValue();
- name = name.toUpperCase().replace(/[^A-Z]+/g, '');
- if (!name.length) {
- Roo.MessageBox.alert("Error","Please fill in a valid name");
- return;
- }
- _this.form.findField('name').setValue(name);
-
+
_this.form.doAction('submit');
}
return;
}
if (action.type == 'load') {
+
_this.dialog.el.unmask();
+
+ _this.data = action.result.data;
+
+ if(typeof(_this.data.keywords) != 'undefined'){
+ var n = Roo.decode(_this.data.keywords);
+ _this.form.findField('keyword_filters').setValue(n);
+ }
+
return;
}
if (action.type == 'submit' ) {
}
},
items : [
- {
- '|xns' : 'Roo.form',
- name : 'id',
- xns : Roo.form,
- xtype : 'Hidden'
- },
{
store : {
proxy : {
'|xns' : 'Roo.data',
method : 'GET',
- url : baseURL + '/Roo/core_enum.php',
+ url : baseURL + '/Roo/Projects.php',
xns : Roo.data,
xtype : 'HttpProxy'
},
reader : {
'|xns' : 'Roo.data',
- fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}],
+ fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
id : 'id',
root : 'data',
totalProperty : 'total',
},
'|xns' : 'Roo.data',
remoteSort : true,
- sortInfo : { direction : 'ASC', field: 'display_name' },
+ sortInfo : { direction : 'DESC', field: 'id' },
xns : Roo.data,
xtype : 'Store',
listeners : {
beforeload : function (_self, o){
o.params = o.params || {};
- // set more here
- o.params.etype = 'crm_industry';
- o.params.active = 1;
+
}
},
items : [
listWidth : 400,
loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
minChars : 2,
- name : 'camapign_id_name',
+ name : 'campaign_id_name',
pageSize : 20,
qtip : _this._strings['0ee0f676f631ad4e8a5844314a3a20de'],
- queryParam : 'search[name]',
+ queryParam : 'query[name]',
selectOnFocus : true,
- tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>#{pressrelease_id} - {name}</b></div>',
+ tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b></div>',
triggerAction : 'all',
typeAhead : false,
valueField : 'id',
+ width : 400,
xns : Roo.form,
xtype : 'ComboBox',
items : [
]
+ },
+ {
+ combo : {
+ store : {
+ proxy : {
+ '|xns' : 'Roo.data',
+ method : 'GET',
+ url : baseURL + '/Roo/clipping_keywords.php',
+ xns : Roo.data,
+ xtype : 'HttpProxy'
+ },
+ reader : {
+ '|xns' : 'Roo.data',
+ fields : [{"name":"id","type":"int"},{"name":"keyword","type":"string"}],
+ id : 'code',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ xtype : 'JsonReader'
+ },
+ '|xns' : 'Roo.data',
+ remoteSort : true,
+ sortInfo : { direction : 'ASC', field: 'display_name' },
+ xns : Roo.data,
+ xtype : 'Store',
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+
+ var s = _this.form.findField('campaign_id').getValue() * 1;
+
+ if(isNaN(s) || s < 1){
+ return false;
+ }
+
+ o.params.is_active = 1;
+ o.params.is_keyword = 1;
+ o.params.project_id = s;
+ }
+ },
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.form',
+ allowBlank : true,
+ alwaysQuery : true,
+ displayField : 'keyword',
+ editable : true,
+ fieldLabel : 'Keyword',
+ forceSelection : true,
+ listWidth : 400,
+ minChars : 2,
+ queryParam : 'query[keyword]',
+ tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{keyword}</b> </div>',
+ triggerAction : 'all',
+ valueField : 'id',
+ width : 400,
+ xns : Roo.form,
+ xtype : 'ComboBox',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.form',
+ allowBlank : false,
+ fieldLabel : 'Keywords',
+ hiddenName : 'keyword_filters',
+ name : 'keyword_filters_name',
+ width : 410,
+ xns : Roo.form,
+ xtype : 'ComboBoxArray',
+ items : [
+
+ ]
+
+ },
+ {
+ '|xns' : 'Roo.form',
+ name : 'id',
+ xns : Roo.form,
+ xtype : 'Hidden'
}
]