Skip to content

Commit

Permalink
[PE] Show merge-shape tips
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Jan 23, 2025
1 parent 953c2c5 commit 0ef4d06
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
25 changes: 21 additions & 4 deletions apps/presentationeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,17 @@ define([
},

setMode: function(mode) {
var _main = this.getApplication().getController('Main');
var _main = this.getApplication().getController('Main'),
me = this;
this.mode = mode;
this.toolbar.applyLayout(mode);
Common.UI.TooltipManager.addTips({
'tabDesign' : {name: 'pe-help-tip-tab-design', placement: 'bottom-right', text: this.helpTabDesign, header: this.helpTabDesignHeader, target: 'li.ribtab #design', automove: true, closable: false},
'tabDesign' : {name: 'pe-help-tip-tab-design', placement: 'bottom-right', text: this.helpTabDesign, header: this.helpTabDesignHeader, target: 'li.ribtab #design', automove: true, closable: false,
callback: function() {
if (!me.toolbar.btnShapesMerge.isDisabled() && me.toolbar.isTabActive('home'))
Common.UI.TooltipManager.showTip('mergeShapes');
}},
'mergeShapes' : {name: 'help-tip-merge-shapes', placement: 'bottom-left', text: this.helpMergeShapes, header: this.helpMergeShapesHeader, target: '#slot-btn-shapes-merge', closable: false, prev: 'tabDesign'},
'refreshFile' : {text: _main.textUpdateVersion, header: _main.textUpdating, target: '#toolbar', maxwidth: 'none', showButton: false, automove: true, noHighlight: true, multiple: true},
'disconnect' : {text: _main.textConnectionLost, header: _main.textDisconnect, target: '#toolbar', maxwidth: 'none', showButton: false, automove: true, noHighlight: true, multiple: true},
'updateVersion' : {text: _main.errorUpdateVersionOnDisconnect, header: _main.titleUpdateVersion, target: '#toolbar', maxwidth: 600, showButton: false, automove: true, noHighlight: true, multiple: true},
Expand Down Expand Up @@ -994,6 +1000,9 @@ define([
this.toolbar.lockToolbar(Common.enumLock.inSlideMaster, in_slide_master, {array: [me.toolbar.btnInsertPlaceholder, me.toolbar.chTitle, me.toolbar.chFooters]});
this._state.in_slide_master = in_slide_master;
}

if (!this.toolbar.btnShapesMerge.isDisabled() && this.toolbar.isTabActive('home'))
Common.UI.TooltipManager.showTip('mergeShapes');
},

onApiStyleChange: function(v) {
Expand Down Expand Up @@ -1762,7 +1771,8 @@ define([
}
},

onBeforeShapesMerge: function() {
onBeforeShapesMerge: function() {
Common.UI.TooltipManager.closeTip('mergeShapes', true);
this.toolbar.btnShapesMerge.menu.getItems(true).forEach(function (item) {
item.setDisabled(!this.api.asc_canMergeSelectedShapes(item.value));
}, this);
Expand Down Expand Up @@ -3108,12 +3118,19 @@ define([
},

onActiveTab: function(tab) {
(tab !== 'home') && Common.UI.TooltipManager.closeTip('tabDesign');
if (tab !== 'home') {
Common.UI.TooltipManager.closeTip('tabDesign');
Common.UI.TooltipManager.closeTip('mergeShapes');
} else if (this.toolbar && this.toolbar.btnShapesMerge && !this.toolbar.btnShapesMerge.isDisabled())
setTimeout(function() {
Common.UI.TooltipManager.showTip('mergeShapes');
}, 10);
this._state.activeTab = tab;
this.showStaticElements();
},

onTabCollapse: function(tab) {
Common.UI.TooltipManager.closeTip('mergeShapes');
},

showStaticElements: function() {
Expand Down
2 changes: 2 additions & 0 deletions apps/presentationeditor/main/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,8 @@
"del_PE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields",
"PE.Controllers.Toolbar.helpTabDesign": "The \"Themes\", \"Colors\", and \"Slide Size\" functions are now under the new \"Design\" tab for easier navigation.",
"PE.Controllers.Toolbar.helpTabDesignHeader": "New \"Design\" Tab",
"PE.Controllers.Toolbar.helpMergeShapes": "Combine, subtract, and exclude shapes with new editing options.",
"PE.Controllers.Toolbar.helpMergeShapesHeader": "New Shape Operations Available",
"PE.Controllers.Toolbar.textAccent": "Accents",
"PE.Controllers.Toolbar.textBracket": "Brackets",
"PE.Controllers.Toolbar.textFontSizeErr": "The entered value is incorrect.<br>Please enter a numeric value between 1 and 300",
Expand Down

0 comments on commit 0ef4d06

Please sign in to comment.