diff --git a/resources/js/src/modules/navigation.ts b/resources/js/src/modules/navigation.ts index 59102fd5a8..8b360eef25 100644 --- a/resources/js/src/modules/navigation.ts +++ b/resources/js/src/modules/navigation.ts @@ -2,7 +2,7 @@ import $ from 'jquery'; import { CommonParams } from './common.ts'; import { Config } from './config.ts'; import { ajaxRemoveMessage, ajaxShowMessage } from './ajax-message.ts'; -import { setConfigValue } from './functions/config.ts'; +import updateNavigationWidthConfig from './navigation/updateNavigationWidthConfig.ts'; import handleRedirectAndReload from './functions/handleRedirectAndReload.ts'; import isStorageSupported from './functions/isStorageSupported.ts'; @@ -908,7 +908,7 @@ const ResizeHandler = function () { */ this.mouseup = function (event): void { $('body').css('cursor', ''); - setConfigValue(event.data.resize_handler.getPos(event)); + updateNavigationWidthConfig(event.data.resize_handler.getPos(event)); $('#topmenu').menuResizer('resize'); $(document) .off('mousemove') @@ -941,7 +941,7 @@ const ResizeHandler = function () { panelWidth = 240; } - setConfigValue(panelWidth); + updateNavigationWidthConfig(panelWidth); event.data.resize_handler.setWidth(panelWidth); event.data.resize_handler.panelWidth = width; }; diff --git a/resources/js/src/modules/functions/config.ts b/resources/js/src/modules/navigation/updateNavigationWidthConfig.ts similarity index 89% rename from resources/js/src/modules/functions/config.ts rename to resources/js/src/modules/navigation/updateNavigationWidthConfig.ts index a2ea8e20f9..468b461048 100644 --- a/resources/js/src/modules/functions/config.ts +++ b/resources/js/src/modules/navigation/updateNavigationWidthConfig.ts @@ -2,7 +2,7 @@ import $ from 'jquery'; import { ajaxShowMessage } from '../ajax-message.ts'; import { CommonParams } from '../common.ts'; -export function setConfigValue (value: number): void { +export default function updateNavigationWidthConfig (value: number): void { $.ajax({ url: 'index.php?route=/navigation/update-width', type: 'POST',