From a6a4d449ec354250a746640fef3aa432c7178da3 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Wed, 10 Apr 2024 13:57:10 +0300 Subject: [PATCH] [all] lock "rtl ui" option for non-rtl languages --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/pdfeditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 80a399fe48..4512cf2cb0 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -461,7 +461,7 @@ define([ this.appOptions.canFeatureContentControl = true; this.appOptions.canFeatureForms = !!this.api.asc_isSupportFeature("forms"); this.appOptions.isPDFForm = !!window.isPDFForm; - this.appOptions.uiRtl = !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; + this.appOptions.uiRtl = Common.Locale.isCurrentLanguageRtl() && !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; this.appOptions.disableNetworkFunctionality = !!(window["AscDesktopEditor"] && window["AscDesktopEditor"]["isSupportNetworkFunctionality"] && false === window["AscDesktopEditor"]["isSupportNetworkFunctionality"]()); this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); this.appOptions.canSaveDocumentToBinary = this.editorConfig.canSaveDocumentToBinary; diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index fe505f3555..b23067c602 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -399,7 +399,7 @@ define([ this.appOptions.canRequestInsertImage = this.editorConfig.canRequestInsertImage; this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings; this.appOptions.compatibleFeatures = true; - this.appOptions.uiRtl = !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; + this.appOptions.uiRtl = Common.Locale.isCurrentLanguageRtl() && !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); this.appOptions.canSaveDocumentToBinary = this.editorConfig.canSaveDocumentToBinary; this.appOptions.user.guest && this.appOptions.canRenameAnonymous && Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this)); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 7f2af98de0..3c5c9ffa88 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -411,7 +411,7 @@ define([ this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures; this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings; this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); - this.appOptions.uiRtl = !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; + this.appOptions.uiRtl = Common.Locale.isCurrentLanguageRtl() && !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; this.appOptions.canSaveDocumentToBinary = this.editorConfig.canSaveDocumentToBinary; this.appOptions.user.guest && this.appOptions.canRenameAnonymous && Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this)); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index ec159506f6..0b43d954df 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -463,7 +463,7 @@ define([ this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink; this.appOptions.canFeaturePivot = true; this.appOptions.canFeatureViews = true; - this.appOptions.uiRtl = !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; + this.appOptions.uiRtl = Common.Locale.isCurrentLanguageRtl() && !(Common.Controllers.Desktop.isActive() && Common.Controllers.Desktop.uiRtlSupported()) && !Common.Utils.isIE; this.appOptions.canRequestReferenceData = this.editorConfig.canRequestReferenceData; this.appOptions.canRequestOpen = this.editorConfig.canRequestOpen; this.appOptions.canRequestReferenceSource = this.editorConfig.canRequestReferenceSource;