From 7b60b01b242883eee1d89689da008e88fd2a4d70 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Thu, 18 Sep 2025 15:52:59 +0300 Subject: [PATCH] connected externallinks --- apps/pdfeditor/main/app.js | 2 ++ apps/pdfeditor/main/app/controller/Main.js | 3 +++ apps/pdfeditor/main/app/controller/Toolbar.js | 2 +- apps/pdfeditor/main/app/view/RightMenu.js | 1 + apps/pdfeditor/main/app_dev.js | 3 +++ apps/pdfeditor/main/app_pack.js | 1 + apps/pdfeditor/main/locale/en.json | 21 +++++++++++++++++++ 7 files changed, 32 insertions(+), 1 deletion(-) diff --git a/apps/pdfeditor/main/app.js b/apps/pdfeditor/main/app.js index d3ab261f2c..802dfdfad0 100644 --- a/apps/pdfeditor/main/app.js +++ b/apps/pdfeditor/main/app.js @@ -151,6 +151,7 @@ require([ 'Common.Controllers.Comments', 'Common.Controllers.Draw', 'Common.Controllers.Plugins', + 'Common.Controllers.ExternalLinks', 'Common.Controllers.ExternalDiagramEditor', // 'Common.Controllers.ExternalOleEditor', 'Common.Controllers.Protection' @@ -187,6 +188,7 @@ require([ 'common/main/lib/controller/Comments', 'common/main/lib/controller/Chat', /** coauthoring end **/ + 'common/main/lib/controller/ExternalLinks', 'common/main/lib/controller/Plugins', 'common/main/lib/controller/ExternalDiagramEditor', // 'common/main/lib/controller/ExternalOleEditor', diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index de9dd8c5cc..8d42db8875 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -399,6 +399,9 @@ define([ this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs; this.appOptions.canRequestInsertImage = this.editorConfig.canRequestInsertImage; this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings; + this.appOptions.canRequestOpen = this.editorConfig.canRequestOpen; + this.appOptions.canRequestReferenceSource = this.editorConfig.canRequestReferenceSource; + this.appOptions.canRequestReferenceData = this.editorConfig.canRequestReferenceData; this.appOptions.compatibleFeatures = true; 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/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 7206e3db51..c66f25a3cb 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -1552,7 +1552,7 @@ define([ Array.prototype.push.apply(me.toolbar.lockControls, drawtab.getView().getButtons()); Array.prototype.push.apply(me.toolbar.paragraphControls, drawtab.getView().getButtons()); } - + me.getApplication().getController('Common.Controllers.ExternalLinks').setConfig({toolbar: me}).setApi(me.api); !config.canComments && me.toolbar.setVisible('comment', false); } diff --git a/apps/pdfeditor/main/app/view/RightMenu.js b/apps/pdfeditor/main/app/view/RightMenu.js index b71ae9d8f2..a0f0628f01 100644 --- a/apps/pdfeditor/main/app/view/RightMenu.js +++ b/apps/pdfeditor/main/app/view/RightMenu.js @@ -255,6 +255,7 @@ define([ this.imageSettings && this.imageSettings.setMode(mode); this.shapeSettings && this.shapeSettings.setMode(mode); this.formSettings && this.formSettings.setMode(mode); + this.chartSettings && this.chartSettings.setMode(mode); }, onBtnMenuClick: function(btn, e) { diff --git a/apps/pdfeditor/main/app_dev.js b/apps/pdfeditor/main/app_dev.js index 5521d35cc1..a5721b1d60 100644 --- a/apps/pdfeditor/main/app_dev.js +++ b/apps/pdfeditor/main/app_dev.js @@ -140,6 +140,7 @@ require([ ,'Common.Controllers.Chat' ,'Common.Controllers.Comments' ,'Common.Controllers.Draw' + ,'Common.Controllers.ExternalLinks' ,'Common.Controllers.Plugins' ,'Common.Controllers.ExternalDiagramEditor' // ,'Common.Controllers.ExternalOleEditor' @@ -178,6 +179,7 @@ require([ ,'common/main/lib/controller/Chat' ,'common/main/lib/controller/Plugins' ,'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ExternalLinks' // ,'common/main/lib/controller/ExternalOleEditor' ,'common/main/lib/controller/Draw' ,'common/main/lib/controller/Protection' @@ -205,6 +207,7 @@ require([ 'common/main/lib/view/DocumentHolderExt', 'common/main/lib/util/define', 'common/main/lib/view/ListSettingsDialog', + 'common/main/lib/view/ExternalLinksDlg', 'common/main/lib/view/CustomizeQuickAccessDialog', 'common/main/lib/view/PasswordDialog', 'common/main/lib/component/TextareaField', diff --git a/apps/pdfeditor/main/app_pack.js b/apps/pdfeditor/main/app_pack.js index b1a465810f..960309bbb6 100644 --- a/apps/pdfeditor/main/app_pack.js +++ b/apps/pdfeditor/main/app_pack.js @@ -21,6 +21,7 @@ require([ 'common/main/lib/view/TextInputDialog', 'common/main/lib/view/DocumentHolderExt', 'common/main/lib/view/ListSettingsDialog', + 'common/main/lib/view/ExternalLinksDlg', 'common/main/lib/view/CustomizeQuickAccessDialog', 'common/main/lib/view/PasswordDialog', 'common/main/lib/component/TextareaField', diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 532dc9a947..e3c13650b2 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -10,6 +10,13 @@ "Common.Controllers.Plugins.textPluginSuccessfullyInstalled": "{0} is successfully installed. You can access all background plugins here.", "Common.Controllers.Plugins.textRunInstalledPlugins": "Run installed plugins", "Common.Controllers.Plugins.textRunPlugin": "Run plugin", + "Common.Controllers.ExternalLinks.textAddExternalData": "The link to an external source has been added. You can update such links in the Data tab.", + "Common.Controllers.ExternalLinks.textDontUpdate": "Don't Update", + "Common.Controllers.ExternalLinks.textUpdate": "Update", + "Common.Controllers.ExternalLinks.txtErrorExternalLink": "Error: updating is failed", + "Common.Controllers.ExternalLinks.warnUpdateExternalData": "This workbook contains links to one or more external sources that could be unsafe.
If you trust the links, update them to get the latest data.", + "Common.Controllers.ExternalLinks.warnUpdateExternalDataDE": "This document contains links to one or more external sources that could be unsafe.
If you trust the links, update them to get the latest data.", + "Common.Controllers.ExternalLinks.warnUpdateExternalDataPE": "This presentation contains links to one or more external sources that could be unsafe.
If you trust the links, update them to get the latest data.", "Common.define.smartArt.textAccentedPicture": "Accented picture", "Common.define.smartArt.textAccentProcess": "Accent process", "Common.define.smartArt.textAlternatingFlow": "Alternating flow", @@ -422,6 +429,20 @@ "Common.Views.ExternalDiagramEditor.textTitle": "Chart editor", "Common.Views.ExternalEditor.textClose": "Close", "Common.Views.ExternalEditor.textSave": "Save & Exit", + "Common.Views.ExternalLinksDlg.closeButtonText": "Close", + "Common.Views.ExternalLinksDlg.textAutoUpdate": "Automatically update data from the linked sources", + "Common.Views.ExternalLinksDlg.textChange": "Change source", + "Common.Views.ExternalLinksDlg.textDelete": "Break links", + "Common.Views.ExternalLinksDlg.textDeleteAll": "Break all links", + "Common.Views.ExternalLinksDlg.textOk": "OK", + "Common.Views.ExternalLinksDlg.textOpen": "Open source", + "Common.Views.ExternalLinksDlg.textSource": "Source", + "Common.Views.ExternalLinksDlg.textStatus": "Status", + "Common.Views.ExternalLinksDlg.textUnknown": "Unknown", + "Common.Views.ExternalLinksDlg.textUpdate": "Update values", + "Common.Views.ExternalLinksDlg.textUpdateAll": "Update all", + "Common.Views.ExternalLinksDlg.textUpdating": "Updating...", + "Common.Views.ExternalLinksDlg.txtTitle": "External links", "Common.Views.Header.ariaQuickAccessToolbar": "Quick access toolbar", "Common.Views.Header.labelCoUsersDescr": "Users who are editing the file:", "Common.Views.Header.textAddFavorite": "Mark as favorite",