PHP8
[Pman.BAdmin] / Pman.Tab.BAdminLogEvents.js
index b601814..992ada4 100644 (file)
@@ -155,7 +155,7 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                items  : [
                 {
                  xtype : 'Column',
-                 md : 1,
+                 md : 12,
                  xns : Roo.bootstrap,
                  '|xns' : 'Roo.bootstrap',
                  items  : [
@@ -163,18 +163,16 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    xtype : 'FieldLabel',
                    cls : 'roo-toolbar-label',
                    html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
-                   style : 'line-height: 34px;',
+                   style : 'float: left; line-height: 34px; width: 80px;',
+                   listeners : {
+                    render : function (_self)
+                     {
+                         this.indicator.setVisibilityMode(Roo.Element.DISPLAY).hide();
+                     }
+                   },
                    xns : Roo.bootstrap,
                    '|xns' : 'Roo.bootstrap'
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'ComboBox',
                    allowBlank : true,
@@ -182,11 +180,11 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    displayField : 'name',
                    editable : false,
                    forceSelection : true,
-                   listWidth : 300,
                    loadingText : _this._strings['098f6bcd4621d373cade4e832627b4f6'] /* test */,
                    multiple : false,
                    placeholder : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
                    removable : true,
+                   style : 'float: left; width: 300px;',
                    triggerAction : 'all',
                    typeAhead : true,
                    valueField : 'id',
@@ -564,25 +562,7 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                      '|xns' : 'Roo.data'
                     }
                    }
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 listeners : {
-                  render : function (_self)
-                   {
-                       this.hide();
-                       
-                       if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
-                           this.show();
-                       }
-                   }
-                 },
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'ComboBox',
                    allowBlank : true,
@@ -590,10 +570,10 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    displayField : 'action',
                    editable : false,
                    forceSelection : true,
-                   listWidth : 300,
                    multiple : false,
                    placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
                    removable : true,
+                   style : 'float: left; width: 300px; margin-left: 15px;',
                    triggerAction : 'all',
                    typeAhead : true,
                    valueField : 'id',
@@ -602,6 +582,12 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                      {
                          _this.actionSel = this;
                          
+                         this.show();
+                         
+                         if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
+                             this.hide();
+                         }
+                         
                      },
                     select : function (combo, record, index)
                      {
@@ -757,25 +743,7 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                      '|xns' : 'Roo.data'
                     }
                    }
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 listeners : {
-                  render : function (_self)
-                   {
-                       this.hide();
-                       
-                       if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
-                           this.show();
-                       }
-                   }
-                 },
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'ComboBox',
                    allowBlank : true,
@@ -783,10 +751,10 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    displayField : 'on_table',
                    editable : false,
                    forceSelection : true,
-                   listWidth : 300,
                    multiple : false,
                    placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
                    removable : true,
+                   style : 'float: left; width: 300px; margin-left: 15px;',
                    triggerAction : 'all',
                    typeAhead : true,
                    valueField : 'id',
@@ -794,6 +762,13 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                     render : function (_self)
                      {
                          _this.affectSel = this;
+                         
+                         this.show();
+                         
+                         if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
+                             this.hide();
+                         }
+                         
                      },
                     select : function (combo, record, index)
                      {
@@ -949,34 +924,25 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                      '|xns' : 'Roo.data'
                     }
                    }
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 1,
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'FieldLabel',
                    cls : 'roo-toolbar-label',
                    html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
-                   style : 'line-height: 34px;',
+                   style : 'float: left; line-height: 34px; width: 125px; margin-left: 15px;',
+                   listeners : {
+                    render : function (_self)
+                     {
+                         this.indicator.setVisibilityMode(Roo.Element.DISPLAY).hide();
+                     }
+                   },
                    xns : Roo.bootstrap,
                    '|xns' : 'Roo.bootstrap'
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'DateField',
                    placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
+                   style : 'float:left; width: 150px;',
                    listeners : {
                     change : function (_self, newValue, oldValue)
                      {
@@ -989,18 +955,11 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    },
                    xns : Roo.bootstrap,
                    '|xns' : 'Roo.bootstrap'
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'DateField',
                    placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
+                   style : 'float:left; width: 150px; margin-left: 15px;',
                    listeners : {
                     change : function (_self, newValue, oldValue)
                      {
@@ -1031,15 +990,22 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
        cls : 'table-fixed',
        hover : true,
        loadMask : true,
-       responsive : true,
        rowSelection : true,
        striped : false,
        listeners : {
         render : function (_self)
          {
-             
              _this.table = _self;
              
+             if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
+                 this.colModel.setHidden(this.colModel.findColumnIndex('id'), true);
+                 this.colModel.setHidden(this.colModel.findColumnIndex('on_table'), true);
+                 this.colModel.setHidden(this.colModel.findColumnIndex('ipaddr'), true);
+                 this.colModel.getColumnByDataIndex('remarks').md = 7;
+                 this.colModel.getColumnByDataIndex('remarks').sm = 7;
+                 this.colModel.getColumnByDataIndex('remarks').xs = 7;
+             }
+             
          },
         rowdblclick : function (_self, el, rowIndex, e)
          {
@@ -1339,7 +1305,12 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
          dataIndex : 'action',
          header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
          md : 1,
-         renderer : function(v) { return String.format('{0}', v); },
+         renderer : function(v) 
+         { 
+             var vv = v.charAt(0).toUpperCase() + v.slice(1).toLowerCase();
+             
+             return String.format('{0}', vv); 
+         },
          sm : 1,
          xs : 1,
          xns : Roo.grid,