Skip to content

Commit

Permalink
Show tips for new features
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Jan 23, 2025
1 parent fe6548f commit 2e7235c
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 54 deletions.
1 change: 0 additions & 1 deletion apps/common/main/lib/controller/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ define([
onShowBeforeButtonMenu: function() {
if(this.api && this.panelHistory.chHighlightDeleted) {
this.panelHistory.chHighlightDeleted.setChecked(this.api.asc_isShowedDeletedTextInVersionHistory(), true);
Common.UI.TooltipManager.closeTip('textDeleted');
}
},

Expand Down
2 changes: 0 additions & 2 deletions apps/documenteditor/main/app/controller/FormsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ define([
var me = this;
if (!this._state.formCount) { // add first form
this.closeHelpTip('create');
Common.UI.TooltipManager.showTip('signatureField');
} else if (this._state.formCount===1) {
setTimeout(function() {
// me.showHelpTip('roles');
Expand Down Expand Up @@ -632,7 +631,6 @@ define([
this.closeHelpTip('create');
this.closeHelpTip('roles');
this.closeHelpTip('save');
Common.UI.TooltipManager.closeTip('signatureField');
},

onChangeProtectDocument: function(props) {
Expand Down
16 changes: 0 additions & 16 deletions apps/documenteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,7 @@ define([
var _main = this.getApplication().getController('Main');
this.mode = mode;
this.toolbar.applyLayout(mode);
// this.mode.isPDFForm ? Common.UI.TooltipManager.addTips({
// 'signatureField' : {name: 'de-help-tip-signature-field', placement: 'bottom-right', text: this.helpSignField, header: this.helpSignFieldHeader, target: '#slot-btn-form-signature', automove: true, maxwidth: 320}
// }) : Common.UI.TooltipManager.addTips({
// 'textFromFile' : {name: 'de-help-tip-text-from-file', placement: 'bottom-left', text: this.helpTextFromFile, header: this.helpTextFromFileHeader, target: '#slot-btn-text-from-file', automove: true, maxwidth: 270},
// 'textDeleted' : {name: 'de-help-tip-text-deleted', placement: 'right-bottom', text: this.helpTextDeleted, header: this.helpTextDeletedHeader, target: '#history-btn-menu', automove: true, maxwidth: 320},
// 'customInfo' : {name: 'help-tip-custom-info', placement: 'right', text: this.helpCustomInfo, header: this.helpCustomInfoHeader, target: '#fm-btn-info', automove: true, extCls: 'inc-index'}
// });
Common.UI.TooltipManager.addTips({
// 'grayTheme' : {name: 'help-tip-gray-theme', placement: 'bottom-right', text: this.helpGrayTheme, header: this.helpGrayThemeHeader, target: '#slot-btn-interface-theme', automove: true, maxwidth: 320},
'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 @@ -431,7 +423,6 @@ define([
toolbar.btnPageColor.on('color:select', _.bind(this.onSelectPageColor, this));
toolbar.mnuPageNoFill.on('click', _.bind(this.onPageNoFillClick, this));
toolbar.btnTextFromFile.menu.on('item:click', _.bind(this.onTextFromFileClick, this));
toolbar.btnTextFromFile.menu.on('show:after', _.bind(this.onTextFromFileShowAfter, this));
Common.NotificationCenter.on('leftmenu:save', _.bind(this.tryToSave, this));
this.onSetupCopyStyleButton();
this.onBtnChangeState('undo:disabled', toolbar.btnUndo, toolbar.btnUndo.isDisabled());
Expand Down Expand Up @@ -1645,13 +1636,6 @@ define([
}
},

onTextFromFileShowAfter: function(menu, e) {
if (!(e && e.target === e.currentTarget))
return;

Common.UI.TooltipManager.closeTip('textFromFile');
},

onMarkerSettingsClick: function(type) {
var me = this;
var listId = me.api.asc_GetCurrentNumberingId(),
Expand Down
3 changes: 0 additions & 3 deletions apps/documenteditor/main/app/controller/ViewTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ define([
Common.NotificationCenter.on('uitheme:countchanged', _fill_themes.bind(me));
_fill_themes.call(me);

me.view.btnInterfaceTheme.menu && me.view.btnInterfaceTheme.menu.on('show:after', function() {
Common.UI.TooltipManager.closeTip('grayTheme');
});
if (me.view.btnInterfaceTheme.menu.getItemsLength(true)) {
// me.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems}));
me.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
Expand Down
3 changes: 0 additions & 3 deletions apps/documenteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ define([
events: function() {
return {
'click .fm-btn': _.bind(function(event){
this.mode && this.mode.isEdit && Common.UI.TooltipManager.closeTip('customInfo');
var $item = $(event.currentTarget);
if (!$item.hasClass('active')) {
$('.fm-btn',this.el).removeClass('active');
Expand Down Expand Up @@ -381,12 +380,10 @@ define([
this.selectMenu(panel, opts, defPanel);
this.api && this.api.asc_enableKeyEvents(false);

this.mode.isEdit && Common.UI.TooltipManager.showTip('customInfo');
this.fireEvent('menu:show', [this]);
},

hide: function() {
this.mode && this.mode.isEdit && Common.UI.TooltipManager.closeTip('customInfo');
this.$el.hide();
// if (this.mode.isEdit) DE.getController('Toolbar').DisableToolbar(false);
this.fireEvent('menu:hide', [this]);
Expand Down
1 change: 0 additions & 1 deletion apps/documenteditor/main/app/view/FormsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ define([
me.fireEvent('forms:insert', ['picture']);
});
this.btnSignField && this.btnSignField.on('click', function (b, e) {
Common.UI.TooltipManager.closeTip('signatureField');
me.fireEvent('forms:insert', ['signature']);
});
this.btnComplexField && this.btnComplexField.on('click', function (b, e) {
Expand Down
1 change: 0 additions & 1 deletion apps/documenteditor/main/app/view/LeftMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ define([
this._state.pluginIsRunning = false;
this.panelHistory.show();
this.panelHistory.$el.width((parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN);
Common.UI.TooltipManager.showTip('textDeleted');
Common.NotificationCenter.trigger('layout:changed', 'history');
},

Expand Down
6 changes: 3 additions & 3 deletions apps/pdfeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ define([
this.mode = mode;
this.toolbar.applyLayout(mode);
Common.UI.TooltipManager.addTips({
'addStamp' : {name: 'help-tip-add-stamp', placement: 'bottom-left', text: this.helpAddStamp, header: this.helpAddStampHeader, target: '#slot-btn-stamp', maxwidth: 250, closable: false},
'selectPages' : {name: 'help-tip-select-pages', placement: 'right-bottom', offset: {x: -30, y: 60}, text: this.helpSelectPages, header: this.helpSelectPagesHeader, target: '#thumbnails-btn-close', maxwidth: 250, closable: false},
'fastUndo' : {name: 'pdfe-help-tip-fast-undo', placement: 'bottom-right', text: this.helpFastUndo, header: this.helpFastUndoHeader, target: mode.compactHeader ? '#slot-btn-undo' : '#slot-btn-dt-undo', maxwidth: 250, extCls: 'inc-index', closable: false},
'addStamp' : {name: 'help-tip-add-stamp', placement: 'bottom-left', text: this.helpAddStamp, header: this.helpAddStampHeader, target: '#slot-btn-stamp', closable: false},
'selectPages' : {name: 'help-tip-select-pages', placement: 'right-bottom', offset: {x: -30, y: 60}, text: this.helpSelectPages, header: this.helpSelectPagesHeader, target: '#thumbnails-btn-close', closable: false},
'fastUndo' : {name: 'pdfe-help-tip-fast-undo', placement: 'bottom-right', text: this.helpFastUndo, header: this.helpFastUndoHeader, target: mode.compactHeader ? '#slot-btn-undo' : '#slot-btn-dt-undo', extCls: 'inc-index', closable: false},
'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
2 changes: 2 additions & 0 deletions apps/spreadsheeteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3149,6 +3149,7 @@ define([
length++;
});
this._state.usersCount = length;
this._state.fastCoauth && this._state.usersCount>1 && this.api.asc_getCanUndo() && Common.UI.TooltipManager.showTip('fastUndo');
},

onUserConnection: function(change){
Expand Down Expand Up @@ -3177,6 +3178,7 @@ define([
this._state.fastCoauth = (value===null || parseInt(value) == 1);
if (this._state.fastCoauth && !oldval)
this.synchronizeChanges();
this._state.fastCoauth && this._state.usersCount>1 && this.api.asc_getCanUndo() && Common.UI.TooltipManager.showTip('fastUndo');
}
if (this.appOptions.canForcesave) {
this.appOptions.forcesave = Common.localStorage.getBool("sse-settings-forcesave", this.appOptions.canForcesave);
Expand Down
14 changes: 14 additions & 0 deletions apps/spreadsheeteditor/main/app/controller/PivotTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ define([
},
'TableSettings': {
'pivottable:create': _.bind(this.onCreateClick, this)
},
'Toolbar': {
'tab:active': _.bind(this.onActiveTab, this)
}
});
},
Expand Down Expand Up @@ -197,6 +200,8 @@ define([
},

onCalculatedClick: function(btn, opts){
Common.UI.TooltipManager.closeTip('calcItems');

var me = this;
var pivotInfo = this.api.asc_getCellInfo().asc_getPivotTableInfo();
var pivotFieldIndex = pivotInfo.asc_getFieldIndexByActiveCell();
Expand Down Expand Up @@ -534,6 +539,8 @@ define([
Common.Utils.lockControls(Common.enumLock.editPivot, !!pivotInfo, {array: this.view.btnsAddPivot});
Common.Utils.lockControls(Common.enumLock.pivotExpandLock, !(pivotInfo && pivotInfo.asc_canExpandCollapseByActiveCell(this.api)), {array: [this.view.btnExpandField, this.view.btnCollapseField]});
Common.Utils.lockControls(Common.enumLock.pivotCalcItemsLock, !(pivotInfo && pivotInfo.asc_canChangeCalculatedItemByActiveCell()), {array: [this.view.btnCalculatedItems]});
if (!this.view.btnCalculatedItems.isDisabled() && this.view.toolbar && this.view.toolbar.isTabActive('pivot'))
Common.UI.TooltipManager.showTip('calcItems');

if (pivotInfo)
this.ChangeSettings(pivotInfo);
Expand Down Expand Up @@ -571,6 +578,13 @@ define([
}
},

onActiveTab: function(tab) {
if (tab !== 'pivot')
Common.UI.TooltipManager.closeTip('calcItems');
else if (this.view && this.view.btnCalculatedItems && !this.view.btnCalculatedItems.isDisabled())
Common.UI.TooltipManager.showTip('calcItems');
},

strSheet : 'Sheet',
txtPivotItemNameNotFound: 'An item name cannot be found. Check that you\'ve typed name correctly and the item is present in the PivotTable report.',
txtCalculatedItemInPageField: 'The item cannot be added or modified. PivotTable report has this field in Filters.',
Expand Down
22 changes: 10 additions & 12 deletions apps/spreadsheeteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,8 @@ define([
this.mode = mode;
this.toolbar.applyLayout(mode);
Common.UI.TooltipManager.addTips({
// 'insPivot' : {name: 'sse-help-tip-ins-pivot', placement: 'bottom-right', text: this.helpInsPivot, header: this.helpInsPivotHeader, target: 'li.ribtab #ins', automove: true},
// 'grayTheme' : {name: 'help-tip-gray-theme', placement: 'bottom-right', text: this.helpGrayTheme, header: this.helpGrayThemeHeader, target: '#slot-btn-interface-theme', automove: true, maxwidth: 320},
// 'customInfo' : {name: 'help-tip-custom-info', placement: 'right', text: this.helpCustomInfo, header: this.helpCustomInfoHeader, target: '#fm-btn-info', automove: true, extCls: 'inc-index'},
'fastUndo' : {name: 'sse-help-tip-fast-undo', placement: 'bottom-right', text: this.helpFastUndo, header: this.helpFastUndoHeader, target: mode.compactHeader ? '#slot-btn-undo' : '#slot-btn-dt-undo', extCls: 'inc-index', closable: false},
'calcItems' : {name: 'help-tip-calc-items', placement: 'bottom-left', text: this.helpCalcItems, header: this.helpCalcItemsHeader, target: '#slot-btn-calculated-items', automove: true, closable: false},
'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 @@ -615,6 +614,8 @@ define([
},

onUndo: function(btn, e) {
Common.UI.TooltipManager.closeTip('fastUndo');

if (this.api)
this.api.asc_Undo();

Expand Down Expand Up @@ -2567,6 +2568,10 @@ define([
if (this._state.can_undo !== can) {
this.toolbar.btnUndo.setDisabled(!can);
this._state.can_undo = can;
if (can) {
var _main = this.getApplication().getController('Main');
_main._state.fastCoauth && _main._state.usersCount>1 && Common.UI.TooltipManager.showTip('fastUndo');
}
}
} else {
if (this._state.can_redo !== can) {
Expand Down Expand Up @@ -4673,12 +4678,6 @@ define([
Common.UI.LayoutManager.addControls(this.btnsComment);
}
}

Common.Utils.asyncCall(function () {
if ( config.isEdit ) {
Common.UI.TooltipManager.showTip('insPivot');
}
});
},

onFileMenu: function (opts) {
Expand Down Expand Up @@ -5249,16 +5248,15 @@ define([
},

onActiveTab: function(tab) {
(tab !== 'home') && Common.UI.TooltipManager.closeTip('insPivot');
(tab === 'view') ? Common.UI.TooltipManager.showTip('grayTheme') : Common.UI.TooltipManager.closeTip('grayTheme');
(tab === 'file') && Common.UI.TooltipManager.closeTip('fastUndo');
},

onClickTab: function(tab) {
this._state.showPivotTab = tab === 'pivot';
},

onTabCollapse: function(tab) {
Common.UI.TooltipManager.closeTip('grayTheme');
Common.UI.TooltipManager.closeTip('calcItems');
}
}, SSE.Controllers.Toolbar || {}));
});
3 changes: 0 additions & 3 deletions apps/spreadsheeteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ define([
events: function() {
return {
'click .fm-btn': _.bind(function(event){
this.mode && this.mode.isEdit && Common.UI.TooltipManager.closeTip('customInfo');
var $item = $(event.currentTarget);
if (!$item.hasClass('active')) {
$('.fm-btn',this.el).removeClass('active');
Expand Down Expand Up @@ -362,12 +361,10 @@ define([

this.api.asc_enableKeyEvents(false);

this.mode.isEdit && Common.UI.TooltipManager.showTip('customInfo');
this.fireEvent('menu:show', [this]);
},

hide: function() {
this.mode && this.mode.isEdit && Common.UI.TooltipManager.closeTip('customInfo');
this.$el.hide();
// this.api && this.api.asc_enableKeyEvents(true);
this.fireEvent('menu:hide', [this]);
Expand Down
3 changes: 0 additions & 3 deletions apps/spreadsheeteditor/main/app/view/ViewTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@ define([
Common.NotificationCenter.on('uitheme:countchanged', _fill_themes.bind(me));
_fill_themes.call(me);

me.btnInterfaceTheme.menu && me.btnInterfaceTheme.menu.on('show:after', function() {
Common.UI.TooltipManager.closeTip('grayTheme');
});
if (me.btnInterfaceTheme.menu.getItemsLength(true)) {
me.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
var value = item.value;
Expand Down
16 changes: 10 additions & 6 deletions apps/spreadsheeteditor/main/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1529,12 +1529,16 @@
"SSE.Controllers.Toolbar.errorMaxPoints": "The maximum number of points in series per chart is 4096.",
"SSE.Controllers.Toolbar.errorMaxRows": "ERROR! The maximum number of data series per chart is 255",
"SSE.Controllers.Toolbar.errorStockChart": "Incorrect row order. To build a stock chart place the data on the sheet in the following order:<br> opening price, max price, min price, closing price.",
"SSE.Controllers.Toolbar.helpCustomInfo": "Create and edit the document properties yourself in the Info section.",
"SSE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields",
"SSE.Controllers.Toolbar.helpGrayTheme": "Try Gray theme and access more customization options via File tab – Advanced Settings – Appearance.",
"SSE.Controllers.Toolbar.helpGrayThemeHeader": "Revamped interface",
"SSE.Controllers.Toolbar.helpInsPivot": "To start working with Pivot Tables, access the Insert tab.",
"SSE.Controllers.Toolbar.helpInsPivotHeader": "Updated Pivot Tables",
"del_SSE.Controllers.Toolbar.helpCustomInfo": "Create and edit the document properties yourself in the Info section.",
"del_SSE.Controllers.Toolbar.helpCustomInfoHeader": "Custom file fields",
"del_SSE.Controllers.Toolbar.helpGrayTheme": "Try Gray theme and access more customization options via File tab – Advanced Settings – Appearance.",
"del_SSE.Controllers.Toolbar.helpGrayThemeHeader": "Revamped interface",
"del_SSE.Controllers.Toolbar.helpInsPivot": "To start working with Pivot Tables, access the Insert tab.",
"del_SSE.Controllers.Toolbar.helpInsPivotHeader": "Updated Pivot Tables",
"SSE.Controllers.Toolbar.helpFastUndo": "Easily undo changes while editing documents with co-authors in real time.",
"SSE.Controllers.Toolbar.helpFastUndoHeader": "\"Undo\" Now Available in Fast Co-Editing mode",
"SSE.Controllers.Toolbar.helpCalcItems": "You can now create calculated items directly in the spreadsheet editor.",
"SSE.Controllers.Toolbar.helpCalcItemsHeader": "New Calculated Items feature",
"SSE.Controllers.Toolbar.textAccent": "Accents",
"SSE.Controllers.Toolbar.textBracket": "Brackets",
"SSE.Controllers.Toolbar.textDirectional": "Directional",
Expand Down

0 comments on commit 2e7235c

Please sign in to comment.