Use common key for recent langs

This commit is contained in:
Julia.Radzhabova
2025-05-15 13:13:26 +03:00
parent d64c6f91d8
commit 88f484efb5
7 changed files with 11 additions and 13 deletions

View File

@ -74,9 +74,7 @@ define([], function () { 'use strict';
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
var filter = Common.localStorage.getKeysFilter(),
lckey = ((filter && filter.length) ? filter.split(',')[0] : '') + "settings-recent-langs";
var lckey = "app-settings-recent-langs";
this.cmbLanguage = new Common.UI.ComboBoxRecent({
el: $window.find('#id-document-language'),
cls: 'input-group-nr',

View File

@ -2818,7 +2818,7 @@ define([
}
sLangs = arr;
let recentKey = 'de-settings-recent-langs',
let recentKey = 'app-settings-recent-langs',
recentCount = Math.max(5, sLangs.length + 3);
Common.Utils.InternalSettings.set(recentKey + "-count", recentCount);
Common.Utils.InternalSettings.set(recentKey + "-offset", sLangs.length);

View File

@ -215,7 +215,7 @@ define([
arrPara.push(item);
arrTable.push(_.clone(item));
});
var lckey = 'de-settings-recent-langs';
var lckey = 'app-settings-recent-langs';
me.langParaMenu.menu.setRecent({
count: Common.Utils.InternalSettings.get(lckey + "-count") || 5,
offset: Common.Utils.InternalSettings.get(lckey + "-offset") || 0,

View File

@ -414,9 +414,9 @@ define([
});
});
this.langMenu.setRecent({
count: Common.Utils.InternalSettings.get("de-settings-recent-langs-count") || 5,
offset: Common.Utils.InternalSettings.get("de-settings-recent-langs-offset") || 0,
key: 'de-settings-recent-langs'
count: Common.Utils.InternalSettings.get("app-settings-recent-langs-count") || 5,
offset: Common.Utils.InternalSettings.get("app-settings-recent-langs-offset") || 0,
key: 'app-settings-recent-langs'
});
this.langMenu.resetItems(arr);
if (this.langMenu.items.length>0) {

View File

@ -2368,7 +2368,7 @@ define([
}
sLangs = arr;
let recentKey = 'pe-settings-recent-langs',
let recentKey = 'app-settings-recent-langs',
recentCount = Math.max(5, sLangs.length + 3);
Common.Utils.InternalSettings.set(recentKey + "-count", recentCount);
Common.Utils.InternalSettings.set(recentKey + "-offset", sLangs.length);

View File

@ -239,7 +239,7 @@ define([
arrPara.push(item);
arrTable.push(_.clone(item));
});
var lckey = 'pe-settings-recent-langs';
var lckey = 'app-settings-recent-langs';
me.langParaMenu.menu.setRecent({
count: Common.Utils.InternalSettings.get(lckey + "-count") || 5,
offset: Common.Utils.InternalSettings.get(lckey + "-offset") || 0,

View File

@ -363,9 +363,9 @@ define([
});
});
this.langMenu.setRecent({
count: Common.Utils.InternalSettings.get("pe-settings-recent-langs-count") || 5,
offset: Common.Utils.InternalSettings.get("pe-settings-recent-langs-offset") || 0,
key: 'pe-settings-recent-langs'
count: Common.Utils.InternalSettings.get("app-settings-recent-langs-count") || 5,
offset: Common.Utils.InternalSettings.get("app-settings-recent-langs-offset") || 0,
key: 'app-settings-recent-langs'
});
this.langMenu.resetItems(arr);
if (this.langMenu.items.length>0) {