Rename functions/config.ts to navigation/updateNavigationWidthConfig.ts

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2024-03-31 11:10:49 -03:00
parent adc834f1ae
commit d4cdfbe2eb
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 4 additions and 4 deletions

View File

@ -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;
};

View File

@ -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',