Pman.Dialog.CoreNotifyRecur.bjs
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.js
index 235a9e2..63bbf17 100644 (file)
@@ -30,6 +30,12 @@ Pman.Dialog.CoreNotifyRecur = {
         this.dialog = Roo.factory({
             xtype: 'LayoutDialog',
             xns: Roo,
+            listeners : {
+                show : function (_self)
+                {
+                    _this.grid.ds.load({});
+                }
+            },
             height : 500,
             modal : true,
             resizable : false,
@@ -111,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,
@@ -185,14 +191,6 @@ Pman.Dialog.CoreNotifyRecur = {
                                 ]
                             }
                         },
-                        footer : {
-                            xtype: 'PagingToolbar',
-                            xns: Roo,
-                            pageSize : 25,
-                            displayInfo : true,
-                            displayMsg : "Displaying core_notify_recur{0} - {1} of {2}",
-                            emptyMsg : "No core_notify_recur found"
-                        },
                         toolbar : {
                             xtype: 'Toolbar',
                             xns: Roo,
@@ -335,6 +333,20 @@ Pman.Dialog.CoreNotifyRecur = {
                                 width : 250,
                                 renderer : function(v,x,r) { 
                                     
+                                    Roo.log(x);
+                                    if (v.length) {
+                                        var cm = _this.grid.colModel;
+                                        Roo.log(this);
+                                        var ci = cm.getColumnByDataIndex(this.dataIndex);
+                                        Roo.log(ci);
+                                        var ce = cm.getCellEditor(ci);
+                                        ce.field.setValue(v);
+                                        return String.format('{0}',ce.field.el.value);
+                                
+                                        
+                                    
+                                    }
+                                    
                                     return String.format('{0}', r.data.freq_hour_name || v); 
                                     
                                 },
@@ -460,6 +472,12 @@ Pman.Dialog.CoreNotifyRecur = {
                 {
                     xtype: 'Button',
                     xns: Roo,
+                    listeners : {
+                        click : function (_self, e)
+                        {
+                            _this.dialog.hide();
+                        }
+                    },
                     text : "Done"
                 }
             ]