@@ -5,6 +5,7 @@ import { CommonActions, CommonParams } from './common.js';
55import { mysqlDocKeyword , mysqlDocBuiltin } from './doc-links.js' ;
66import { Indexes } from './indexes.js' ;
77import { Config } from './config.js' ;
8+ import { resizeTopMenu } from './menu-resizer.js' ;
89
910/* global ChartType, ColumnType, DataTable, JQPlotChartFactory */ // js/chart.js
1011/* global DatabaseStructure */ // js/database/structure.js
@@ -3300,24 +3301,6 @@ Functions.showHints = function ($div) {
33003301 } ) ;
33013302} ;
33023303
3303- Functions . mainMenuResizerCallback = function ( ) {
3304- // 5 px margin for jumping menu in Chrome
3305- // eslint-disable-next-line compat/compat
3306- return $ ( document . body ) . width ( ) - 5 ;
3307- } ;
3308-
3309- /**
3310- * @return {function }
3311- */
3312- Functions . initializeMenuResizer = ( ) => function ( ) {
3313- // Initialise the menu resize plugin
3314- $ ( '#topmenu' ) . menuResizer ( Functions . mainMenuResizerCallback ) ;
3315- // register resize event
3316- $ ( window ) . on ( 'resize' , function ( ) {
3317- $ ( '#topmenu' ) . menuResizer ( 'resize' ) ;
3318- } ) ;
3319- } ;
3320-
33213304/**
33223305 * var toggleButton This is a function that creates a toggle
33233306 * sliding button given a jQuery reference
@@ -3840,7 +3823,7 @@ Functions.floatingMenuBar = () => function () {
38403823 'padding-top' ,
38413824 $ ( '#floating_menubar' ) . outerHeight ( true )
38423825 ) ;
3843- $ ( '#topmenu' ) . menuResizer ( 'resize' ) ;
3826+ resizeTopMenu ( ) ;
38443827 } , 4 ) ;
38453828 }
38463829} ;
0 commit comments