Pman.Dialog.CoreNotifyRecur.bjs
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.js
index db2ad32..426a3fb 100644 (file)
@@ -14,6 +14,7 @@ Pman.Dialog.CoreNotifyRecur = {
   '157e432ec303efd7d537b653cb255ccc' :"on day(s)",
   '236df51bb0e6416236e255b528346fca' :"Timezone",
   '44c68bed631ff6e62aecc4a4d32176e6' :"Select timezone",
+  '867343577fa1f33caa632a19543bd252' :"Keywords",
   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
   'b26686c0a708faee42861d8b905e882e' :"Last Sent",
   'c1d32776cd2d2afcd2c45a52f58679f4' :"Modify Recurrent Notifications",
@@ -603,7 +604,7 @@ Pman.Dialog.CoreNotifyRecur = {
               return String.format('{0}', r.data.freq_hour_name || v); 
               
           },
-          width : 250,
+          width : 100,
           xns : Roo.grid,
           xtype : 'ColumnModel',
           items : [
@@ -701,14 +702,12 @@ Pman.Dialog.CoreNotifyRecur = {
           width : 75,
           xns : Roo.grid,
           xtype : 'ColumnModel'
-         }
-       ],
-       cm : [
-         {
+         },
+{
           '|xns' : 'Roo.grid',
-          dataIndex : 'last_event_id',
-          header : _this._strings['b26686c0a708faee42861d8b905e882e'],
-          renderer : function(v) { return String.format('{0}', v ? v : 'never'); },
+          dataIndex : 'keyword_filters',
+          header : _this._strings['867343577fa1f33caa632a19543bd252'],
+          renderer : function(v) { return String.format('{0}', v ? v : ''); },
           width : 75,
           xns : Roo.grid,
           xtype : 'ColumnModel'
@@ -719,6 +718,24 @@ Pman.Dialog.CoreNotifyRecur = {
          {
             e.record.commit();
          },
+        cellclick : function (_self, rowIndex, columnIndex, e)
+         {
+             var di = this.colModel.getDataIndex(columnIndex);
+             if (di != 'keyword_filters') {
+                 return;
+             }
+             
+             var d = this.ds.getAt(rowIndex);
+             
+             if(!d || d.data.id * 1 < 1){
+                 return;
+             }
+             
+             Pman.Dialog.CoreNotifyRecurKeywords.show({id : d.data.id}, function(res){
+                 _this.grid.ds.load({});
+             });
+             
+         },
         render : function() 
          {
              _this.grid = this; 
@@ -726,13 +743,6 @@ Pman.Dialog.CoreNotifyRecur = {
              if (_this.panel.active) {
              //   this.footer.onClick('first');
              }
-         },
-        rowdblclick : function (_self, rowIndex, e)
-         {
-             if (!_this.dialog) return;
-             _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
-                 _this.grid.footer.onClick('first');
-             }); 
          }
        },
        items : [