PHP8
[Pman.BAdmin] / Pman.Tab.BAdminLogEvents.js
index 2ee560d..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,
@@ -186,6 +184,7 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    multiple : false,
                    placeholder : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
                    removable : true,
+                   style : 'float: left; width: 300px;',
                    triggerAction : 'all',
                    typeAhead : true,
                    valueField : 'id',
@@ -563,25 +562,7 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                      '|xns' : 'Roo.data'
                     }
                    }
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 listeners : {
-                  render : function (_self)
-                   {
-                       this.show();
-                       
-                       if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
-                           this.hide();
-                       }
-                   }
-                 },
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'ComboBox',
                    allowBlank : true,
@@ -589,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',
@@ -601,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)
                      {
@@ -756,25 +743,7 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                      '|xns' : 'Roo.data'
                     }
                    }
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 2,
-                 listeners : {
-                  render : function (_self)
-                   {
-                       this.show();
-                       
-                       if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
-                           this.hide();
-                       }
-                   }
-                 },
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
+                  },
                   {
                    xtype : 'ComboBox',
                    allowBlank : true,
@@ -782,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',
@@ -793,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)
                      {
@@ -948,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 : 1,
-                 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)
                      {
@@ -988,18 +955,11 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                    },
                    xns : Roo.bootstrap,
                    '|xns' : 'Roo.bootstrap'
-                  }
-                 ]
-                },
-                {
-                 xtype : 'Column',
-                 md : 1,
-                 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)
                      {
@@ -1016,440 +976,6 @@ Pman.Tab.BAdminLogEvents = new Roo.XComponent({
                  ]
                 }
                ]
-              },
-              {
-               xtype : 'Row',
-               cls : 'roo-toolbar',
-               xns : Roo.bootstrap,
-               '|xns' : 'Roo.bootstrap',
-               items  : [
-                {
-                 xtype : 'Column',
-                 md : 12,
-                 xns : Roo.bootstrap,
-                 '|xns' : 'Roo.bootstrap',
-                 items  : [
-                  {
-                   xtype : 'FieldLabel',
-                   cls : 'roo-toolbar-label',
-                   html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
-                   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 : 'ComboBox',
-                   allowBlank : true,
-                   alwaysQuery : false,
-                   displayField : 'name',
-                   editable : false,
-                   forceSelection : true,
-                   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',
-                   listeners : {
-                    render : function (_self)
-                     {
-                         _this.personSel = this;
-                         
-                     },
-                    select : function (combo, record, index)
-                     {
-                         _this.table.footer.onClick('first');
-                     }
-                   },
-                   xns : Roo.bootstrap,
-                   '|xns' : 'Roo.bootstrap',
-                   store : {
-                    xtype : 'Store',
-                    remoteSort : true,
-                    sortInfo : {field : 'name' , direction : 'ASC'},
-                    listeners : {
-                     beforeload : function (_self, o)
-                      {
-                          o.params = o.params || {};
-                              o.params.limit = 9999;
-                      }
-                    },
-                    xns : Roo.data,
-                    '|xns' : 'Roo.data',
-                    proxy : {
-                     xtype : 'HttpProxy',
-                     method : 'GET',
-                     url : baseURL+'/Roo/Core_person',
-                     xns : Roo.data,
-                     '|xns' : 'Roo.data'
-                    },
-                    reader : {
-                     xtype : 'JsonReader',
-                     fields : [
-                         {
-                             'name': 'id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'office_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'name',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'phone',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'fax',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'email',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'role',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'active',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'remarks',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'passwd',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'lang',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'no_reset_sent',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'action_type',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'deleted_by',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'deleted_dt',
-                             'type': 'date',
-                             'dateFormat': 'Y-m-d'
-                         },
-                         {
-                             'name': 'office_id_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'office_id_company_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'office_id_name',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'office_id_address',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'office_id_phone',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'office_id_fax',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'office_id_email',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'office_id_role',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_code',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_name',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_remarks',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_owner_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_address',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_tel',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_fax',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_email',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_isOwner',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_logo_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_background_color',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_comptype',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_url',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_main_office_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_created_by',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_created_dt',
-                             'type': 'date'
-                         },
-                         {
-                             'name': 'company_id_updated_by',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'company_id_updated_dt',
-                             'type': 'date'
-                         },
-                         {
-                             'name': 'company_id_passwd',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_dispatch_port',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_province',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'company_id_country',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'project_id_name',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_remarks',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_owner_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'project_id_code',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_active',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'project_id_type',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_client_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'project_id_team_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'project_id_file_location',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_open_date',
-                             'type': 'date'
-                         },
-                         {
-                             'name': 'project_id_open_by',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'project_id_close_date',
-                             'type': 'date'
-                         },
-                         {
-                             'name': 'project_id_countries',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_languages',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'project_id_agency_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_office_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_name',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_phone',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_fax',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_email',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_company_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_role',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_active',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_remarks',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_passwd',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_owner_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_lang',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_no_reset_sent',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_action_type',
-                             'type': 'string'
-                         },
-                         {
-                             'name': 'owner_id_project_id',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_deleted_by',
-                             'type': 'int'
-                         },
-                         {
-                             'name': 'owner_id_deleted_dt',
-                             'type': 'date'
-                         }
-                     ],
-                     xns : Roo.data,
-                     '|xns' : 'Roo.data'
-                    }
-                   }
-                  },
-                  {
-                   xtype : 'FieldLabel',
-                   cls : 'roo-toolbar-label',
-                   html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
-                   style : 'float: left; line-height: 34px; width: 125px;',
-                   listeners : {
-                    render : function (_self)
-                     {
-                         this.indicator.setVisibilityMode(Roo.Element.DISPLAY).hide();
-                     }
-                   },
-                   xns : Roo.bootstrap,
-                   '|xns' : 'Roo.bootstrap'
-                  }
-                 ]
-                }
-               ]
               }
              ]
             }
@@ -1464,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)
          {
@@ -1772,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,