From 19188fccece7220e8563c10469df37a2455f0369 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Mon, 1 Sep 2025 19:32:00 +0300 Subject: [PATCH 01/14] Fix data view (open menu and press Enter) --- apps/common/main/lib/component/DataView.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index b2f9b76f2d..df47cccf4a 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -1404,9 +1404,9 @@ define([ if (data.keyCode==Common.UI.Keys.RETURN) { if (this.selectedBeforeHideRec) // only for ComboDataView menuPicker rec = this.selectedBeforeHideRec; - if (this.canAddRecents) // only for DaraViewShape + if (this.canAddRecents) // only for DataViewShape this.addRecentItem(rec); - this.trigger('item:click', this, this, rec, e); + rec && this.trigger('item:click', this, this, rec, e); if (this.parentMenu) this.parentMenu.hide(); } else { @@ -1880,6 +1880,8 @@ define([ this.addRecentItem(record); }, addRecentItem: function (rec) { + if (!rec) return; + var me = this, exist = false, type = rec.get('data').shapeType, From c0fbc0e6c886bf65ef339a17d2c10d10791a8b07 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Mon, 1 Sep 2025 21:32:04 +0300 Subject: [PATCH 02/14] Fix Bug 76178 --- .../main/app/view/SlideSettings.js | 31 ++++--------------- .../mobile/src/controller/edit/EditSlide.jsx | 13 ++------ .../mobile/src/view/edit/EditSlide.jsx | 2 +- 3 files changed, 10 insertions(+), 36 deletions(-) diff --git a/apps/presentationeditor/main/app/view/SlideSettings.js b/apps/presentationeditor/main/app/view/SlideSettings.js index 62833f5280..85bdf340bc 100644 --- a/apps/presentationeditor/main/app/view/SlideSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSettings.js @@ -123,8 +123,7 @@ define([ {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP}, - {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT}, - {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL} + {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT} ]; this.cmbFillSrc = new Common.UI.ComboBox({ @@ -146,7 +145,7 @@ define([ this.btnBackColor = new Common.UI.ColorButton({ parentEl: $('#slide-back-color-btn'), disabled: true, - transparent: true, + transparent: false, menu: true, color: 'ffffff', eyeDropper: true, @@ -356,17 +355,6 @@ define([ this.api.SetSlideProps(props); } break; - case Asc.c_oAscFill.FILL_TYPE_NOFILL: - this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL; - if (!this._noApply) { - var props = new Asc.CAscSlideProps(); - var fill = new Asc.asc_CShapeFill(); - fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL); - fill.put_fill(null); - props.put_background(fill); - this.api.SetSlideProps(props); - } - break; } this.fireEvent('editcomplete', this); }, @@ -377,16 +365,9 @@ define([ if (this.api && !this._noApply) { var props = new Asc.CAscSlideProps(); var fill = new Asc.asc_CShapeFill(); - - if (this.SlideColor.Color=='transparent') { - fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL); - fill.put_fill(null); - } else { - fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID); - fill.put_fill( new Asc.asc_CFillSolid()); - fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.SlideColor.Color)); - } - + fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID); + fill.put_fill( new Asc.asc_CFillSolid()); + fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.SlideColor.Color)); props.put_background(fill); this.api.SetSlideProps(props); } @@ -1252,7 +1233,7 @@ define([ } if (fill===null || fill_type===null || fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет или не совпадает у неск. фигур - this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL; + this.OriginalFillType = null; } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) { fill = fill.get_fill(); color = fill.get_color(); diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx index c8141ee4ca..a792b815f3 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx @@ -105,16 +105,9 @@ class EditSlideController extends Component { let props = new Asc.CAscSlideProps(), fill = new Asc.asc_CShapeFill(); - - if (color == 'transparent') { - fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL); - fill.put_fill(null); - } else { - fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID); - fill.put_fill(new Asc.asc_CFillSolid()); - fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(color)); - } - + fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID); + fill.put_fill(new Asc.asc_CFillSolid()); + fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(color)); props.put_background(fill); api.SetSlideProps(props); diff --git a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx index e95e2c05c7..5ea5f78cd0 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx @@ -449,7 +449,7 @@ const PageFillColor = props => { } - + Date: Tue, 2 Sep 2025 20:02:49 +0300 Subject: [PATCH 03/14] [main] code.js loaded for wrong path for IE --- apps/documenteditor/forms/app.js | 3 ++- apps/documenteditor/main/app.js | 4 +++- apps/presentationeditor/main/app.js | 3 ++- apps/spreadsheeteditor/main/app.js | 3 ++- apps/visioeditor/main/app.js | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/forms/app.js b/apps/documenteditor/forms/app.js index 18ce72000c..c5ccbde01e 100644 --- a/apps/documenteditor/forms/app.js +++ b/apps/documenteditor/forms/app.js @@ -154,7 +154,8 @@ require([ 'common/main/lib/view/SearchBar', 'common/forms/lib/view/modals' ], function() { - app.postLaunchScripts = ['documenteditor/forms/code']; + const code_path = !window.isIEBrowser ? 'documenteditor/forms/code' : 'documenteditor/forms/ie/code'; + app.postLaunchScripts = [code_path]; app.start(); }); diff --git a/apps/documenteditor/main/app.js b/apps/documenteditor/main/app.js index fc31392a1b..269cc37fd3 100644 --- a/apps/documenteditor/main/app.js +++ b/apps/documenteditor/main/app.js @@ -205,8 +205,10 @@ require([ ,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Draw' ], function() { + const code_path = !window.isIEBrowser ? + 'documenteditor/main/code' : 'documenteditor/main/ie/code'; app.postLaunchScripts = [ - 'documenteditor/main/code', + code_path, ]; app.start(); }); diff --git a/apps/presentationeditor/main/app.js b/apps/presentationeditor/main/app.js index 9060a7e344..ecfeaf6979 100644 --- a/apps/presentationeditor/main/app.js +++ b/apps/presentationeditor/main/app.js @@ -205,8 +205,9 @@ require([ ,'presentationeditor/main/app/controller/Transitions' ,'presentationeditor/main/app/controller/Animation' ], function() { + const code_path = !window.isIEBrowser ? 'presentationeditor/main/code' : 'presentationeditor/main/ie/code'; app.postLaunchScripts = [ - 'presentationeditor/main/code', + code_path, ]; app.start(); diff --git a/apps/spreadsheeteditor/main/app.js b/apps/spreadsheeteditor/main/app.js index 7e344f954e..72b7db6ac2 100644 --- a/apps/spreadsheeteditor/main/app.js +++ b/apps/spreadsheeteditor/main/app.js @@ -205,8 +205,9 @@ require([ ,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Draw' ], function() { + const code_path = !window.isIEBrowser ? 'spreadsheeteditor/main/code' : 'spreadsheeteditor/main/ie/code'; app.postLaunchScripts = [ - 'spreadsheeteditor/main/code', + code_path, ]; app.start(); diff --git a/apps/visioeditor/main/app.js b/apps/visioeditor/main/app.js index ff827d7475..b5c298fa71 100644 --- a/apps/visioeditor/main/app.js +++ b/apps/visioeditor/main/app.js @@ -167,8 +167,9 @@ require([ 'common/main/lib/controller/Chat', 'common/main/lib/controller/Plugins' ], function() { + const code_path = !window.isIEBrowser ? 'visioeditor/main/code' : 'visioeditor/main/ie/code'; app.postLaunchScripts = [ - 'visioeditor/main/code' + code_path, ]; app.start(); From e5db10ab489f3339bcab4447a6f7b1ecbefa2012 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Wed, 3 Sep 2025 12:56:58 +0300 Subject: [PATCH 04/14] Fix bug 76537 --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 +- apps/spreadsheeteditor/main/locale/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 89d54456cb..e9efd46e25 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -4578,7 +4578,7 @@ define([ } if ( config.canFeatureTable ) { - tab = {caption: 'Table Design', action: 'tabledesign', extcls: config.isEdit ? 'canedit' : '', layoutname: 'toolbar-tabledesign', dataHintTitle: 'B', aux: true}; + tab = {caption: me.toolbar.textTabTableDesign, action: 'tabledesign', extcls: config.isEdit ? 'canedit' : '', layoutname: 'toolbar-tabledesign', dataHintTitle: 'B', aux: true}; var tabledesigntab = me.getApplication().getController('TableDesignTab'); tabledesigntab.setApi(me.api).setConfig({toolbar: me}); var view = tabledesigntab.getView('TableDesignTab'); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index dca224b812..078e4fa11e 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -4439,6 +4439,7 @@ "SSE.Views.Toolbar.textTabLayout": "Layout", "SSE.Views.Toolbar.textTabProtect": "Protection", "SSE.Views.Toolbar.textTabView": "View", + "SSE.Views.Toolbar.textTabTableDesign": "Table Design", "SSE.Views.Toolbar.textThisPivot": "From this pivot", "SSE.Views.Toolbar.textThisSheet": "From this sheet", "SSE.Views.Toolbar.textThisTable": "From this table", From 15382a7eef604558219234fa266b57394527e866 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Thu, 4 Sep 2025 13:19:05 +0300 Subject: [PATCH 05/14] Fix translation --- apps/common/main/lib/component/InputField.js | 4 +-- apps/presentationeditor/main/locale/en.json | 34 ++++++++++++++++++++ apps/spreadsheeteditor/main/locale/en.json | 34 ++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index fecc5c2922..f8155b6d6d 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -685,7 +685,7 @@ define([ } })(), Common.UI.InputFieldBtnPassword || {})); - Common.UI.InputFieldBtnCalendar = Common.UI.InputFieldBtn.extend((function (){ + Common.UI.InputFieldBtnCalendar = Common.UI.InputFieldBtn.extend(_.extend((function() { return { options: { id: null, @@ -767,7 +767,7 @@ define([ textDate: 'Select date' } - })()); + })(), Common.UI.InputFieldBtnCalendar || {})); Common.UI.InputFieldFixed = Common.UI.InputField.extend((function() { return { diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 0befe25c2a..d44216c2b3 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -437,6 +437,39 @@ "Common.UI.ButtonColored.textAutoColor": "Automatic", "Common.UI.ButtonColored.textEyedropper": "Eyedropper", "Common.UI.ButtonColored.textNewColor": "More colors", + "Common.UI.Calendar.textApril": "April", + "Common.UI.Calendar.textAugust": "August", + "Common.UI.Calendar.textDecember": "December", + "Common.UI.Calendar.textFebruary": "February", + "Common.UI.Calendar.textJanuary": "January", + "Common.UI.Calendar.textJuly": "July", + "Common.UI.Calendar.textJune": "June", + "Common.UI.Calendar.textMarch": "March", + "Common.UI.Calendar.textMay": "May", + "Common.UI.Calendar.textMonths": "Months", + "Common.UI.Calendar.textNovember": "November", + "Common.UI.Calendar.textOctober": "October", + "Common.UI.Calendar.textSeptember": "September", + "Common.UI.Calendar.textShortApril": "Apr", + "Common.UI.Calendar.textShortAugust": "Aug", + "Common.UI.Calendar.textShortDecember": "Dec", + "Common.UI.Calendar.textShortFebruary": "Feb", + "Common.UI.Calendar.textShortFriday": "Fr", + "Common.UI.Calendar.textShortJanuary": "Jan", + "Common.UI.Calendar.textShortJuly": "Jul", + "Common.UI.Calendar.textShortJune": "Jun", + "Common.UI.Calendar.textShortMarch": "Mar", + "Common.UI.Calendar.textShortMay": "May", + "Common.UI.Calendar.textShortMonday": "Mo", + "Common.UI.Calendar.textShortNovember": "Nov", + "Common.UI.Calendar.textShortOctober": "Oct", + "Common.UI.Calendar.textShortSaturday": "Sa", + "Common.UI.Calendar.textShortSeptember": "Sep", + "Common.UI.Calendar.textShortSunday": "Su", + "Common.UI.Calendar.textShortThursday": "Th", + "Common.UI.Calendar.textShortTuesday": "Tu", + "Common.UI.Calendar.textShortWednesday": "We", + "Common.UI.Calendar.textYears": "Years", "Common.UI.ComboBorderSize.txtNoBorders": "No borders", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders", "Common.UI.ComboDataView.emptyComboText": "No styles", @@ -446,6 +479,7 @@ "Common.UI.ExtendedColorDialog.textNew": "New", "Common.UI.ExtendedColorDialog.textRGBErr": "The entered value is incorrect.
Please enter a numeric value between 0 and 255.", "Common.UI.HSBColorPicker.textNoColor": "No color", + "Common.UI.InputFieldBtnCalendar.textDate": "Select date", "Common.UI.InputFieldBtnPassword.textHintHidePwd": "Hide password", "Common.UI.InputFieldBtnPassword.textHintHold": "Press and hold to show password", "Common.UI.InputFieldBtnPassword.textHintShowPwd": "Show password", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 078e4fa11e..6112615819 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -291,6 +291,39 @@ "Common.UI.ButtonColored.textAutoColor": "Automatic", "Common.UI.ButtonColored.textEyedropper": "Eyedropper", "Common.UI.ButtonColored.textNewColor": "More colors", + "Common.UI.Calendar.textApril": "April", + "Common.UI.Calendar.textAugust": "August", + "Common.UI.Calendar.textDecember": "December", + "Common.UI.Calendar.textFebruary": "February", + "Common.UI.Calendar.textJanuary": "January", + "Common.UI.Calendar.textJuly": "July", + "Common.UI.Calendar.textJune": "June", + "Common.UI.Calendar.textMarch": "March", + "Common.UI.Calendar.textMay": "May", + "Common.UI.Calendar.textMonths": "Months", + "Common.UI.Calendar.textNovember": "November", + "Common.UI.Calendar.textOctober": "October", + "Common.UI.Calendar.textSeptember": "September", + "Common.UI.Calendar.textShortApril": "Apr", + "Common.UI.Calendar.textShortAugust": "Aug", + "Common.UI.Calendar.textShortDecember": "Dec", + "Common.UI.Calendar.textShortFebruary": "Feb", + "Common.UI.Calendar.textShortFriday": "Fr", + "Common.UI.Calendar.textShortJanuary": "Jan", + "Common.UI.Calendar.textShortJuly": "Jul", + "Common.UI.Calendar.textShortJune": "Jun", + "Common.UI.Calendar.textShortMarch": "Mar", + "Common.UI.Calendar.textShortMay": "May", + "Common.UI.Calendar.textShortMonday": "Mo", + "Common.UI.Calendar.textShortNovember": "Nov", + "Common.UI.Calendar.textShortOctober": "Oct", + "Common.UI.Calendar.textShortSaturday": "Sa", + "Common.UI.Calendar.textShortSeptember": "Sep", + "Common.UI.Calendar.textShortSunday": "Su", + "Common.UI.Calendar.textShortThursday": "Th", + "Common.UI.Calendar.textShortTuesday": "Tu", + "Common.UI.Calendar.textShortWednesday": "We", + "Common.UI.Calendar.textYears": "Years", "Common.UI.ComboBorderSize.txtNoBorders": "No borders", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders", "Common.UI.ComboDataView.emptyComboText": "No styles", @@ -301,6 +334,7 @@ "Common.UI.ExtendedColorDialog.textRGBErr": "The entered value is incorrect.
Please enter a numeric value between 0 and 255.", "Common.UI.HSBColorPicker.textNoColor": "No Color", "Common.UI.InputField.txtEmpty": "This field is required", + "Common.UI.InputFieldBtnCalendar.textDate": "Select date", "Common.UI.InputFieldBtnPassword.textHintHidePwd": "Hide password", "Common.UI.InputFieldBtnPassword.textHintHold": "Press and hold to show password", "Common.UI.InputFieldBtnPassword.textHintShowPwd": "Show password", From 1724aa801fa8cd26a0349fa2da070da1608ebd96 Mon Sep 17 00:00:00 2001 From: Denis Dokin Date: Thu, 4 Sep 2025 16:03:10 +0300 Subject: [PATCH 06/14] [icons] new theme --- .../img/toolbar/v2/1.25x/btn-macros-pause.png | Bin 0 -> 197 bytes .../img/toolbar/v2/1.25x/btn-macros-record.png | Bin 0 -> 603 bytes .../img/toolbar/v2/1.25x/btn-macros-stop.png | Bin 0 -> 244 bytes .../img/toolbar/v2/1.5x/btn-macros-pause.png | Bin 0 -> 208 bytes .../img/toolbar/v2/1.5x/btn-macros-record.png | Bin 0 -> 642 bytes .../img/toolbar/v2/1.5x/btn-macros-stop.png | Bin 0 -> 277 bytes .../img/toolbar/v2/1.75x/btn-macros-pause.png | Bin 0 -> 232 bytes .../img/toolbar/v2/1.75x/btn-macros-record.png | Bin 0 -> 695 bytes .../img/toolbar/v2/1.75x/btn-macros-stop.png | Bin 0 -> 301 bytes .../img/toolbar/v2/1x/btn-macros-pause.png | Bin 0 -> 174 bytes .../img/toolbar/v2/1x/btn-macros-record.png | Bin 0 -> 487 bytes .../img/toolbar/v2/1x/btn-macros-stop.png | Bin 0 -> 222 bytes .../img/toolbar/v2/2.5x/btn-macros-pause.svg | 3 +++ .../img/toolbar/v2/2.5x/btn-macros-record.svg | 4 ++++ .../img/toolbar/v2/2.5x/btn-macros-stop.svg | 4 ++++ .../img/toolbar/v2/2x/btn-macros-pause.png | Bin 0 -> 257 bytes .../img/toolbar/v2/2x/btn-macros-record.png | Bin 0 -> 871 bytes .../img/toolbar/v2/2x/btn-macros-stop.png | Bin 0 -> 355 bytes 18 files changed, 11 insertions(+) create mode 100644 apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-pause.svg create mode 100644 apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-record.svg create mode 100644 apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-stop.svg create mode 100644 apps/common/main/resources/img/toolbar/v2/2x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/v2/2x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/v2/2x/btn-macros-stop.png diff --git a/apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..8362a7006417cc309e792136eb8e15a2839da223 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^Hb5-L!2%?2P273}NcDKSIEGZ*dOOWf=!gOj^JkH| z#>&t?kEbNgaq_<~)ui1>#C-b6h^!EWZA{hPOYg1S6)rJ#_W4~K<2kg-=Qs6+nJH@X z1{?U_wDopq2o0UzaXZi8VEp>6$xA{DWR%x7TV67np{#0g(4P7KTg#{Czv>hmy&EBt x;7}IGvSVl9&ZK=DCHz|PFXpWddv*60!=sOEa!t>+?*zJw!PC{xWt~$(69DLoO|$?2 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-record.png b/apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-record.png new file mode 100644 index 0000000000000000000000000000000000000000..da47fab70271a0beb5e7038d0e904106f52a2665 GIT binary patch literal 603 zcmV-h0;K(kP)Y|9GoNb5l(&ujh3($A#=uPQi^sHUZRu8X?7jFU+ zUiiuSR(kk;IOKLYBgTBwG%J($)^h=rKfOA#dgJjpLCn3JqIcVTrSX6E+0~JcpZ{NJ zD2g&h@A6kXkv{L@aC@IwdK*S8&$#ZR`cMPb}3S91SuR~*{ pcXAuUjSEK+D;q3WuwcK#{s9UhRKT8V4XpqG002ovPDHLkV1n>W9M}K= literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/v2/1.25x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..26463cd6ccc1aa06edc1c9a023443198cb649e01 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^Hb5-L!3HD?X4LuvsokC~jv*C{Z)Z4iH5&-HKG(4A zVZL|lj)!=sT>iI9lYZ@9uWIih_^)|?rstgLM~_@=5pcRQv0#3Z#3PTl9-G|amin9z zdgPJ1d3|=4xZA!GhYLen<1*n31AdUx7>-BR1TYjQmD&4PQ4>UH&#`L% rpJ2!E#!_A6&cp+9WzIln>|tE>?$05MK1E-kHyAu!{an^LB{Ts5=D}+7 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..9b9b0f6cc23ac4eba1d6b753e2334652b8c9b155 GIT binary patch literal 208 zcmV;>05AWEP)0001&Nkl#A>`r691t%=Wwr#H7t9OM z_soSNkl;j1c+MOqjoH&j} zKAy+pNTpJ#R4UcK)L<}}^!t6wZP`K)=8GEWa5zkk$D`%8Y$51$I!&4aB96Ev*zs^U zv<(5#cDrrm_h25L&o=$2vSmk>4FP%YzjZ!*P`l9_P}`vn`audv0eu!A+|#pL`|bNJ zeh}{I*{%Kd{kJ

_6UI3h2WC;hlsF!j-GQ(c&Kc?*PP=ce3B_SFQp_EBEqyg5@AT z$1sQ)`WQ-@BuURz&>TkkXMuAN-N2clkK2@pdX);=NdK%e2ML^ofboQWJO`xU4iY%* zl!butWUcMtImQJCgyq9Q4vrmo5XS=P(K$yZkUR;TjNLPj zx{^R50UJ9o*xJ!Aa5|GfB7lYS92ivA=?*IS*07*qoM6N<$g8vpKtN;K2 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/v2/1.5x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..c579cb0f6cd8be6203974fd3dedeb0b56dba0365 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^9zd+Z!3-p2S$jf&ludw7h%1o(zkK<750C%LmVI(| ze(&u3XX(;Eix$0ib$##T^cN`Q;_`d(Vj%f<=~AE|P!`CBke_+a1p@U8l?3?(Gbkv; z$HylCL4AEg!~Og3-}CDIO#sT4dAc};RNQ)d)spXk0f)=Qllv-Lf8RHC)$!)A4tn*$ ztLr|a0b7KTc43==YS1AT&AxzRJc>L4Z7iJ&S12xQ{3o_+$BthMCwF~TJrZi~GPPCb z3SXsOjs24q1?Mkp`(LcF-7mLgLez3Ihg-_pKN~i%1zk$(zsz7>-ynJI+a2`?pbHp0 MUHx3vIVCg!0AFKt7XSbN literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..ea578bcacf7352a386c8bbb1c067778df1ccb01c GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^AwaCf!2%@Py|(-YQtLfk978H@y}hxK_lN;UYoc2s z&$d#tM3L#&E>^UZFZJ#@@>1mGUz3ubPt-bF4Ua|SFMHN@h$q3nd~ fub?lpZ-)_4%6AwjSTW`F7iOZ{PO8!rZNU(iyW;Dibe=+}*tYmS(%1a&idE zW%m-P?iq_zruDzr=<>|vF@N9_S8w@6Cpz0E`N&<2R8kK%N&5exW8JSc68BeZykW6F zd*0Pqsf+dOW?eq~H1_kNYdVMh?kgAia?S8vE-bPn?O}1;FFDPvk;k%j+AKH|*1)rR zde_moL hg)v)HW1s;SL(mH~#UAs(5@5tKc)I$ztaD0e0swN!QeFT6 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/v2/1.75x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..db8f1b87e19ce74f159279c8acc5d7cee6968d36 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^AwaCf!3-p&=Jq%NDa!z#5LY1m-oxX)iwg+3y8d6j z{Livwf0ix8eS`o2 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/v2/1x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..8367dbc5f98363da4de2d97b0804c8ddb00b13b2 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!2%@3zHAEzQl*|Qjv*Dd-cB{-JD|YfYT0x= z@y*!>%g#M|AXvv9=24nC`PJ`}^L_3mFj(cVaw~TRIEXvX(c8!nzOZ4nfyRM=!`~N6 z2r;UrFnRrmJ8-o+Ea7T(9K-ue#y$NH0zceR|6j&;E&OOijOZzkMIslj2rPeTDH~nL ZeA)Yip}ySA*+2&{c)I$ztaD0e0suJ}L52VT literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1x/btn-macros-record.png b/apps/common/main/resources/img/toolbar/v2/1x/btn-macros-record.png new file mode 100644 index 0000000000000000000000000000000000000000..742832c5a8f93dcc287ed7cab5cc4eebe7509c40 GIT binary patch literal 487 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSsm1`G5LY1m{{8#=_wPG6I6Qy; z+`_`*)vH%lR#v8_rhiwgc<<`^YuU12OP0KMae4jv_21>ofefIUmoH!bUb^)6;>8dy zP|DKM(%jq}sQ1N-7eF?U0Z|4d|14VuR0b4*iv!tzmM(?pJr#6fGSCs~B|(0{3<3fI z3JL}W2Ko5~1qJm$&;SDc{rwXrOqf4^!Git!&!4}4U#fxm1W?O6PZ!6Kid#=Fd*&Zj z5NLbI|9GkQ8?m6tdK;tldCdO*XBRse)VTATkmmVJzB*G6wmbSyg}LgjroRxVluUp5 z_)V7u_jIX|<=DlT{<{hF!!KpLYka~o^WM0M4J%oiimtq=COOnANZ z(Bbo1o0TIwp00NJyO(31V{gUW`30sq&gKtNtBx#x#%TI>-}_ouoef_zZ*MEktbAbD zp3s)wcvz%~voD@^)h~f9zIPP*c%NFboG-nTP~%`ApYdF7F(covADq9ME`MorY@Yb~ z#)7JN)uJTHtSQr%GN|)b8VSw0a4j07{v^W}*F$fyl2uW@LmAazpw!mTxIo zMVuV#THdWGQkFpkwC9}M_lF@_Mx59W>9)DQuk)NN0|^KSDj*=w7U + + diff --git a/apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-record.svg b/apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-record.svg new file mode 100644 index 0000000000..b955869130 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-record.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-stop.svg b/apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-stop.svg new file mode 100644 index 0000000000..ac9d805136 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/v2/2.5x/btn-macros-stop.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/common/main/resources/img/toolbar/v2/2x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/v2/2x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..9b8d4f18a77a0df2f6a7c1403a25019fdf646746 GIT binary patch literal 257 zcmV+c0sj7pP)305V>^dSzv0Wol~r`t|GI%a{LNy!gF~3sCCKn>R0CzO=No zG&3^;ssW1pTDI)hk|jV{ph_SYDEoWqQix)p2vDWDxj9hfix)3|Y={=18lcKQ%a;9F zy7YsK3s5mo9LR<10&?LRfhvLKAd3KXK~$by5S|3|jD1OvUoe9J1Slvd7ytp-LjgdL zkWf%iP+#8w1pWQ}6DCZUKYzi3^+2#62+jk+{rf=gzW>H>oRNWniOq9LPnQGH)l1B>&nRoyDHScN$6DLT5?3H=mNgF`EY4h*A`Y>Z&^YWe3 zPB-L(rsFr_i$s*GISy1#xb(O=U{!^zr zm~KVP(>0c3Slw*M9yPsPCQwd)*%j7l)sH1J)MP$2_=^NQp4+}X{;cY$gTa3o?O$H% zWbqP7{ctR1ajKZ4XK9SY%gqee(#~J4Tb>nH%OyVV&}Ig)wDVKrb~7b-2$?y3Ud(=Y z_6D&HAC#ri5>k$d{Mw+E6}Fa1LC)m0(we4@6k~=zzb71G;A?qwBkDk-zUH#y>2Tsva#K4VG*Fp)8My85}Sb4q9e01{G@_W%F@ literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/2x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/v2/2x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..ce787bd8944b41ac7fa4a36bb62a40f569282765 GIT binary patch literal 355 zcmeAS@N?(olHy`uVBq!ia0vp^2|#SX!3-pCp6LGzq(TCGLR^9L|K-cydwBd`w(OI$ z^LuCKKTDVXS+wZAtLu9wr@ufc7nk2lm;PS77|8g$Y}tD^H-rdKjkELLrAvW|fx3X= z5b_*H@;;!sQYArt!3+ut@$vBqKu}-b(9qD|-#-Be?%#j^{<4&!I#AUTPZ!6Kid%25 zS@In=;Bg7Obx!X1IjzE-|7|aGG<6Fe&}%$$})9Fc|#Airnof% f_mkS%HyFjM9CypUUVStd=w1d-S3j3^P6 Date: Thu, 4 Sep 2025 16:52:45 +0300 Subject: [PATCH 07/14] [icons] old theme --- .../img/toolbar/1.25x/btn-macros-pause.png | Bin 0 -> 124 bytes .../img/toolbar/1.25x/btn-macros-record.png | Bin 0 -> 314 bytes .../img/toolbar/1.25x/btn-macros-stop.png | Bin 0 -> 125 bytes .../img/toolbar/1.5x/btn-macros-pause.png | Bin 0 -> 123 bytes .../img/toolbar/1.5x/btn-macros-record.png | Bin 0 -> 356 bytes .../img/toolbar/1.5x/btn-macros-stop.png | Bin 0 -> 125 bytes .../img/toolbar/1.75x/btn-macros-pause.png | Bin 0 -> 132 bytes .../img/toolbar/1.75x/btn-macros-record.png | Bin 0 -> 356 bytes .../img/toolbar/1.75x/btn-macros-stop.png | Bin 0 -> 129 bytes .../resources/img/toolbar/1x/btn-macros-pause.png | Bin 0 -> 109 bytes .../img/toolbar/1x/btn-macros-record.png | Bin 0 -> 285 bytes .../resources/img/toolbar/1x/btn-macros-stop.png | Bin 0 -> 108 bytes .../img/toolbar/2.5x/btn-macros-pause.svg | 4 ++++ .../img/toolbar/2.5x/btn-macros-record.svg | 5 +++++ .../img/toolbar/2.5x/btn-macros-stop.svg | 4 ++++ .../resources/img/toolbar/2x/btn-macros-pause.png | Bin 0 -> 136 bytes .../img/toolbar/2x/btn-macros-record.png | Bin 0 -> 490 bytes .../resources/img/toolbar/2x/btn-macros-stop.png | Bin 0 -> 132 bytes 18 files changed, 13 insertions(+) create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-macros-stop.png create mode 100644 apps/common/main/resources/img/toolbar/2.5x/btn-macros-pause.svg create mode 100644 apps/common/main/resources/img/toolbar/2.5x/btn-macros-record.svg create mode 100644 apps/common/main/resources/img/toolbar/2.5x/btn-macros-stop.svg create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-macros-pause.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-macros-record.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-macros-stop.png diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/1.25x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..c10ce10ce45b8ae1ea81e10489f010ce799c556c GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjd1SA+_`mHR16jMo%UoZnB{|Nnn{qs_$&0SbDola{trG&U;4RapG3JhEH(ZhcCd5QB+U V=0_Wq4+}xYdb;|#taD0e0swvpCFlSE literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-macros-record.png b/apps/common/main/resources/img/toolbar/1.25x/btn-macros-record.png new file mode 100644 index 0000000000000000000000000000000000000000..7204b6920677da525b275b0f0d20b9245e4e6459 GIT binary patch literal 314 zcmV-A0mc4_P)X1ONa4*yvS?)W)c6xT9=Qc3vQ%U}lPW-PR4GMQ z7jZI`G^Qg301j%cH&IaO)LO_lR^|w5d$qxq`+tBuBON(w^^R^jHz&Q;3G$3|WUCQ; zD8X5&aezD{9SNcUptKQ{kY}VLgP=D6h=K@tMmo}}3@%{sE;_hEzEMnG#sWcSuNUt7 z+xWB-0T`b)3iDLX8m%Zes9ZFXj5Ef{JdK@Koza&UI}MOy{I%!9H>I}S5ufuw6#xJL M07*qoM6N<$g1a$&od5s; literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/1.25x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..69c278611b754b4c85bc67ee8b1d7b23cb764a14 GIT binary patch literal 125 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjd1SA+_`mHR16jMo%UoZnB{|Nnn{qs_$&0SbDola?;|C?nyp=g0r>%tOl8Q(yd3HlD)p XULk*W;!ewhAagxk{an^LB{Ts5-r*=t literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.5x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/1.5x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..69f770b87135e4384a577567727018ad841d202d GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp^Hb5-L1SA;bovn<36jMo%UoZnB>9@{0N&0NBnb??#|4n#?Gz+YzssvG~P;-qtO|H5|t|Q0RGmLlB;oyWv9dk4SjCa%FM!-qO5pxZU zchlk83Z;$`3-2)AO@~XlAj%wZl-Ua2MED`M=SqkwK}S%DsmlRqV_UVIs}1M>2u!4j zUaZwlf|cA}VIXacZf2pS6y;W}aDZ h__JBF24W( literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-macros-record.png b/apps/common/main/resources/img/toolbar/1.75x/btn-macros-record.png new file mode 100644 index 0000000000000000000000000000000000000000..c14a60875c645c636d09df731044502b6f184ace GIT binary patch literal 356 zcmV-q0h|7bP)V7mfD1+gn2B_th~3P=eq!Bh|=E1bBJZ{^w^>Sm>}pCSZk#OM7s9M`NR)j>y0N|F0|RxwL;c)T6jd aU6>&v`F7QV-|uZeW_!B&xvXh{kIzcDHBf@$B>F!$r3vs*ynXD;^B8N z7hrcV7FfP(Va|hkj?U8#EZk0gQWhP&GQKyiXvnzb9OPoqm)Y-l_KZz3P(OpGtDnm{ Hr-UW|editO literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-macros-record.png b/apps/common/main/resources/img/toolbar/1x/btn-macros-record.png new file mode 100644 index 0000000000000000000000000000000000000000..e67cdb61859c2f58c435c6e346f7e4428f95631d GIT binary patch literal 285 zcmV+&0pk9NP)(KZeZQO4bD2WQU7_tKBO=7q%ZVh`s*8hO=#RT<1P;;E*j**8xpZ$*pFpLNs;)mXr-oS001W;tVZxq_H5I~<8`5DxZtRB7$tgKfkdts=&K@E;Z!E$UZA!3s jqgF+)s!fU7uRN>|f|AEsn&6S@00000NkvXXu0mjfh)Z|v literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/1x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..a86b77062c39bf55a9586c07fce3d97fdff605f2 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<h{kIzcDPvC;$B>F!$r3vs*ynXD;^B8N z7hrcV7FfPZFBHR**W%E{WS(^XYh3Ob6Mw< G&;$Ss;~Lfg literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2.5x/btn-macros-pause.svg b/apps/common/main/resources/img/toolbar/2.5x/btn-macros-pause.svg new file mode 100644 index 0000000000..46e9558c39 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/2.5x/btn-macros-pause.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/common/main/resources/img/toolbar/2.5x/btn-macros-record.svg b/apps/common/main/resources/img/toolbar/2.5x/btn-macros-record.svg new file mode 100644 index 0000000000..891b0f7ab7 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/2.5x/btn-macros-record.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/common/main/resources/img/toolbar/2.5x/btn-macros-stop.svg b/apps/common/main/resources/img/toolbar/2.5x/btn-macros-stop.svg new file mode 100644 index 0000000000..e357a7d5bf --- /dev/null +++ b/apps/common/main/resources/img/toolbar/2.5x/btn-macros-stop.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/common/main/resources/img/toolbar/2x/btn-macros-pause.png b/apps/common/main/resources/img/toolbar/2x/btn-macros-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..9b653162f9b95e48ce4920138342bc96bb62a1f9 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!2%=?XKw8RQvRMUjv*Dd-rmsUV^H96J$Uc` zCHZc}mZJ{Ou7>pGL`~YKHQQKYwk=;w4%?ce42+EHnS)<`4^Ei$#aaOj7G$#te6U<_ h{*dMcey?9E*~~5e%D)vaO#≪OXk;vd$@?2>|hwEusJb literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-macros-record.png b/apps/common/main/resources/img/toolbar/2x/btn-macros-record.png new file mode 100644 index 0000000000000000000000000000000000000000..1a628597130977cb2c6f1ab335ba3e9221aacbb7 GIT binary patch literal 490 zcmVH#Z&)p!e$5R;?9)a=t?aD|1@4tu=@m zwN58ltKECCfRetvf=j{R5w%w9*+%PKjkP3-P|}w-@F$)myodmn-jQr^4<&th0~_>+ zmZn4zuZU36cj~}74F&`#?YojoGN(47q%UvafPmhdZqh?ZU*5n!SfSIIvNIJb?W>OZ zqN@4ye`&YRAs g82|BI{)3j}F9V5d8e|<2lmGw#07*qoM6N<$f`N466951J literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-macros-stop.png b/apps/common/main/resources/img/toolbar/2x/btn-macros-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..6f5fa74ed0e6bb9316167cc6b133c7fff57793c9 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!2%=?XKw8RQr?~}jv*Dd-rhLK%b>u);`lpX zO8SDtMgEj&Y|lLNJhDPn@`F{h`S!eFk(tiO#8k(6?AN9PH&{5p;Kgi479G|tI(wLM c1A>;TIn~L?9#3pM3N)6%)78&qol`;+02Lx8ivR!s literal 0 HcmV?d00001 From 029b0d2c0807ec4348111bc0173297119eb9b4ee Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Thu, 4 Sep 2025 21:18:33 +0300 Subject: [PATCH 08/14] Fix bugs --- apps/documenteditor/main/app/view/BookmarksDialog.js | 2 +- apps/spreadsheeteditor/main/app/view/ChartDataDialog.js | 2 +- .../main/app/view/PivotInsertCalculatedItemDialog.js | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/view/BookmarksDialog.js b/apps/documenteditor/main/app/view/BookmarksDialog.js index b8a2ace1b7..d3dd464802 100644 --- a/apps/documenteditor/main/app/view/BookmarksDialog.js +++ b/apps/documenteditor/main/app/view/BookmarksDialog.js @@ -90,7 +90,7 @@ define([ '', '', '', - '', + '', '

', '
', '', diff --git a/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js b/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js index f3ca3e91fa..adb5f2255c 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js @@ -354,7 +354,7 @@ define([ var record = null, listView = this.seriesList; if (listView.disabled) return; - if (_.isUndefined(undefined)) data = e; + if (_.isUndefined(data)) data = e; if (data.keyCode==Common.UI.Keys.DELETE && !this.btnDelete.isDisabled()) { // this.onDeleteSeries(); diff --git a/apps/spreadsheeteditor/main/app/view/PivotInsertCalculatedItemDialog.js b/apps/spreadsheeteditor/main/app/view/PivotInsertCalculatedItemDialog.js index df5b2299c8..be53756eb4 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotInsertCalculatedItemDialog.js +++ b/apps/spreadsheeteditor/main/app/view/PivotInsertCalculatedItemDialog.js @@ -265,9 +265,6 @@ define([ const helpCenter = Common.Utils.InternalSettings.get('url-help-center'); if ( helpCenter ) { const _url_obj = new URL(helpCenter); - if ( !!_url_obj.searchParams ) - _url_obj.searchParams.set('function', func); - window.open(_url_obj.toString(), '_blank'); } From 8cac4bb881b33a2e610266e563dda8eccc18f860 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Wed, 3 Sep 2025 00:21:50 +0300 Subject: [PATCH 09/14] base sources --- apps/pdfeditor/main/app.js | 2 + .../main/app/controller/RedactTab.js | 206 ++++++++++++++++++ apps/pdfeditor/main/app/controller/Toolbar.js | 132 ++--------- apps/pdfeditor/main/app/view/RedactTab.js | 181 +++++++++++++++ apps/pdfeditor/main/app_dev.js | 2 + apps/pdfeditor/main/locale/en.json | 3 + 6 files changed, 413 insertions(+), 113 deletions(-) create mode 100644 apps/pdfeditor/main/app/controller/RedactTab.js create mode 100644 apps/pdfeditor/main/app/view/RedactTab.js diff --git a/apps/pdfeditor/main/app.js b/apps/pdfeditor/main/app.js index d8ea7018a3..d46cd58401 100644 --- a/apps/pdfeditor/main/app.js +++ b/apps/pdfeditor/main/app.js @@ -143,6 +143,7 @@ require([ 'Main', 'ViewTab', 'InsTab', + 'RedactTab', 'Search', 'Print', 'FormsTab', @@ -178,6 +179,7 @@ require([ 'pdfeditor/main/app/controller/Main', 'pdfeditor/main/app/controller/ViewTab', 'pdfeditor/main/app/controller/InsTab', + 'pdfeditor/main/app/controller/RedactTab', 'pdfeditor/main/app/controller/Search', 'pdfeditor/main/app/controller/Print', 'pdfeditor/main/app/controller/FormsTab', diff --git a/apps/pdfeditor/main/app/controller/RedactTab.js b/apps/pdfeditor/main/app/controller/RedactTab.js new file mode 100644 index 0000000000..51fb4a692d --- /dev/null +++ b/apps/pdfeditor/main/app/controller/RedactTab.js @@ -0,0 +1,206 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2023 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +/** + * RedactTab.js + * + * Created on 09.01.2025 + * + */ + +define([ + 'core', + 'pdfeditor/main/app/view/RedactTab', + 'pdfeditor/main/app/collection/ShapeGroups', + 'pdfeditor/main/app/collection/EquationGroups' +], function () { + 'use strict'; + + PDFE.Controllers.RedactTab = Backbone.Controller.extend(_.extend({ + models : [], + collections : [ + 'ShapeGroups', + 'EquationGroups' + ], + views : [ + 'RedactTab' + ], + sdkViewName : '#id_main', + + initialize: function () { + }, + + onLaunch: function () { + this._state = {}; + + Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); + Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this)); + + this.binding = { + + }; + }, + + setApi: function (api) { + if (api) { + this.api = api; + this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this)); + Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); + this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this)); + } + return this; + }, + + setConfig: function(config) { + this.mode = config.mode; + this.toolbar = config.toolbar; + this.view = this.createView('RedactTab', { + toolbar: this.toolbar.toolbar, + mode: this.mode, + compactToolbar: this.toolbar.toolbar.isCompactView + }); + this.addListeners({ + 'RedactTab': { + 'redact:start' : this.onStartRedact.bind(this), + 'redact:apply' : this.onApplyRedact.bind(this), + 'redact:page' : this.onRedactCurrentPage.bind(this), + // 'smartart:mouseenter': this.mouseenterSmartArt, + // 'smartart:mouseleave': this.mouseleaveSmartArt, + } + }); + }, + + onApplyRedact: function() { + this.api.ApplyRedact(); + }, + + onStartRedact: function(isMarkMode) { + this.api.SetRedactTool(isMarkMode) + }, + + onRedactCurrentPage: function() { + this.api.RedactPages([0]); + }, + + SetDisabled: function(state) { + this.view && this.view.SetDisabled(state); + }, + + createToolbarPanel: function() { + return this.view.getPanel(); + }, + + getView: function(name) { + return !name && this.view ? + this.view : Backbone.Controller.prototype.getView.call(this, name); + }, + + onCoAuthoringDisconnect: function() { + Common.Utils.lockControls(Common.enumLock.lostConnect, true, {array: this.view.lockedControls}); + }, + + onAppReady: function (config) { + var me = this; + if (me.view && config.isPDFEdit) { + (new Promise(function (accept, reject) { + accept(); + })).then(function(){ + me.view.onAppReady(config); + me.view.setEvents(); + }); + } + }, + + onDocumentReady: function() { + if (this.mode && this.mode.isPDFEdit) { + var shapes = this.api.asc_getPropertyEditorShapes(); + + // this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); + // this.getApplication().getController('Common.Controllers.ExternalOleEditor').setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); + + Common.Utils.lockControls(Common.enumLock.disableOnStart, false, {array: this.view.lockedControls}); + } + }, + + initNames: function() { + }, + + onApiFocusObject: function(selectedObjects) { + var pr, i = -1, type, + paragraph_locked = false, + no_paragraph = true, + in_chart = false, + page_deleted = false; + + while (++i < selectedObjects.length) { + type = selectedObjects[i].get_ObjectType(); + pr = selectedObjects[i].get_ObjectValue(); + + if (type === Asc.c_oAscTypeSelectElement.Paragraph) { + paragraph_locked = pr.get_Locked(); + no_paragraph = false; + } else if (type == Asc.c_oAscTypeSelectElement.Image || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) { + if (type == Asc.c_oAscTypeSelectElement.Table || + type == Asc.c_oAscTypeSelectElement.Shape && !pr.get_FromImage() && !pr.get_FromChart()) { + no_paragraph = false; + } + if (type == Asc.c_oAscTypeSelectElement.Chart) { + in_chart = true; + } + } else if (type == Asc.c_oAscTypeSelectElement.PdfPage) { + page_deleted = pr.asc_getDeleteLock(); + } + } + + // if (in_chart !== this._state.in_chart) { + // this.view.btnInsertChart.updateHint(in_chart ? this.view.tipChangeChart : this.view.tipInsertChart); + // this._state.in_chart = in_chart; + // } + + if (this._state.prcontrolsdisable !== paragraph_locked) { + if (this._state.activated) this._state.prcontrolsdisable = paragraph_locked; + Common.Utils.lockControls(Common.enumLock.paragraphLock, paragraph_locked===true, {array: this.view.lockedControls}); + } + + if (this._state.no_paragraph !== no_paragraph) { + if (this._state.activated) this._state.no_paragraph = no_paragraph; + Common.Utils.lockControls(Common.enumLock.noParagraphSelected, no_paragraph, {array: this.view.lockedControls}); + } + + if (page_deleted !== undefined && this._state.pagecontrolsdisable !== page_deleted) { + if (this._state.activated) this._state.pagecontrolsdisable = page_deleted; + Common.Utils.lockControls(Common.enumLock.pageDeleted, page_deleted, {array: this.view.lockedControls}); + } + }, + + }, PDFE.Controllers.RedactTab || {})); +}); \ No newline at end of file diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 7206e3db51..381ade43a2 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -83,17 +83,14 @@ define([ initEditing: true }; this.editMode = true; - this.binding = { - checkInsertShapeComment: _.bind(this.checkInsertShapeComment, this) - }; + this.binding = {}; this.addListeners({ 'Toolbar': { 'change:compact' : this.onClickChangeCompact, 'home:open' : this.onHomeOpen, 'tab:active' : this.onActiveTab, - 'tab:collapse' : this.onTabCollapse, - 'shapeannot:size' : this.onShapeCommentSizeClick + 'tab:collapse' : this.onTabCollapse }, 'FileMenu': { 'menu:hide': this.onFileMenu.bind(this, 'hide'), @@ -273,9 +270,6 @@ define([ toolbar.chShowComments.on('change', _.bind(this.onShowCommentsChange, this)); toolbar.btnTextComment.on('click', _.bind(this.onBtnTextCommentClick, this)); toolbar.btnTextComment.menu.on('item:click', _.bind(this.onMenuTextCommentClick, this)); - toolbar.btnShapeComment.on('click', _.bind(this.onBtnShapeCommentClick, this)); - toolbar.btnShapeComment.menu.on('item:click', _.bind(this.onMenuShapeCommentClick, this)); - toolbar.btnShapeComment.on('color:select', _.bind(this.onSelectShapeCommentColor, this)); toolbar.btnStamp.on('click', _.bind(this.onBtnStampClick, this)); toolbar.btnStamp.menu.on('item:click', _.bind(this.onMenuStampClick, this)); toolbar.btnStamp.menu.on('show:after', _.bind(this.onStampShowAfter, this)); @@ -430,7 +424,6 @@ define([ this.api.asc_registerCallback('asc_onStampsReady', _.bind(this.onApiStampsReady, this)); this.getApplication().getController('Common.Controllers.Fonts').setApi(this.api); this.api.asc_registerCallback('asc_onCanPastePage', _.bind(this.onApiCanPastePage, this)); - this.api.asc_registerCallback('asc_onStartAddShapeChanged', _.bind(this.onStartAddShapeChanged, this)); //for shape comments if (this.mode.canPDFEdit) { this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onApiMathTypes, this)); @@ -609,7 +602,6 @@ define([ while (++i < selectedObjects.length) { type = selectedObjects[i].get_ObjectType(); pr = selectedObjects[i].get_ObjectValue(); - if (!pr) continue; if (type === Asc.c_oAscTypeSelectElement.Paragraph) { paragraph_locked = pr.get_Locked(); @@ -646,9 +638,8 @@ define([ } else if (type === Asc.c_oAscTypeSelectElement.Math) { in_equation = true; } else if (type === Asc.c_oAscTypeSelectElement.Annot) { - var annotPr = pr.asc_getAnnotProps(); in_annot = true; - if (annotPr && annotPr.asc_getCanEditText && annotPr.asc_getCanEditText()) + if (pr.asc_getCanEditText()) no_text = false; } else if (type == Asc.c_oAscTypeSelectElement.PdfPage) { page_deleted = pr.asc_getDeleteLock(); @@ -1244,101 +1235,6 @@ define([ Common.component.Analytics.trackEvent('ToolBar', 'Add Text'); }, - onBtnShapeCommentClick: function(btn, e) { - btn.menu.getItems(true).filter(function(item) { - return item.value == btn.options.shapeType - })[0].setChecked(true); - if(!btn.pressed) { - btn.menu.clearAll(true); - } - this.onInsertShapeComment(btn, e); - }, - - onMenuShapeCommentClick: function(menu, item, e) { - var newType = item.value; - if (newType===null || newType===undefined) return; - - this.toolbar.btnShapeComment.toggle(true); - var oldType = this.toolbar.btnShapeComment.options.shapeType; - if(newType !== oldType){ - this.toolbar.btnShapeComment.changeIcon({ - next: item.options.iconClsForMainBtn, - curr: this.toolbar.btnShapeComment.menu.getItems(true).filter(function(mnu){return mnu.value == oldType})[0].options.iconClsForMainBtn - }); - this.toolbar.btnShapeComment.updateHint(item.options.tipForMainBtn); - // this.toolbar.btnShapeComment.setCaption(item.options.captionForMainBtn); - this.toolbar.btnShapeComment.options.shapeType = newType; - } - this.onInsertShapeComment(this.toolbar.btnShapeComment, item); - }, - - onShapeCommentSizeClick: function (direction) { - var btn = this.toolbar.btnShapeComment; - if (!btn.pressed) { - btn.toggle(true, true); - } - - var size = btn.options.currentSize; - size.idx = (direction==='up') ? Math.min(size.idx+1, size.arr.length-1) : Math.max(size.idx-1, 0); - btn.sizePicker.setValue(size.arr[size.idx] + ' ' + this.toolbar.txtMM); - - this.onInsertShapeComment(btn); - }, - - onSelectShapeCommentColor: function(btn, color) { - if (!btn.pressed) { - btn.toggle(true, true); - } - - btn.currentColor = color; - this.onInsertShapeComment(btn); - }, - - onInsertShapeComment: function(btn, item) { - if (btn.pressed) { - var stroke = new Asc.asc_CStroke(); - stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR); - stroke.put_color(Common.Utils.ThemeColor.getRgbColor(btn.currentColor)); - stroke.asc_putPrstDash(Asc.c_oDashType.solid); - stroke.put_width(btn.options.currentSize.arr[btn.options.currentSize.idx]); - stroke.put_transparent(100 * 2.55); - this.api.StartAddAnnot(btn.options.shapeType, stroke, true); - $(document.body).on('mouseup', this.binding.checkInsertShapeComment); - } else { - this.api.StartAddAnnot('', undefined, false); - $(document.body).off('mouseup', this.binding.checkInsertShapeComment); - } - - Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnShapeComment); - Common.component.Analytics.trackEvent('ToolBar', 'Add Shape Annotation'); - }, - - onStartAddShapeChanged: function() { - if ( this.toolbar.btnShapeComment.pressed ) { - this.toolbar.btnShapeComment.toggle(false, true); - this.toolbar.btnShapeComment.menu.clearAll(true); - } - - $(document.body).off('mouseup', this.binding.checkInsertShapeComment); - }, - - checkInsertShapeComment: function(e) { - var cmp = $(e.target), - cmp_sdk = cmp.closest('#editor_sdk'), - btn_id = cmp.closest('button').attr('id'); - if (btn_id===undefined) - btn_id = cmp.closest('.btn-group').attr('id'); - - if (cmp.attr('id') != 'editor_sdk' && cmp_sdk.length<=0) { - if ( this.toolbar.btnShapeComment.pressed && this.toolbar.btnShapeComment.id !== btn_id ) { - this.api.StartAddAnnot('', undefined, false); - $(document.body).off('mouseup', this.binding.checkInsertShapeComment); - this.toolbar.btnShapeComment.toggle(false, true); - Common.NotificationCenter.trigger('edit:complete', this.toolbar); - } - } - }, - onBtnStampClick: function(btn, e) { this.onInsertStamp(btn.options.stampType, btn, e); }, @@ -1613,13 +1509,23 @@ define([ me.api.UpdateInterfaceState(); }, 50); - var tab = {caption: toolbar.textTabInsert, action: 'ins', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-insert', dataHintTitle: 'I'}; - var instab = this.getApplication().getController('InsTab'); - instab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); - toolbar.addTab(tab, instab.createToolbarPanel(), 1); - instab.onAppReady(this.mode); + // var tab = {caption: toolbar.textTabInsert, action: 'ins', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-insert', dataHintTitle: 'I'}; + // var instab = this.getApplication().getController('InsTab'); + // instab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); + // toolbar.addTab(tab, instab.createToolbarPanel(), 1); + // instab.onAppReady(this.mode); + // setTimeout(function(){ + // instab.onDocumentReady(); + // }, 50); + + var tab = {caption: 'Redact', action: 'red', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-redact', dataHintTitle: 'X'}; + var redacttab = this.getApplication().getController('RedactTab'); + console.log(redacttab) + redacttab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); + toolbar.addTab(tab, redacttab.createToolbarPanel(), 1); + redacttab.onAppReady(this.mode); setTimeout(function(){ - instab.onDocumentReady(); + redacttab.onDocumentReady(); }, 50); if (this.mode.canFeatureForms) { diff --git a/apps/pdfeditor/main/app/view/RedactTab.js b/apps/pdfeditor/main/app/view/RedactTab.js new file mode 100644 index 0000000000..6f7f0285b6 --- /dev/null +++ b/apps/pdfeditor/main/app/view/RedactTab.js @@ -0,0 +1,181 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2023 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * RedactTab.js + * + * Created on 09.01.2025 + * + */ + +define([ + 'common/main/lib/util/utils', + 'common/main/lib/component/BaseView', + 'common/main/lib/component/Layout', + 'common/main/lib/component/DimensionPicker' +], function () { + 'use strict'; + + PDFE.Views.RedactTab = Common.UI.BaseView.extend(_.extend((function(){ + var template = + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
'; + + return { + options: {}, + + setEvents: function () { + var me = this; + me.btnMarkForRedact.on('click', function (btn) { + me.fireEvent('redact:start', [btn.pressed ? true : false]); + }); + me.btnApplyRedactions.on('click', function (menu, item, e) { + me.fireEvent('redact:apply', [item.value]); + }); + }, + + initialize: function (options) { + Common.UI.BaseView.prototype.initialize.call(this); + this.toolbar = options.toolbar; + this.appConfig = options.mode; + + this.lockedControls = []; + + var me = this; + var _set = Common.enumLock; + + this.btnMarkForRedact = new Common.UI.Button({ + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-edit-text', + style: 'min-width: 45px;', + lock: [_set.lostConnect, _set.disableOnStart], + caption: me.capMarkRedact, + enableToggle: true, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'small' + }); + me.lockedControls.push(this.btnMarkForRedact); + + this.btnRedactPages = new Common.UI.Button({ + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-day', + lock: [_set.lostConnect, _set.disableOnStart], + caption: me.capRedactPages, + menu: true, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'small', + action: 'interface-theme' + }); + me.lockedControls.push(this.btnRedactPages); + + this.btnApplyRedactions = new Common.UI.Button({ + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-edit-text', + style: 'min-width: 45px;', + lock: [_set.lostConnect, _set.disableOnStart], + caption: me.capApplyRedactions, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'small' + }); + me.lockedControls.push(this.btnApplyRedactions); + + Common.UI.LayoutManager.addControls(me.lockedControls); + Common.Utils.lockControls(_set.disableOnStart, true, {array: this.lockedControls}); + }, + + render: function (el) { + if ( el ) el.html( this.getPanel() ); + + return this; + }, + + getPanel: function () { + this.$el = $(_.template(template)( {} )); + var $host = this.$el; + var _injectComponent = function (id, cmp) { + Common.Utils.injectComponent($host.find(id), cmp); + }; + _injectComponent('#slot-btn-markredact', this.btnMarkForRedact); + _injectComponent('#slot-btn-redactpages', this.btnRedactPages); + _injectComponent('#slot-btn-apply-redactions', this.btnApplyRedactions); + + return this.$el; + }, + + onAppReady: function (config) { + var me = this; + + me.btnRedactPages.setMenu( + new Common.UI.Menu({ + items: [ + {caption: 'Mark current page', value: 'current'}, + {caption: 'Select range', value: 'range'}, + ] + }).on('item:click', function (menu, item, e) { + if (item.value === 'current') { + me.fireEvent('redact:page', [item.value]); + } + }) + ); + }, + + show: function () { + Common.UI.BaseView.prototype.show.call(this); + this.fireEvent('show', this); + }, + + getButtons: function(type) { + if (type===undefined) + return this.lockedControls; + return []; + }, + + SetDisabled: function (state) { + this.lockedControls && this.lockedControls.forEach(function(button) { + if ( button ) { + button.setDisabled(state); + } + }, this); + }, + } + }()), PDFE.Views.RedactTab || {})); +}); \ No newline at end of file diff --git a/apps/pdfeditor/main/app_dev.js b/apps/pdfeditor/main/app_dev.js index 42b754e7cf..0cc33fda6d 100644 --- a/apps/pdfeditor/main/app_dev.js +++ b/apps/pdfeditor/main/app_dev.js @@ -133,6 +133,7 @@ require([ 'Main', 'ViewTab', 'InsTab', + 'RedactTab', 'Search', 'Print', 'FormsTab', @@ -168,6 +169,7 @@ require([ 'pdfeditor/main/app/controller/Main', 'pdfeditor/main/app/controller/ViewTab', 'pdfeditor/main/app/controller/InsTab', + 'pdfeditor/main/app/controller/RedactTab', 'pdfeditor/main/app/controller/Search', 'pdfeditor/main/app/controller/Print', 'pdfeditor/main/app/controller/FormsTab', diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 4482f79034..2cbe7cf48d 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -1692,6 +1692,9 @@ "PDFE.Views.InsTab.tipPageNum": "Insert page number", "PDFE.Views.InsTab.txtNewPageAfter": "Insert blank page after", "PDFE.Views.InsTab.txtNewPageBefore": "Insert blank page before", + "PDFE.Views.RedactTab.capMarkRedact": "Mark for Redaction", + "PDFE.Views.RedactTab.capRedactPages": "Redact Pages", + "PDFE.Views.RedactTab.capApplyRedactions": "Apply Redactions", "PDFE.Views.LeftMenu.ariaLeftMenu": "Left menu", "PDFE.Views.LeftMenu.tipAbout": "About", "PDFE.Views.LeftMenu.tipChat": "Chat", From 65554ddf4d1a8b79138e32aaa04896a73620bf7f Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Mon, 8 Sep 2025 00:15:43 +0300 Subject: [PATCH 10/14] added controller methods --- apps/common/main/lib/component/InputField.js | 1 + apps/common/main/lib/component/Window.js | 2 +- apps/common/main/lib/view/TextInputDialog.js | 1 + .../main/app/controller/RedactTab.js | 159 ++++++++++++------ apps/pdfeditor/main/app/controller/Toolbar.js | 20 +-- apps/pdfeditor/main/app/view/RedactTab.js | 4 +- apps/pdfeditor/main/locale/en.json | 11 ++ 7 files changed, 135 insertions(+), 63 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index f8155b6d6d..41f09c5933 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -394,6 +394,7 @@ define([ title : errors.join('\n'), placement : 'cursor' }); + errorBadge.tooltip('show'); if (modalParents.length > 0) { errorBadge.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10); diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index eaff31f1f7..0c403fd040 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -646,7 +646,7 @@ define([ var arrBtns = {ok: this.okButtonText, cancel: this.cancelButtonText, yes: this.yesButtonText, no: this.noButtonText, - close: this.closeButtonText}; + close: this.closeButtonText, apply: this.applyButtonText, doNotApply: this.doNotApplyButtonText}; if (options.buttons && _.isArray(options.buttons)) { if (options.primary==undefined) diff --git a/apps/common/main/lib/view/TextInputDialog.js b/apps/common/main/lib/view/TextInputDialog.js index 2698e41809..c818c0cd9d 100644 --- a/apps/common/main/lib/view/TextInputDialog.js +++ b/apps/common/main/lib/view/TextInputDialog.js @@ -138,6 +138,7 @@ define([], function () { 'use strict'; if (state == 'ok') { if (this.inputLabel.checkValidate() !== true) { this.inputLabel.cmpEl.find('input').focus(); + this.inputLabel.showError(this.inputLabel.checkValidate()) return; } } diff --git a/apps/pdfeditor/main/app/controller/RedactTab.js b/apps/pdfeditor/main/app/controller/RedactTab.js index 51fb4a692d..7778d2fd77 100644 --- a/apps/pdfeditor/main/app/controller/RedactTab.js +++ b/apps/pdfeditor/main/app/controller/RedactTab.js @@ -93,22 +93,119 @@ define([ 'redact:start' : this.onStartRedact.bind(this), 'redact:apply' : this.onApplyRedact.bind(this), 'redact:page' : this.onRedactCurrentPage.bind(this), - // 'smartart:mouseenter': this.mouseenterSmartArt, - // 'smartart:mouseleave': this.mouseleaveSmartArt, + 'redact:pages' : this.onRedactPages.bind(this), + }, + 'Toolbar': { + 'tab:active': this.onActiveTab } }); }, onApplyRedact: function() { - this.api.ApplyRedact(); + Common.UI.warning({ + width: 500, + msg: this.textApplyRedact, + buttons: ['yes', 'no'], + primary: 'yes', + callback: _.bind(function(btn) { + if (btn == 'yes') { + this.api.ApplyRedact(); + } + }, this) + }); }, onStartRedact: function(isMarkMode) { - this.api.SetRedactTool(isMarkMode) + this.api.SetRedactTool(isMarkMode); }, onRedactCurrentPage: function() { - this.api.RedactPages([0]); + this.api.RedactPages([this.api.getCurrentPage()]); + }, + + onRedactPages: function() { + const self = this; + const countPages = this.api.getCountPages(); + + (new Common.Views.TextInputDialog({ + title: this.textRedactPages, + label: this.textEnterPageRange, + value: `1-${countPages}`, + description: this.textEnterRangeDescription, + inputFixedConfig: {fixedWidth: 40}, + inputConfig: { + maxLength: 20, + allowBlank: false, + validation: function(value) { + const singlePage = /^\d+$/; + const range = /^(\d+)-(\d+)$/; + + if (singlePage.test(value)) { + const page = parseInt(value, 10); + if (page < 1 || page > countPages) return `Page must be between 1 and ${countPages}`; + return true; + } + + const match = value.match(range); + if (match) { + const start = parseInt(match[1], 10); + const end = parseInt(match[2], 10); + if (start < 1 || end < 1 || start > countPages || end > countPages) { + return `Pages must be between 1 and ${countPages}`; + } + if (start > end) return 'Start page must be less than or equal to end page'; + return true; + } + + return 'Invalid format. Use single number or range with dash, e.g., 2 or 2-6'; + } + }, + handler: function(result, value) { + if (result === 'ok') { + let pages = []; + + if (value.includes('-')) { + const [start, end] = value.split('-').map(p => parseInt(p, 10)); + for (let i = start; i <= end; i++) { + pages.push(i - 1); + } + } else { + pages.push(parseInt(value, 10)); + } + + self.api.RedactPages(pages); + } + } + })).show(); + }, + + onActiveTab: function(tab) { + Common.UI.TooltipManager.showTip('mark-for-redaction'); + const isMarked = this.api.HasRedact(); + if (isMarked) { + Common.UI.warning({ + width: 500, + msg: this.textUnappliedRedactions, + buttons: ['apply', 'doNotApply', 'cancel'], + primary: 'apply', + callback: _.bind(function(btn) { + if (btn == 'apply') { + this.api.ApplyRedact(); + this.api.SetRedactTool(false); + this.view.btnMarkForRedact.toggle(false); + } else if (btn == 'doNotApply') { + this.api.RemoveAllRedact(); + this.api.SetRedactTool(false); + this.view.btnMarkForRedact.toggle(false); + } else if (btn == 'cancel') { + // Common.NotificationCenter.trigger('tab:set-active', 'red'); + this.toolbar.toolbar.setTab('red') + }}, this) + }); + } else { + this.view.btnMarkForRedact.toggle(false); + this.api.SetRedactTool(false); + } }, SetDisabled: function(state) { @@ -138,6 +235,12 @@ define([ me.view.setEvents(); }); } + Common.UI.TooltipManager.addTips({ + 'mark-for-redaction' : {name: 'help-tip-mark-for-redaction', placement: 'bottom-right', offset: {x: 10, y: 0}, text: this.tipMarkForRedaction, header: this.tipMarkForRedactionHeader, target: '#slot-btn-markredact', + automove: true, next: 'apply-redaction', maxwidth: 270, closable: false, isNewFeature: true}, + 'apply-redaction' : {name: 'help-tip-apply-redaction', placement: 'bottom-left', offset: {x: 10, y: 0}, text: this.tipApplyRedaction, header: this.tipApplyRedactionHeader, target: '#slot-btn-apply-redactions', + automove: true, maxwidth: 270, closable: false, isNewFeature: true}, + }); }, onDocumentReady: function() { @@ -146,7 +249,6 @@ define([ // this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); // this.getApplication().getController('Common.Controllers.ExternalOleEditor').setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); - Common.Utils.lockControls(Common.enumLock.disableOnStart, false, {array: this.view.lockedControls}); } }, @@ -155,51 +257,6 @@ define([ }, onApiFocusObject: function(selectedObjects) { - var pr, i = -1, type, - paragraph_locked = false, - no_paragraph = true, - in_chart = false, - page_deleted = false; - - while (++i < selectedObjects.length) { - type = selectedObjects[i].get_ObjectType(); - pr = selectedObjects[i].get_ObjectValue(); - - if (type === Asc.c_oAscTypeSelectElement.Paragraph) { - paragraph_locked = pr.get_Locked(); - no_paragraph = false; - } else if (type == Asc.c_oAscTypeSelectElement.Image || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) { - if (type == Asc.c_oAscTypeSelectElement.Table || - type == Asc.c_oAscTypeSelectElement.Shape && !pr.get_FromImage() && !pr.get_FromChart()) { - no_paragraph = false; - } - if (type == Asc.c_oAscTypeSelectElement.Chart) { - in_chart = true; - } - } else if (type == Asc.c_oAscTypeSelectElement.PdfPage) { - page_deleted = pr.asc_getDeleteLock(); - } - } - - // if (in_chart !== this._state.in_chart) { - // this.view.btnInsertChart.updateHint(in_chart ? this.view.tipChangeChart : this.view.tipInsertChart); - // this._state.in_chart = in_chart; - // } - - if (this._state.prcontrolsdisable !== paragraph_locked) { - if (this._state.activated) this._state.prcontrolsdisable = paragraph_locked; - Common.Utils.lockControls(Common.enumLock.paragraphLock, paragraph_locked===true, {array: this.view.lockedControls}); - } - - if (this._state.no_paragraph !== no_paragraph) { - if (this._state.activated) this._state.no_paragraph = no_paragraph; - Common.Utils.lockControls(Common.enumLock.noParagraphSelected, no_paragraph, {array: this.view.lockedControls}); - } - - if (page_deleted !== undefined && this._state.pagecontrolsdisable !== page_deleted) { - if (this._state.activated) this._state.pagecontrolsdisable = page_deleted; - Common.Utils.lockControls(Common.enumLock.pageDeleted, page_deleted, {array: this.view.lockedControls}); - } }, }, PDFE.Controllers.RedactTab || {})); diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 381ade43a2..77d606fe40 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -1509,20 +1509,19 @@ define([ me.api.UpdateInterfaceState(); }, 50); - // var tab = {caption: toolbar.textTabInsert, action: 'ins', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-insert', dataHintTitle: 'I'}; - // var instab = this.getApplication().getController('InsTab'); - // instab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); - // toolbar.addTab(tab, instab.createToolbarPanel(), 1); - // instab.onAppReady(this.mode); - // setTimeout(function(){ - // instab.onDocumentReady(); - // }, 50); + var tab = {caption: toolbar.textTabInsert, action: 'ins', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-insert', dataHintTitle: 'I'}; + var instab = this.getApplication().getController('InsTab'); + instab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); + toolbar.addTab(tab, instab.createToolbarPanel(), 1); + instab.onAppReady(this.mode); + setTimeout(function(){ + instab.onDocumentReady(); + }, 50); var tab = {caption: 'Redact', action: 'red', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-redact', dataHintTitle: 'X'}; var redacttab = this.getApplication().getController('RedactTab'); - console.log(redacttab) redacttab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); - toolbar.addTab(tab, redacttab.createToolbarPanel(), 1); + toolbar.addTab(tab, redacttab.createToolbarPanel(), 2); redacttab.onAppReady(this.mode); setTimeout(function(){ redacttab.onDocumentReady(); @@ -1543,6 +1542,7 @@ define([ if (this.mode.isPDFEdit || toolbar.isTabActive('ins') || toolbar.isTabActive('forms')) toolbar.setTab('home'); toolbar.setVisible('ins', this.mode.isPDFEdit); + toolbar.setVisible('red', this.mode.isPDFEdit); toolbar.setVisible('forms', this.mode.isPDFEdit && this.mode.canFeatureForms); $host.find('.annotate').toggleClass('hidden', this.mode.isPDFEdit); $host.find('.pdfedit').toggleClass('hidden', !this.mode.isPDFEdit); diff --git a/apps/pdfeditor/main/app/view/RedactTab.js b/apps/pdfeditor/main/app/view/RedactTab.js index 6f7f0285b6..6e2051c054 100644 --- a/apps/pdfeditor/main/app/view/RedactTab.js +++ b/apps/pdfeditor/main/app/view/RedactTab.js @@ -152,7 +152,9 @@ define([ ] }).on('item:click', function (menu, item, e) { if (item.value === 'current') { - me.fireEvent('redact:page', [item.value]); + me.fireEvent('redact:page'); + } else { + me.fireEvent('redact:pages') } }) ); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 2cbe7cf48d..3297f1cc23 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -94,6 +94,8 @@ "Common.UI.Themes.txtThemeModernLight": "Modern Light", "Common.UI.Themes.txtThemeSystem": "Same as system", "Common.UI.Window.cancelButtonText": "Cancel", + "Common.UI.Window.applyButtonText": "Apply", + "Common.UI.Window.doNotApplyButtonText": "Dont't apply", "Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.noButtonText": "No", "Common.UI.Window.okButtonText": "OK", @@ -865,6 +867,15 @@ "PDFE.Controllers.InsTab.txtSymbol_vdots": "Vertical ellipsis", "PDFE.Controllers.InsTab.txtSymbol_xsi": "Xi", "PDFE.Controllers.InsTab.txtSymbol_zeta": "Zeta", + "PDFE.Controllers.RedactTab.textApplyRedact": "Redacted information will be permanently removed from this document. Once you save it, information couldn't be retrieved anymore", + "PDFE.Controllers.RedactTab.textRedactPages": "Redact pages", + "PDFE.Controllers.RedactTab.textEnterPageRange": "Enter page range for redaction", + "PDFE.Controllers.RedactTab.textEnterRangeDescription": "e.g. 1, 2, 8-11", + "PDFE.Controllers.RedactTab.textUnappliedRedactions": "This document contains redaction marks that yet not have been applied.

Until you select “Apply Redactions” these marks can be removed and information can be retrieved", + "PDFE.Controllers.RedactTab.tipMarkForRedaction": "Use these tools to mark, search, and redact sensitive content in your PDF", + "PDFE.Controllers.RedactTab.tipApplyRedaction": "Apply and save all redactions. Unsaved redactions can still be undone.", + "PDFE.Controllers.RedactTab.tipApplyRedactionHeader": "Apply redactions", + "PDFE.Controllers.RedactTab.tipMarkForRedactionHeader": "Mark for redactions", "PDFE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "PDFE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document", "PDFE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", From dcf7863ced5a92ed5ec719d7feab3d2914d98418 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Tue, 9 Sep 2025 13:23:12 +0300 Subject: [PATCH 11/14] refactored and added translates --- apps/common/main/lib/component/InputField.js | 1 - apps/common/main/lib/view/TextInputDialog.js | 1 - .../main/app/controller/RedactTab.js | 69 +++++++++---------- apps/pdfeditor/main/app/controller/Toolbar.js | 13 +++- apps/pdfeditor/main/app/view/RedactTab.js | 12 ++-- apps/pdfeditor/main/locale/en.json | 6 ++ 6 files changed, 57 insertions(+), 45 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 41f09c5933..f8155b6d6d 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -394,7 +394,6 @@ define([ title : errors.join('\n'), placement : 'cursor' }); - errorBadge.tooltip('show'); if (modalParents.length > 0) { errorBadge.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10); diff --git a/apps/common/main/lib/view/TextInputDialog.js b/apps/common/main/lib/view/TextInputDialog.js index c818c0cd9d..2698e41809 100644 --- a/apps/common/main/lib/view/TextInputDialog.js +++ b/apps/common/main/lib/view/TextInputDialog.js @@ -138,7 +138,6 @@ define([], function () { 'use strict'; if (state == 'ok') { if (this.inputLabel.checkValidate() !== true) { this.inputLabel.cmpEl.find('input').focus(); - this.inputLabel.showError(this.inputLabel.checkValidate()) return; } } diff --git a/apps/pdfeditor/main/app/controller/RedactTab.js b/apps/pdfeditor/main/app/controller/RedactTab.js index 7778d2fd77..a0a976ed21 100644 --- a/apps/pdfeditor/main/app/controller/RedactTab.js +++ b/apps/pdfeditor/main/app/controller/RedactTab.js @@ -40,16 +40,12 @@ define([ 'core', 'pdfeditor/main/app/view/RedactTab', - 'pdfeditor/main/app/collection/ShapeGroups', - 'pdfeditor/main/app/collection/EquationGroups' ], function () { 'use strict'; PDFE.Controllers.RedactTab = Backbone.Controller.extend(_.extend({ models : [], collections : [ - 'ShapeGroups', - 'EquationGroups' ], views : [ 'RedactTab' @@ -124,7 +120,7 @@ define([ }, onRedactPages: function() { - const self = this; + const me = this; const countPages = this.api.getCountPages(); (new Common.Views.TextInputDialog({ @@ -132,7 +128,6 @@ define([ label: this.textEnterPageRange, value: `1-${countPages}`, description: this.textEnterRangeDescription, - inputFixedConfig: {fixedWidth: 40}, inputConfig: { maxLength: 20, allowBlank: false, @@ -142,7 +137,7 @@ define([ if (singlePage.test(value)) { const page = parseInt(value, 10); - if (page < 1 || page > countPages) return `Page must be between 1 and ${countPages}`; + if (page < 1 || page > countPages) return Common.Utils.String.format(me.txtInvalidRange, countPages); return true; } @@ -151,13 +146,13 @@ define([ const start = parseInt(match[1], 10); const end = parseInt(match[2], 10); if (start < 1 || end < 1 || start > countPages || end > countPages) { - return `Pages must be between 1 and ${countPages}`; + return Common.Utils.String.format(me.txtInvalidRange, countPages); } - if (start > end) return 'Start page must be less than or equal to end page'; + if (start > end) return me.txtReversedRange; return true; } - return 'Invalid format. Use single number or range with dash, e.g., 2 or 2-6'; + return me.txtInvalidFormat; } }, handler: function(result, value) { @@ -173,38 +168,42 @@ define([ pages.push(parseInt(value, 10)); } - self.api.RedactPages(pages); + me.api.RedactPages(pages); } } })).show(); }, onActiveTab: function(tab) { - Common.UI.TooltipManager.showTip('mark-for-redaction'); - const isMarked = this.api.HasRedact(); - if (isMarked) { - Common.UI.warning({ - width: 500, - msg: this.textUnappliedRedactions, - buttons: ['apply', 'doNotApply', 'cancel'], - primary: 'apply', - callback: _.bind(function(btn) { - if (btn == 'apply') { - this.api.ApplyRedact(); - this.api.SetRedactTool(false); - this.view.btnMarkForRedact.toggle(false); - } else if (btn == 'doNotApply') { - this.api.RemoveAllRedact(); - this.api.SetRedactTool(false); - this.view.btnMarkForRedact.toggle(false); - } else if (btn == 'cancel') { - // Common.NotificationCenter.trigger('tab:set-active', 'red'); - this.toolbar.toolbar.setTab('red') - }}, this) - }); + if (tab == 'red') { + Common.UI.TooltipManager.showTip('mark-for-redaction'); } else { - this.view.btnMarkForRedact.toggle(false); - this.api.SetRedactTool(false); + // Common.UI.TooltipManager.closeTip('mark-for-redaction'); + // Common.UI.TooltipManager.closeTip('apply-redaction'); + const isMarked = this.api.HasRedact(); + if (isMarked) { + Common.UI.warning({ + width: 500, + msg: this.textUnappliedRedactions, + buttons: ['apply', 'doNotApply', 'cancel'], + primary: 'apply', + callback: _.bind(function(btn) { + if (btn == 'apply') { + this.api.ApplyRedact(); + this.api.SetRedactTool(false); + this.view.btnMarkForRedact.toggle(false); + } else if (btn == 'doNotApply') { + this.api.RemoveAllRedact(); + this.api.SetRedactTool(false); + this.view.btnMarkForRedact.toggle(false); + } else if (btn == 'cancel') { + this.toolbar.toolbar.setTab('red') + }}, this) + }); + } else { + this.view.btnMarkForRedact.toggle(false); + this.api.SetRedactTool(false); + } } }, diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 77d606fe40..e13e165a1b 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -1474,6 +1474,17 @@ define([ me.toolbar.setVisible('ins', true); } + tab = {caption: me.toolbar.textTabRedact, action: 'red', extcls: config.isEdit ? 'canedit' : '', layoutname: 'toolbar-redact', dataHintTitle: 'X'}; + var redacttab = me.getApplication().getController('RedactTab'); + redacttab.setApi(me.api).setConfig({toolbar: me, mode: config}); + redacttab.onAppReady(config); + $panel = redacttab.createToolbarPanel() + if ($panel) { + me.toolbar.addTab(tab, $panel, 2); + me.toolbar.setVisible('red', true); + redacttab.onDocumentReady(); + }; + if (config.canFeatureForms) { tab = {caption: me.textTabForms, action: 'forms', layoutname: 'toolbar-forms', dataHintTitle: 'M'}; var forms = me.getApplication().getController('FormsTab'); @@ -1518,7 +1529,7 @@ define([ instab.onDocumentReady(); }, 50); - var tab = {caption: 'Redact', action: 'red', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-redact', dataHintTitle: 'X'}; + var tab = {caption: toolbar.textTabRedact, action: 'red', extcls: this.mode.isEdit ? 'canedit' : '', layoutname: 'toolbar-redact', dataHintTitle: 'X'}; var redacttab = this.getApplication().getController('RedactTab'); redacttab.setApi(this.api).setConfig({toolbar: this, mode: this.mode}); toolbar.addTab(tab, redacttab.createToolbarPanel(), 2); diff --git a/apps/pdfeditor/main/app/view/RedactTab.js b/apps/pdfeditor/main/app/view/RedactTab.js index 6e2051c054..e2ddb9fa03 100644 --- a/apps/pdfeditor/main/app/view/RedactTab.js +++ b/apps/pdfeditor/main/app/view/RedactTab.js @@ -40,7 +40,6 @@ define([ 'common/main/lib/util/utils', 'common/main/lib/component/BaseView', 'common/main/lib/component/Layout', - 'common/main/lib/component/DimensionPicker' ], function () { 'use strict'; @@ -48,12 +47,12 @@ define([ var template = '
' + '
' + - '' + + '' + '' + '
' + - '
' + + '
' + '
' + - '' + + '' + '
' + '
'; @@ -102,7 +101,6 @@ define([ dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small', - action: 'interface-theme' }); me.lockedControls.push(this.btnRedactPages); @@ -147,8 +145,8 @@ define([ me.btnRedactPages.setMenu( new Common.UI.Menu({ items: [ - {caption: 'Mark current page', value: 'current'}, - {caption: 'Select range', value: 'range'}, + {caption: me.txtMarkCurrentPage, value: 'current'}, + {caption: me.txtSelectRange, value: 'range'}, ] }).on('item:click', function (menu, item, e) { if (item.value === 'current') { diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 3297f1cc23..a644058ef4 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -876,6 +876,9 @@ "PDFE.Controllers.RedactTab.tipApplyRedaction": "Apply and save all redactions. Unsaved redactions can still be undone.", "PDFE.Controllers.RedactTab.tipApplyRedactionHeader": "Apply redactions", "PDFE.Controllers.RedactTab.tipMarkForRedactionHeader": "Mark for redactions", + "PDFE.Controllers.RedactTab.txtInvalidRange": "Pages must be between 1 and {0}", + "PDFE.Controllers.RedactTab.txtReversedRange": "Start page must be less than or equal to end page", + "PDFE.Controllers.RedactTab.txtInvalidFormat": "Invalid format. Use single number or range with dash, e.g., 2 or 2-6", "PDFE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "PDFE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document", "PDFE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", @@ -1706,6 +1709,8 @@ "PDFE.Views.RedactTab.capMarkRedact": "Mark for Redaction", "PDFE.Views.RedactTab.capRedactPages": "Redact Pages", "PDFE.Views.RedactTab.capApplyRedactions": "Apply Redactions", + "PDFE.Views.RedactTab.txtMarkCurrentPage": "Mark current page", + "PDFE.Views.RedactTab.txtSelectRange": "Select range", "PDFE.Views.LeftMenu.ariaLeftMenu": "Left menu", "PDFE.Views.LeftMenu.tipAbout": "About", "PDFE.Views.LeftMenu.tipChat": "Chat", @@ -2175,6 +2180,7 @@ "PDFE.Views.Toolbar.textTabFile": "File", "PDFE.Views.Toolbar.textTabHome": "Home", "PDFE.Views.Toolbar.textTabInsert": "Insert", + "PDFE.Views.Toolbar.textTabRedact": "Redact", "PDFE.Views.Toolbar.textTabView": "View", "PDFE.Views.Toolbar.textUnderline": "Underline", "PDFE.Views.Toolbar.tipAddComment": "Add comment", From 0343a2409d87911a7fc5ec2e7b2a3c39c38d325e Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Tue, 9 Sep 2025 15:11:36 +0300 Subject: [PATCH 12/14] fixed tips --- apps/common/main/lib/component/Window.js | 2 +- .../main/app/controller/RedactTab.js | 25 +++++++++++-------- apps/pdfeditor/main/locale/en.json | 4 +-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 0c403fd040..eaff31f1f7 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -646,7 +646,7 @@ define([ var arrBtns = {ok: this.okButtonText, cancel: this.cancelButtonText, yes: this.yesButtonText, no: this.noButtonText, - close: this.closeButtonText, apply: this.applyButtonText, doNotApply: this.doNotApplyButtonText}; + close: this.closeButtonText}; if (options.buttons && _.isArray(options.buttons)) { if (options.primary==undefined) diff --git a/apps/pdfeditor/main/app/controller/RedactTab.js b/apps/pdfeditor/main/app/controller/RedactTab.js index a0a976ed21..190b51badd 100644 --- a/apps/pdfeditor/main/app/controller/RedactTab.js +++ b/apps/pdfeditor/main/app/controller/RedactTab.js @@ -98,6 +98,7 @@ define([ }, onApplyRedact: function() { + Common.UI.TooltipManager.closeTip('apply-redaction'); Common.UI.warning({ width: 500, msg: this.textApplyRedact, @@ -112,6 +113,7 @@ define([ }, onStartRedact: function(isMarkMode) { + Common.UI.TooltipManager.closeTip('mark-for-redaction'); this.api.SetRedactTool(isMarkMode); }, @@ -177,15 +179,22 @@ define([ onActiveTab: function(tab) { if (tab == 'red') { Common.UI.TooltipManager.showTip('mark-for-redaction'); + Common.UI.TooltipManager.showTip('apply-redaction'); } else { - // Common.UI.TooltipManager.closeTip('mark-for-redaction'); - // Common.UI.TooltipManager.closeTip('apply-redaction'); + Common.UI.TooltipManager.closeTip('mark-for-redaction'); + Common.UI.TooltipManager.closeTip('apply-redaction'); const isMarked = this.api.HasRedact(); if (isMarked) { Common.UI.warning({ width: 500, msg: this.textUnappliedRedactions, - buttons: ['apply', 'doNotApply', 'cancel'], + buttons: [{ + value: 'apply', + caption: this.applyButtonText + }, { + value: 'doNotApply', + caption: this.doNotApplyButtonText + }, 'cancel'], primary: 'apply', callback: _.bind(function(btn) { if (btn == 'apply') { @@ -235,19 +244,15 @@ define([ }); } Common.UI.TooltipManager.addTips({ - 'mark-for-redaction' : {name: 'help-tip-mark-for-redaction', placement: 'bottom-right', offset: {x: 10, y: 0}, text: this.tipMarkForRedaction, header: this.tipMarkForRedactionHeader, target: '#slot-btn-markredact', + 'mark-for-redaction' : {name: 'help-tip-mark-for-redaction21', placement: 'bottom-right', offset: {x: 10, y: 0}, text: this.tipMarkForRedaction, header: this.tipMarkForRedactionHeader, target: '#slot-btn-markredact', automove: true, next: 'apply-redaction', maxwidth: 270, closable: false, isNewFeature: true}, - 'apply-redaction' : {name: 'help-tip-apply-redaction', placement: 'bottom-left', offset: {x: 10, y: 0}, text: this.tipApplyRedaction, header: this.tipApplyRedactionHeader, target: '#slot-btn-apply-redactions', - automove: true, maxwidth: 270, closable: false, isNewFeature: true}, + 'apply-redaction' : {name: 'help-tip-apply-redaction21', placement: 'bottom-left', offset: {x: 10, y: 0}, text: this.tipApplyRedaction, header: this.tipApplyRedactionHeader, target: '#slot-btn-apply-redactions', + automove: true, prev: 'mark-for-redaction', maxwidth: 270, closable: false, isNewFeature: true}, }); }, onDocumentReady: function() { if (this.mode && this.mode.isPDFEdit) { - var shapes = this.api.asc_getPropertyEditorShapes(); - - // this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); - // this.getApplication().getController('Common.Controllers.ExternalOleEditor').setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); Common.Utils.lockControls(Common.enumLock.disableOnStart, false, {array: this.view.lockedControls}); } }, diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index a644058ef4..642e522bb8 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -94,8 +94,6 @@ "Common.UI.Themes.txtThemeModernLight": "Modern Light", "Common.UI.Themes.txtThemeSystem": "Same as system", "Common.UI.Window.cancelButtonText": "Cancel", - "Common.UI.Window.applyButtonText": "Apply", - "Common.UI.Window.doNotApplyButtonText": "Dont't apply", "Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.noButtonText": "No", "Common.UI.Window.okButtonText": "OK", @@ -879,6 +877,8 @@ "PDFE.Controllers.RedactTab.txtInvalidRange": "Pages must be between 1 and {0}", "PDFE.Controllers.RedactTab.txtReversedRange": "Start page must be less than or equal to end page", "PDFE.Controllers.RedactTab.txtInvalidFormat": "Invalid format. Use single number or range with dash, e.g., 2 or 2-6", + "PDFE.Controllers.RedactTab.applyButtonText": "Apply", + "PDFE.Controllers.RedactTab.doNotApplyButtonText": "Dont't apply", "PDFE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "PDFE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document", "PDFE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", From 9de0ca1122c317ca78e1a1772b6ee569351035f5 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Tue, 9 Sep 2025 15:26:04 +0300 Subject: [PATCH 13/14] restored accidentally removed code --- apps/pdfeditor/main/app/controller/Toolbar.js | 103 +++++++++++++++++- 1 file changed, 100 insertions(+), 3 deletions(-) diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index e13e165a1b..43864d8576 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -83,14 +83,17 @@ define([ initEditing: true }; this.editMode = true; - this.binding = {}; + this.binding = { + checkInsertShapeComment: _.bind(this.checkInsertShapeComment, this) + }; this.addListeners({ 'Toolbar': { 'change:compact' : this.onClickChangeCompact, 'home:open' : this.onHomeOpen, 'tab:active' : this.onActiveTab, - 'tab:collapse' : this.onTabCollapse + 'tab:collapse' : this.onTabCollapse, + 'shapeannot:size' : this.onShapeCommentSizeClick }, 'FileMenu': { 'menu:hide': this.onFileMenu.bind(this, 'hide'), @@ -270,6 +273,9 @@ define([ toolbar.chShowComments.on('change', _.bind(this.onShowCommentsChange, this)); toolbar.btnTextComment.on('click', _.bind(this.onBtnTextCommentClick, this)); toolbar.btnTextComment.menu.on('item:click', _.bind(this.onMenuTextCommentClick, this)); + toolbar.btnShapeComment.on('click', _.bind(this.onBtnShapeCommentClick, this)); + toolbar.btnShapeComment.menu.on('item:click', _.bind(this.onMenuShapeCommentClick, this)); + toolbar.btnShapeComment.on('color:select', _.bind(this.onSelectShapeCommentColor, this)); toolbar.btnStamp.on('click', _.bind(this.onBtnStampClick, this)); toolbar.btnStamp.menu.on('item:click', _.bind(this.onMenuStampClick, this)); toolbar.btnStamp.menu.on('show:after', _.bind(this.onStampShowAfter, this)); @@ -424,6 +430,7 @@ define([ this.api.asc_registerCallback('asc_onStampsReady', _.bind(this.onApiStampsReady, this)); this.getApplication().getController('Common.Controllers.Fonts').setApi(this.api); this.api.asc_registerCallback('asc_onCanPastePage', _.bind(this.onApiCanPastePage, this)); + this.api.asc_registerCallback('asc_onStartAddShapeChanged', _.bind(this.onStartAddShapeChanged, this)); //for shape comments if (this.mode.canPDFEdit) { this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onApiMathTypes, this)); @@ -602,6 +609,7 @@ define([ while (++i < selectedObjects.length) { type = selectedObjects[i].get_ObjectType(); pr = selectedObjects[i].get_ObjectValue(); + if (!pr) continue; if (type === Asc.c_oAscTypeSelectElement.Paragraph) { paragraph_locked = pr.get_Locked(); @@ -638,8 +646,9 @@ define([ } else if (type === Asc.c_oAscTypeSelectElement.Math) { in_equation = true; } else if (type === Asc.c_oAscTypeSelectElement.Annot) { + var annotPr = pr.asc_getAnnotProps(); in_annot = true; - if (pr.asc_getCanEditText()) + if (annotPr && annotPr.asc_getCanEditText && annotPr.asc_getCanEditText()) no_text = false; } else if (type == Asc.c_oAscTypeSelectElement.PdfPage) { page_deleted = pr.asc_getDeleteLock(); @@ -1235,6 +1244,94 @@ define([ Common.component.Analytics.trackEvent('ToolBar', 'Add Text'); }, + onBtnShapeCommentClick: function(btn, e) { + btn.menu.getItems(true).filter(function(item) { + return item.value == btn.options.shapeType + })[0].setChecked(true); + if(!btn.pressed) { + btn.menu.clearAll(true); + } + this.onInsertShapeComment(btn, e); + }, + + onMenuShapeCommentClick: function(menu, item, e) { + var newType = item.value; + if (newType===null || newType===undefined) return; + this.toolbar.btnShapeComment.toggle(true); + var oldType = this.toolbar.btnShapeComment.options.shapeType; + if(newType !== oldType){ + this.toolbar.btnShapeComment.changeIcon({ + next: item.options.iconClsForMainBtn, + curr: this.toolbar.btnShapeComment.menu.getItems(true).filter(function(mnu){return mnu.value == oldType})[0].options.iconClsForMainBtn + }); + this.toolbar.btnShapeComment.updateHint(item.options.tipForMainBtn); + // this.toolbar.btnShapeComment.setCaption(item.options.captionForMainBtn); + this.toolbar.btnShapeComment.options.shapeType = newType; + } + this.onInsertShapeComment(this.toolbar.btnShapeComment, item); + }, + + onShapeCommentSizeClick: function (direction) { + var btn = this.toolbar.btnShapeComment; + if (!btn.pressed) { + btn.toggle(true, true); + } + var size = btn.options.currentSize; + size.idx = (direction==='up') ? Math.min(size.idx+1, size.arr.length-1) : Math.max(size.idx-1, 0); + btn.sizePicker.setValue(size.arr[size.idx] + ' ' + this.toolbar.txtMM); + this.onInsertShapeComment(btn); + }, + + onSelectShapeCommentColor: function(btn, color) { + if (!btn.pressed) { + btn.toggle(true, true); + } + btn.currentColor = color; + this.onInsertShapeComment(btn); + }, + + onInsertShapeComment: function(btn, item) { + if (btn.pressed) { + var stroke = new Asc.asc_CStroke(); + stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR); + stroke.put_color(Common.Utils.ThemeColor.getRgbColor(btn.currentColor)); + stroke.asc_putPrstDash(Asc.c_oDashType.solid); + stroke.put_width(btn.options.currentSize.arr[btn.options.currentSize.idx]); + stroke.put_transparent(100 * 2.55); + this.api.StartAddAnnot(btn.options.shapeType, stroke, true); + $(document.body).on('mouseup', this.binding.checkInsertShapeComment); + } else { + this.api.StartAddAnnot('', undefined, false); + $(document.body).off('mouseup', this.binding.checkInsertShapeComment); + } + Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnShapeComment); + Common.component.Analytics.trackEvent('ToolBar', 'Add Shape Annotation'); + }, + + onStartAddShapeChanged: function() { + if ( this.toolbar.btnShapeComment.pressed ) { + this.toolbar.btnShapeComment.toggle(false, true); + this.toolbar.btnShapeComment.menu.clearAll(true); + } + $(document.body).off('mouseup', this.binding.checkInsertShapeComment); + }, + + checkInsertShapeComment: function(e) { + var cmp = $(e.target), + cmp_sdk = cmp.closest('#editor_sdk'), + btn_id = cmp.closest('button').attr('id'); + if (btn_id===undefined) + btn_id = cmp.closest('.btn-group').attr('id'); + if (cmp.attr('id') != 'editor_sdk' && cmp_sdk.length<=0) { + if ( this.toolbar.btnShapeComment.pressed && this.toolbar.btnShapeComment.id !== btn_id ) { + this.api.StartAddAnnot('', undefined, false); + $(document.body).off('mouseup', this.binding.checkInsertShapeComment); + this.toolbar.btnShapeComment.toggle(false, true); + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + } + } + }, + onBtnStampClick: function(btn, e) { this.onInsertStamp(btn.options.stampType, btn, e); }, From 3f6b8abfad894413de744f7500595ec418cccf66 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Tue, 9 Sep 2025 16:10:19 +0300 Subject: [PATCH 14/14] changed tips names --- apps/pdfeditor/main/app/controller/RedactTab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/pdfeditor/main/app/controller/RedactTab.js b/apps/pdfeditor/main/app/controller/RedactTab.js index 190b51badd..6405315835 100644 --- a/apps/pdfeditor/main/app/controller/RedactTab.js +++ b/apps/pdfeditor/main/app/controller/RedactTab.js @@ -244,9 +244,9 @@ define([ }); } Common.UI.TooltipManager.addTips({ - 'mark-for-redaction' : {name: 'help-tip-mark-for-redaction21', placement: 'bottom-right', offset: {x: 10, y: 0}, text: this.tipMarkForRedaction, header: this.tipMarkForRedactionHeader, target: '#slot-btn-markredact', + 'mark-for-redaction' : {name: 'help-tip-mark-for-redaction', placement: 'bottom-right', offset: {x: 10, y: 0}, text: this.tipMarkForRedaction, header: this.tipMarkForRedactionHeader, target: '#slot-btn-markredact', automove: true, next: 'apply-redaction', maxwidth: 270, closable: false, isNewFeature: true}, - 'apply-redaction' : {name: 'help-tip-apply-redaction21', placement: 'bottom-left', offset: {x: 10, y: 0}, text: this.tipApplyRedaction, header: this.tipApplyRedactionHeader, target: '#slot-btn-apply-redactions', + 'apply-redaction' : {name: 'help-tip-apply-redaction', placement: 'bottom-left', offset: {x: 10, y: 0}, text: this.tipApplyRedaction, header: this.tipApplyRedactionHeader, target: '#slot-btn-apply-redactions', automove: true, prev: 'mark-for-redaction', maxwidth: 270, closable: false, isNewFeature: true}, }); },