Skip to content

Commit

Permalink
fix configuration-based home-tab blinking
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed Mar 6, 2020
1 parent 0418d37 commit faf332d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions public/admin/js/Home/Connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Ext.define('Admin.Home.Connections', {
extend: 'Ext.grid.Panel',

flex: 1,
hidden: true,

listeners: {
itemdblclick(view, record) {
Expand Down Expand Up @@ -42,6 +43,7 @@ Ext.define('Admin.Home.Connections', {
name: 'remove-button',
iconCls: 'fa fa-trash',
disabled: true,
hidden: true,
handler() {
Ext.MessageBox.confirm('Confirmation', 'Are you sure want to remove selected connection?<br/>This operation has no rollback!', (btn) => {
if (btn == 'yes') {
Expand All @@ -55,6 +57,7 @@ Ext.define('Admin.Home.Connections', {
text: 'Remove all',
name: 'remove-all',
iconCls: 'fa fa-ban',
hidden: true,
handler() {
Ext.MessageBox.confirm('Confirmation', 'Are you sure want to remove all connections?<br/>This operation has no rollback!', (btn) => {
if (btn == 'yes') {
Expand Down
1 change: 1 addition & 0 deletions public/admin/js/Home/New.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Ext.define('Admin.Home.New', {

height: 200,
border: false,
hidden: true,
style: {
paddingRight: '15px',
},
Expand Down
9 changes: 4 additions & 5 deletions public/admin/js/Home/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ Ext.define('Admin.Home.Tab', {
});
}
}
if(result.readOnly) {
this.down('home-new').hide();
grid.down('[name=remove-button]').hide();
grid.down('[name=remove-all]').hide();
}
this.down('home-new').setHidden(result.readOnly);
this.down('home-connections').show();
grid.down('[name=remove-button]').setHidden(result.readOnly);
grid.down('[name=remove-all]').setHidden(result.readOnly);
Ext.require('Admin.Database.Tab', function() {
Admin.Database.Tab.prototype.items[1].hidden = !result.query;
});
Expand Down

0 comments on commit faf332d

Please sign in to comment.