Pman.Dialog.CoreNotifyRecur.bjs
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.js
index 1340efd..339fcc2 100644 (file)
@@ -117,7 +117,7 @@ Pman.Dialog.CoreNotifyRecur = {
                                     if (!_this.data) {
                                         return false;
                                     }
-                                    o.params =  Roo.apply(o.params, {
+                                    o.params =  Roo.apply(o.params || {}, {
                                         person_id : _this.data.person_id,
                                         onid : _this.data.onid,
                                         ontable : _this.data.ontable,
@@ -333,6 +333,31 @@ Pman.Dialog.CoreNotifyRecur = {
                                 width : 250,
                                 renderer : function(v,x,r) { 
                                     
+                                    Roo.log(x);
+                                    if (v.length) {
+                                    Roo.log("try fill");
+                                        var cm = _this.grid.colModel;
+                                        Roo.log(this);
+                                        var ci = cm.getColumnByDataIndex(this.name);
+                                        Roo.log(ci);
+                                         var tv = [];
+                                        var vals = Roo.decode(v);
+                                        Roo.each(vals, function(k) {
+                                            var r = this.findRecord(this.valueField, k);
+                                            if(r){
+                                                tv.push(r.data[this.displayField]);
+                                            }else if(this.valueNotFoundText !== undefined){
+                                                tv.push( this.valueNotFoundText );
+                                            }
+                                        },ci.editor.field);
+                                
+                                        
+                                        return String.format('{0}',tv.join(', '));
+                                
+                                        
+                                    
+                                    }
+                                    
                                     return String.format('{0}', r.data.freq_hour_name || v); 
                                     
                                 },
@@ -458,6 +483,12 @@ Pman.Dialog.CoreNotifyRecur = {
                 {
                     xtype: 'Button',
                     xns: Roo,
+                    listeners : {
+                        click : function (_self, e)
+                        {
+                            _this.dialog.hide();
+                        }
+                    },
                     text : "Done"
                 }
             ]