From d7f1d04bd3481ef715f7fae0bba47f9bd8b751ca Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 27 Apr 2024 10:24:23 +0300 Subject: [PATCH 1/3] [PDF] Handle replace image --- apps/pdfeditor/main/app/controller/DocumentHolder.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/pdfeditor/main/app/controller/DocumentHolder.js b/apps/pdfeditor/main/app/controller/DocumentHolder.js index d34d8e01a1..4fcd6fbe20 100644 --- a/apps/pdfeditor/main/app/controller/DocumentHolder.js +++ b/apps/pdfeditor/main/app/controller/DocumentHolder.js @@ -345,6 +345,7 @@ define([ view.mnuDeletePage.on('click', _.bind(me.onDeletePage, me)); view.mnuRotatePageRight.on('click', _.bind(me.onRotatePage, me, 90)); view.mnuRotatePageLeft.on('click', _.bind(me.onRotatePage, me, 270)); + view.menuImgReplace.menu.on('item:click', _.bind(me.onImgReplace, me)); } }, From eabf7da83ed1dbdbbf623c40fb8c73398259d243 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 27 Apr 2024 12:27:25 +0300 Subject: [PATCH 2/3] Fix bugs 67764, 67761, 67756, 67757, 67758, 67760 --- apps/pdfeditor/main/app/view/FileMenuPanels.js | 4 ++-- apps/pdfeditor/main/locale/en.json | 17 ++++++++++++----- apps/pdfeditor/main/locale/ru.json | 3 +++ apps/presentationeditor/main/locale/en.json | 2 ++ apps/presentationeditor/main/locale/ru.json | 2 ++ apps/spreadsheeteditor/main/locale/en.json | 2 ++ apps/spreadsheeteditor/main/locale/ru.json | 2 ++ 7 files changed, 25 insertions(+), 7 deletions(-) diff --git a/apps/pdfeditor/main/app/view/FileMenuPanels.js b/apps/pdfeditor/main/app/view/FileMenuPanels.js index 925bc196c2..491d6f0e96 100644 --- a/apps/pdfeditor/main/app/view/FileMenuPanels.js +++ b/apps/pdfeditor/main/app/view/FileMenuPanels.js @@ -118,7 +118,7 @@ define([ this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'docx').toLowerCase(), - header: /*this.textDownloadAs*/ Common.Locale.get('btnDownloadCaption', {name:'DE.Views.FileMenu', default:this.textDownloadAs})})); + header: /*this.textDownloadAs*/ Common.Locale.get('btnDownloadCaption', {name:'PDFE.Views.FileMenu', default:this.textDownloadAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); @@ -236,7 +236,7 @@ define([ this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'docx').toLowerCase(), - header: /*this.textSaveCopyAs*/ Common.Locale.get('btnSaveCopyAsCaption', {name:'DE.Views.FileMenu', default:this.textSaveCopyAs})})); + header: /*this.textSaveCopyAs*/ Common.Locale.get('btnSaveCopyAsCaption', {name:'PDFE.Views.FileMenu', default:this.textSaveCopyAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 009f8c9e7a..2850dab7ad 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -142,6 +142,8 @@ "Common.Views.About.txtPoweredBy": "Powered by", "Common.Views.About.txtTel": "tel.: ", "Common.Views.About.txtVersion": "Version ", + "Common.Views.Chat.textChat": "Chat", + "Common.Views.Chat.textClosePanel": "Close chat", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.mniAuthorAsc": "Author A to Z", "Common.Views.Comments.mniAuthorDesc": "Author Z to A", @@ -1426,6 +1428,7 @@ "PDFE.Views.InsTab.tipInsertTextArt": "Insert Text Art", "PDFE.Views.InsTab.tipInsertVerticalText": "Insert vertical text box", "PDFE.Views.InsTab.tipPageNum": "Insert page number", + "PDFE.Views.InsTab.mniCustomTable": "Insert custom table", "PDFE.Views.LeftMenu.tipAbout": "About", "PDFE.Views.LeftMenu.tipChat": "Chat", "PDFE.Views.LeftMenu.tipComments": "Comments", @@ -1911,6 +1914,14 @@ "PDFE.Views.Toolbar.txtObjectsAlign": "Align selected objects", "PDFE.Views.Toolbar.txtPageAlign": "Align to Page", "PDFE.Views.Toolbar.txtUngroup": "Ungroup", + "PDFE.Views.Toolbar.textEditMode": "Edit PDF", + "PDFE.Views.Toolbar.tipEditMode": "Add or edit text, shapes, images etc.", + "PDFE.Views.Toolbar.capBtnRecognize": "Recognize Page", + "PDFE.Views.Toolbar.tipRecognize": "Recognize page", + "PDFE.Views.Toolbar.capBtnTextComment": "Text Comment", + "PDFE.Views.Toolbar.capBtnTextCallout": "Text Callout", + "PDFE.Views.Toolbar.tipInsertTextComment": "Insert text comment", + "PDFE.Views.Toolbar.tipInsertTextCallout": "Insert text callout", "PDFE.Views.ViewTab.textAlwaysShowToolbar": "Always Show Toolbar", "PDFE.Views.ViewTab.textDarkDocument": "Dark Document", "PDFE.Views.ViewTab.textFitToPage": "Fit To Page", @@ -1926,9 +1937,5 @@ "PDFE.Views.ViewTab.tipFitToPage": "Fit to page", "PDFE.Views.ViewTab.tipFitToWidth": "Fit to width", "PDFE.Views.ViewTab.tipHeadings": "Headings", - "PDFE.Views.ViewTab.tipInterfaceTheme": "Interface theme", - "PDFE.Views.ViewTab.textEditMode": "Edit PDF", - "PDFE.Views.ViewTab.tipEditMode": "Add or edit text, shapes, images etc.", - "PDFE.Views.ViewTab.capBtnRecognize": "Recognize Page", - "PDFE.Views.ViewTab.tipRecognize": "Recognize page" + "PDFE.Views.ViewTab.tipInterfaceTheme": "Interface theme" } \ No newline at end of file diff --git a/apps/pdfeditor/main/locale/ru.json b/apps/pdfeditor/main/locale/ru.json index e9992c4610..754282e56a 100644 --- a/apps/pdfeditor/main/locale/ru.json +++ b/apps/pdfeditor/main/locale/ru.json @@ -142,6 +142,8 @@ "Common.Views.About.txtPoweredBy": "Разработано", "Common.Views.About.txtTel": "тел.: ", "Common.Views.About.txtVersion": "Версия", + "Common.Views.Chat.textChat": "Чат", + "Common.Views.Chat.textClosePanel": "Закрыть чат", "Common.Views.Chat.textSend": "Отправить", "Common.Views.Comments.mniAuthorAsc": "По автору от А до Я", "Common.Views.Comments.mniAuthorDesc": "По автору от Я до А", @@ -1403,6 +1405,7 @@ "PDFE.Views.InsTab.tipInsertTextArt": "Вставить объект Text Art", "PDFE.Views.InsTab.tipInsertVerticalText": "Вставить вертикальную надпись", "PDFE.Views.InsTab.tipPageNum": "Вставить номер страницы", + "PDFE.Views.InsTab.mniCustomTable": "Пользовательская таблица", "PDFE.Views.LeftMenu.tipAbout": "О программе", "PDFE.Views.LeftMenu.tipChat": "Чат", "PDFE.Views.LeftMenu.tipComments": "Комментарии", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 70d9bc0259..2a4117ac81 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -554,6 +554,8 @@ "Common.Views.AutoCorrectDialog.warnReplace": "The autocorrect entry for %1 already exists. Do you want to replace it?", "Common.Views.AutoCorrectDialog.warnReset": "Any autocorrect you added will be removed and the changed ones will be restored to their original values. Do you want to continue?", "Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?", + "Common.Views.Chat.textChat": "Chat", + "Common.Views.Chat.textClosePanel": "Close chat", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.mniAuthorAsc": "Author A to Z", "Common.Views.Comments.mniAuthorDesc": "Author Z to A", diff --git a/apps/presentationeditor/main/locale/ru.json b/apps/presentationeditor/main/locale/ru.json index 15c1aa159c..8218c87031 100644 --- a/apps/presentationeditor/main/locale/ru.json +++ b/apps/presentationeditor/main/locale/ru.json @@ -554,6 +554,8 @@ "Common.Views.AutoCorrectDialog.warnReplace": "Элемент автозамены для %1 уже существует. Вы хотите заменить его?", "Common.Views.AutoCorrectDialog.warnReset": "Все добавленные вами автозамены будут удалены, а для измененных будут восстановлены исходные значения. Вы хотите продолжить?", "Common.Views.AutoCorrectDialog.warnRestore": "Элемент автозамены для %1 будет сброшен на исходное значение. Вы хотите продолжить?", + "Common.Views.Chat.textChat": "Чат", + "Common.Views.Chat.textClosePanel": "Закрыть чат", "Common.Views.Chat.textSend": "Отправить", "Common.Views.Comments.mniAuthorAsc": "По автору от А до Я", "Common.Views.Comments.mniAuthorDesc": "По автору от Я до А", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index b3d7a50bf3..bccd0d51ec 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -394,6 +394,8 @@ "Common.Views.AutoCorrectDialog.warnReplace": "The autocorrect entry for %1 already exists. Do you want to replace it?", "Common.Views.AutoCorrectDialog.warnReset": "Any autocorrect you added will be removed and the changed ones will be restored to their original values. Do you want to continue?", "Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?", + "Common.Views.Chat.textChat": "Chat", + "Common.Views.Chat.textClosePanel": "Close chat", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.mniAuthorAsc": "Author A to Z", "Common.Views.Comments.mniAuthorDesc": "Author Z to A", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 3d42c0b640..2de3ed2232 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -394,6 +394,8 @@ "Common.Views.AutoCorrectDialog.warnReplace": "Элемент автозамены для %1 уже существует. Вы хотите заменить его?", "Common.Views.AutoCorrectDialog.warnReset": "Все добавленные вами автозамены будут удалены, а для измененных будут восстановлены исходные значения. Вы хотите продолжить?", "Common.Views.AutoCorrectDialog.warnRestore": "Элемент автозамены для %1 будет сброшен на исходное значение. Вы хотите продолжить?", + "Common.Views.Chat.textChat": "Чат", + "Common.Views.Chat.textClosePanel": "Закрыть чат", "Common.Views.Chat.textSend": "Отправить", "Common.Views.Comments.mniAuthorAsc": "По автору от А до Я", "Common.Views.Comments.mniAuthorDesc": "По автору от Я до А", From b6ae5df29f59608610cffc1180cdd84b28358c7c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 27 Apr 2024 12:48:10 +0300 Subject: [PATCH 3/3] Fix changing button icons and scaling --- apps/common/main/lib/component/Button.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 553114654b..9062c41fa6 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -763,8 +763,14 @@ define([ btnIconEl = $(this.el).find('i.icon'); if (opts && (opts.curr || opts.next) && btnIconEl) { var svgIcon = $(this.el).find('.icon use.zoom-int'); - !!opts.curr && (btnIconEl.removeClass(opts.curr)); - !!opts.next && !btnIconEl.hasClass(opts.next) && (btnIconEl.addClass(opts.next)); + if (opts.curr) { + btnIconEl.removeClass(opts.curr); + me.iconCls = me.iconCls.replace(opts.curr, '').trim(); + } + if (opts.next) { + !btnIconEl.hasClass(opts.next) && (btnIconEl.addClass(opts.next)); + (me.iconCls.indexOf(opts.next)<0) && (me.iconCls += ' ' + opts.next); + } svgIcon.length && !!opts.next && svgIcon.attr('href', '#' + opts.next); if ( !!me.options.signals ) {