Merge branch 'master' of http://git.roojs.com:8081/Pman.Core
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.js
index 0924b51..2b3e116 100644 (file)
@@ -104,7 +104,7 @@ Pman.Dialog.CoreNotifyRecur = {
                                     new Pman.Request({
                                         url : baseURL + '/Roo/Core_notify_recur',
                                         method :'POST',
-                                        params : record.data,
+                                        params : p,
                                         success : function(data)
                                         {
                                             //Roo.log(data);
@@ -211,8 +211,8 @@ Pman.Dialog.CoreNotifyRecur = {
                                             var r = grid.getDataSource().reader.newRow({
                                             // defaults..
                                                 person_id : _this.data.person_id,
-                                                dtstart : new Date(0),
-                                                dtend : Date.parseDate('2030-01-01', 'Y-m-d'),
+                                                dtstart : new Date(),
+                                                dtend : Date.parseDate('2050-01-01', 'Y-m-d'),
                                                 tz : 'Asia/Hong Kong',
                                                 onid : _this.data.onid,
                                                 ontable : _this.data.ontable,
@@ -246,7 +246,7 @@ Pman.Dialog.CoreNotifyRecur = {
                                         click : function()
                                         {
                                              _this.grid.stopEditing();
-                                             var s = _this.grid.selModel.getSelectedCell()
+                                             var s = _this.grid.selModel.getSelectedCell();
                                              if (!s) {
                                                 Roo.MessageBox.alert("Error", "Select row");
                                                 return;
@@ -256,7 +256,7 @@ Pman.Dialog.CoreNotifyRecur = {
                                                 url : baseURL + '/Roo/core_notify_recur',
                                                 method : 'POST',
                                                 params : {
-                                                    _delete : _this.grid.ds.getAt(s[0]).data.id,
+                                                    _delete : _this.grid.ds.getAt(s[0]).data.id
                                                 }, 
                                                 success : function() {
                                                     _this.grid.ds.load({});
@@ -468,11 +468,10 @@ Pman.Dialog.CoreNotifyRecur = {
                                         emptyText : "Select timezone",
                                         fieldLabel : 'core_enum',
                                         forceSelection : true,
-                                        hiddenName : 'tz',
                                         listWidth : 400,
                                         loadingText : "Searching...",
                                         minChars : 2,
-                                        name : 'tz_name',
+                                        name : 'tz',
                                         pageSize : 999,
                                         qtip : "Select timezone",
                                         queryParam : 'q',
@@ -480,7 +479,6 @@ Pman.Dialog.CoreNotifyRecur = {
                                         tpl : '<div class="x-grid-cell-text x-btn button"><b>{tz}</b> </div>',
                                         triggerAction : 'all',
                                         typeAhead : true,
-                                        valueField : 'tz',
                                         width : 300,
                                         store : {
                                             xtype: 'Store',
@@ -514,10 +512,10 @@ Pman.Dialog.CoreNotifyRecur = {
                             {
                                 xtype: 'ColumnModel',
                                 xns: Roo.grid,
-                                header : 'Last event',
-                                width : 75,
                                 dataIndex : 'last_event_id',
-                                renderer : function(v) { return String.format('{0}', v); }
+                                header : 'Last Sent',
+                                width : 75,
+                                renderer : function(v) { return String.format('{0}', v ? v : 'never'); }
                             }
                         ]
                     }