Apply suggestions from code review

JS cleanup after review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Denis
2023-03-30 13:25:55 +02:00
committed by GitHub
parent 251fd3c67b
commit e87f5af465
2 changed files with 8 additions and 6 deletions

View File

@@ -126,13 +126,14 @@ $.widget( "itop.regulartabs", $.ui.tabs, {
},
// JQuery UI overload
disable: function(index){
let panel = this._getPanelForTab( index );
panel.css({display: 'none'});
const panel = this._getPanelForTab( index );
panel.hide();
this._super( index );
},
// JQuery UI overload
enable: function(index) {
let panel = this._getPanelForTab( index );
panel.css({display: 'block'});
const panel = this._getPanelForTab( index );
panel.show();
this._super( index );
},
});

View File

@@ -379,12 +379,13 @@ $.widget( "itop.scrollabletabs", $.ui.tabs, {
},
// JQuery UI overload
disable: function(index){
let panel = this._getPanelForTab( this.tabs[index] );
const panel = this._getPanelForTab( this.tabs[index] );
panel.css({display: 'none'});
this._super( index );
},
// JQuery UI overload
enable: function(index) {
let panel = this._getPanelForTab( this.tabs[index] );
const panel = this._getPanelForTab( this.tabs[index] );
panel.css({display: 'block'});
this._super( index );
},