Pman.Dialog.CoreNotifyRecur.bjs
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.js
index 10c4133..25a955b 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,
@@ -41,9 +47,9 @@ Pman.Dialog.CoreNotifyRecur = {
                     xns: Roo,
                     listeners : {
                         activate : function() {
-                            _this.panel = this;
+                         _this.panel = this;
                             if (_this.grid) {
-                                _this.grid.footer.onClick('first');
+                        //        _this.grid.footer.onClick('first');
                             }
                         }
                     },
@@ -62,7 +68,7 @@ Pman.Dialog.CoreNotifyRecur = {
                                 _this.grid = this; 
                                 //_this.dialog = Pman.Dialog.FILL_IN
                                 if (_this.panel.active) {
-                                   this.footer.onClick('first');
+                                //   this.footer.onClick('first');
                                 }
                             },
                             rowdblclick : function (_self, rowIndex, e)
@@ -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,22 @@ 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);
+                                        Roo.log(ce);
+                                        ce.field.setValue(v);
+                                        return String.format('{0}',ce.field.el.value);
+                                
+                                        
+                                    
+                                    }
+                                    
                                     return String.format('{0}', r.data.freq_hour_name || v); 
                                     
                                 },
@@ -460,6 +474,12 @@ Pman.Dialog.CoreNotifyRecur = {
                 {
                     xtype: 'Button',
                     xns: Roo,
+                    listeners : {
+                        click : function (_self, e)
+                        {
+                            _this.dialog.hide();
+                        }
+                    },
                     text : "Done"
                 }
             ]