sync
[Pman.Admin] / Pman.Tab.AdminNotify.js
index 74bf5b9..d360f32 100644 (file)
@@ -7,6 +7,7 @@ Roo.namespace('Pman.Tab');
 Pman.Tab.AdminNotify = new Roo.XComponent({
 
  _strings : {
+  'aed6676e8238afe7cf55e3baf2ad72a2' :"Search Subject",
   '136fac3c5c5881e0a7d0039e57decd68' :"Select notify type",
   'bf1cb7e2a337a5e2ebf614009cbce9cc' :"Current Notifications",
   '8535bcc0f05358a583bb432bbadf7e0d' :"Select type",
@@ -46,6 +47,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
    background : false,
    region : 'center',
    title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
+   listeners : {
+    render : function (_self)
+     {
+         _this.nest = this;
+     }
+   },
    xns : Roo,
    '|xns' : 'Roo',
    layout : {
@@ -71,7 +78,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
     items  : [
      {
       xtype : 'GridPanel',
-      background : true,
+      background : false,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
@@ -118,6 +125,22 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
         xns : Roo,
         '|xns' : 'Roo',
         items  : [
+         {
+          xtype : 'TextField',
+          emptyText : _this._strings['aed6676e8238afe7cf55e3baf2ad72a2'] /* Search Subject */,
+          listeners : {
+           render : function (_self)
+            {
+                _this.searchBox = this;
+            },
+           specialkey : function (_self, e)
+            {
+                _this.grid.footer.onClick('first');
+            }
+          },
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
          {
           xtype : 'ComboBox',
           allowBlank : true,
@@ -357,8 +380,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
               options.params._evtype_align = 1;
               
               if (!_this.toggleBtn.pressed) {
-                  options.params['event_id'] = 0;
+                  options.params.event_id = 0;
+                  options.params['query[status]'] = 'PENDING';
+              } else  {
+                  options.params['!event_id'] = 0;
               }
+              
               if (!_this.personCombo) {
                   return false;
               }
@@ -384,6 +411,8 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
               if(type.length){
                   options.params.evtype = type;
               }
+              options.params['search[contains]'] = _this.searchBox.getValue();
+              
           }
         },
         xns : Roo.data,
@@ -550,7 +579,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
        },
        sm : {
         xtype : 'RowSelectionModel',
-        singleSelect : true,
+        singleSelect : false,
         listeners : {
          afterselectionchange : function (_self)
           {
@@ -560,9 +589,9 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                   return;
               }
               var id = this.getSelected().data.event_id;
-              if (id *1 < 0) {
+              if (id *1 < 1) {
               
-                  this.viewPanel.setContent("No Event for this line");    
+                 _this.viewPanel.setContent("No Event for this line");    
                   return;
               }
               _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
@@ -593,7 +622,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
              return String.format('<span qtip="{0}">{1}</span>', v, vv ); 
          },
          sortable : true,
-         width : 100,
+         width : 70,
          xns : Roo.grid,
          '|xns' : 'Roo.grid'
         },
@@ -603,7 +632,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
          header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
          renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
          sortable : true,
-         width : 150,
+         width : 130,
          xns : Roo.grid,
          '|xns' : 'Roo.grid'
         },
@@ -618,7 +647,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
               return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
            },
          sortable : true,
-         width : 150,
+         width : 130,
          xns : Roo.grid,
          '|xns' : 'Roo.grid'
         },
@@ -668,7 +697,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
          dataIndex : 'msgid',
          header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
          renderer : function(v) { return String.format('{0}', v); },
-         width : 200,
+         width : 50,
          xns : Roo.grid,
          '|xns' : 'Roo.grid'
         },