PHP8
[Pman.BAdmin] / Pman.Tab.BAdminIPAccess.js
index c06ae46..81b391e 100644 (file)
@@ -19,6 +19,10 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
   'e3030abfa75de4573fb37032affa11e7' :"IP Access"
  },
+ _named_strings : {
+  'footer_displayMsg' : '155ca6a755e25c15ad7ce45e2f638f10' /* Displaying Companies{0} - {1} of {2} */ ,
+  'footer_emptyMsg' : 'fc6f97505d89fe9277965c126744647a' /* No Companies found */ 
+ },
 
   part     :  ["BAdmin", "IPAccess" ],
   order    : '006-Pman.Tab.BAdminIPAccess',
@@ -43,6 +47,7 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
     '|xns' : 'Roo.bootstrap.layout',
     center : {
      xtype : 'Region',
+     hideTabs : true,
      tabPosition : 'top',
      xns : Roo.bootstrap.layout,
      '|xns' : 'Roo.bootstrap.layout'
@@ -99,7 +104,54 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
                items  : [
                 {
                  xtype : 'Column',
-                 md : 12,
+                 md : 3,
+                 xns : Roo.bootstrap,
+                 '|xns' : 'Roo.bootstrap',
+                 items  : [
+                  {
+                   xtype : 'ComboBox',
+                   allowBlank : false,
+                   displayField : 'value',
+                   editable : false,
+                   hiddenName : 'status',
+                   mode : 'local',
+                   name : 'status_name',
+                   tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
+                   triggerAction : 'all',
+                   valueField : 'code',
+                   listeners : {
+                    render : function (_self)
+                     {
+                         _this.status = this;
+                         
+                         this.setValue(0);
+                     },
+                    select : function (combo, record, index)
+                     {
+                         _this.table.footer.onClick('first'); 
+                     }
+                   },
+                   xns : Roo.bootstrap,
+                   '|xns' : 'Roo.bootstrap',
+                   store : {
+                    xtype : 'SimpleStore',
+                    data : [
+                        ['0', 'Pending'],
+                        ['1', 'Approve'],
+                        ['-2', 'Temporary'],
+                        ['-1', 'Reject']
+                    ],
+                    fields : [ 'code', 'value' ],
+                    xns : Roo.data,
+                    '|xns' : 'Roo.data'
+                   }
+                  }
+                 ]
+                },
+                {
+                 xtype : 'Column',
+                 md : 9,
+                 style : 'text-align: right;',
                  xns : Roo.bootstrap,
                  '|xns' : 'Roo.bootstrap',
                  items  : [
@@ -145,7 +197,7 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
                    listeners : {
                     click : function (_self, e)
                      {
-                         Pman.genericDelete(_this.panel, 'core_ip_access'); 
+                         Pman.genericDelete(_this.grid, 'core_ip_access'); 
                      
                      },
                     render : function (_self)
@@ -175,7 +227,6 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
        cls : 'table-fixed',
        hover : true,
        loadMask : true,
-       responsive : true,
        rowSelection : true,
        striped : false,
        listeners : {
@@ -191,12 +242,10 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
                  return;
              }
              
-             Pman.Dialog.BAdminCompany.show({
+             Pman.Dialog.BAdminIPAccess.show({ 
                  id : s.data.id
-             }, function() {
-                 if (_this.table) {
-                     _this.table.footer.onClick('refresh');
-                 }
+             }, function(res) {
+                 _this.table.footer.onClick('first');
              });
          }
        },
@@ -215,12 +264,19 @@ Pman.Tab.BAdminIPAccess = new Roo.XComponent({
        store : {
         xtype : 'Store',
         remoteSort : true,
-        sortinfo : { field : 'display_name', direction: 'ASC' },
+        sortInfo : { field : 'display_name', direction: 'ASC' },
         listeners : {
          beforeload : function (_self, o)
           {
+               if (!Pman.buildCompleted) {
+                  return false;
+              }
+          
               o.params = o.params || {};
               
+              var status = _this.status.getValue() * 1;
+              
+              o.params.status = status;
               
           },
          load : function (_self, records, options)