DataObjects/core.sql
[Pman.Core] / Pman.Dialog.PersonEditor.js
index b95acee..415b1b1 100644 (file)
@@ -459,69 +459,30 @@ Pman.Dialog.PersonEditor.prototype = {
                 xtype: 'ComboBoxArray',
                 xns: Roo.form,
                 fieldLabel : 'Country',
-                hiddenName : 'country_id',
-                name : 'country',
+                hiddenName : 'country',
+                name : 'country_name',
                 width : 300,
                 combo : {
                     xtype: 'ComboBox',
                     xns: Roo.form,
-                    listeners : {
-                        add : function (combo)
-                        {
-                            Pman.Dialog.ClippingJournalist.show({
-                                id:0,
-                                _clipping_id : _this.form.findField('id').getValue(),
-                                publication : _this.data.media_name,
-                                country : _this.data.country,
-                                campaign_id : _this.data.project_id,
-                                campaign_name : _this.data.project_id_name
-
-                            });
-                        }
-                    },
                     allowBlank : true,
                     alwaysQuery : true,
-                    displayField : 'name',
+                    displayField : 'title',
                     editable : false,
-                    emptyText : "Select News",
-                    fieldLabel : 'Journalist',
+                    emptyText : "Select Country",
                     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,
+                    valueField : 'code',
+                    width : 280,
                     store : {
-                        xtype: 'Store',
+                        xtype: 'SimpleStore',
                         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"}
-                            ]
-                        }
+                        data : (function() {
+                            return Pman.I18n.simpleStoreData('c');
+                        })(),
+                        fields : [  'code', 'title' ]
                     }
                 }
             },