diff --git a/apps/common/main/lib/component/SynchronizeTip.js b/apps/common/main/lib/component/SynchronizeTip.js index 3f177b2fb1..a3ffac8c5a 100644 --- a/apps/common/main/lib/component/SynchronizeTip.js +++ b/apps/common/main/lib/component/SynchronizeTip.js @@ -45,7 +45,8 @@ define([ placement: 'right-bottom', showLink: true, showButton: false, - closable: true + closable: true, + textHeader: '' }, template: _.template([ @@ -53,7 +54,11 @@ define([ '
', '
', '
', - '
<%= scope.text %>
', + '
', + '<% if ( scope.textHeader !== "" ) { %>', + '
', + '<% } %>', + '<%= scope.text %>
', '<% if ( scope.closable ) { %>', '
', '<% } %>', @@ -79,9 +84,12 @@ define([ this.showLink = this.options.showLink; this.showButton = this.options.showButton; this.closable = this.options.closable; - this.textButton = this.options.textButton || ''; + this.textButton = this.options.textButton || this.textGotIt; + this.textHeader = this.options.textHeader || ''; this.position = this.options.position; // show in the position relative to target this.style = this.options.style || ''; + this.automove = this.options.automove; + this.binding = {}; }, render: function() { @@ -93,6 +101,7 @@ define([ this.cmpEl.find('.btn-div').on('click', _.bind(function() { this.trigger('buttonclick');}, this)); this.closable && this.cmpEl.addClass('closable'); + this.binding.windowresize = _.bind(this.applyPlacement, this); } this.applyPlacement(); @@ -106,16 +115,19 @@ define([ this.cmpEl.show() } else this.render(); + this.automove && $(window).on('resize', this.binding.windowresize); }, hide: function() { if (this.cmpEl) this.cmpEl.hide(); this.trigger('hide'); + this.automove && $(window).off('resize', this.binding.windowresize); }, close: function() { if (this.cmpEl) this.cmpEl.remove(); this.trigger('close'); + this.automove && $(window).off('resize', this.binding.windowresize); }, applyPlacement: function () { @@ -191,8 +203,112 @@ define([ }, textDontShow : 'Don\'t show this message again', - textSynchronize : 'The document has been changed by another user.
Please click to save your changes and reload the updates.' + textSynchronize : 'The document has been changed by another user.
Please click to save your changes and reload the updates.', + textGotIt: 'Got it' } })(), Common.UI.SynchronizeTip || {})); + + Common.UI.TooltipManager = new(function() { + var _helpTips = { + // 'step': { + // name: 'localstorage-id', // (or undefined when don't save option to localstorage) save 1 to localstorage to not show message again + // placement: 'bottom', + // text: '', + // header: '', + // target: '#id', // string or $el + // link: {text: 'link text', src: 'UsageInstructions\/....htm'}, // (or false) Open help page + // showButton: true, // true by default + // closable: true, // true by default + // callback: function() {} // call when close tip, + // next: '' // show next tooltip on close + // prev: '' // don't show tooltip if the prev was not shown + // } + }; + + var _addTips = function(arr) { + for (var step in arr) { + if (arr.hasOwnProperty(step) && !Common.localStorage.getItem(arr[step].name)) { + _helpTips[step] = arr[step]; + } + } + }; + + var _getNeedShow = function(step) { + return _helpTips[step] && !(_helpTips[step].name && Common.localStorage.getItem(_helpTips[step].name)); + }; + + var _closeTip = function(step, force, preventNext) { + var props = _helpTips[step]; + if (props) { + preventNext && (props.next = undefined); + props.tip && props.tip.close(); + props.tip = undefined; + force && props.name && Common.localStorage.setItem(props.name, 1); + } + }; + + var _showTip = function(step) { + if (!_helpTips[step]) return; + if (_getNeedShow(step) && !(_helpTips[step].prev && _getNeedShow(_helpTips[step].prev))) { // show current tip if previous tip has already been shown + var props = _helpTips[step], + target = props.target; + + if (props.tip && props.tip.isVisible()) + return true; + + if (typeof target === 'string') + target = $(target); + if (!(target && target.length && target.is(':visible'))) + return false; + + var placement = props.placement; + if (Common.UI.isRTL()) { + placement = placement.indexOf('right')>-1 ? placement.replace('right', 'left') : placement.replace('left', 'right'); + } + + props.tip = new Common.UI.SynchronizeTip({ + extCls: 'colored', + style: 'min-width:200px;', + placement: placement, + target: target, + text: props.text, + textHeader: props.header, + showLink: !!props.link, + textLink: props.link ? props.link.text : '', + closable: props.closable !== false, // true by default + showButton: props.showButton !== false, // true by default + automove: !!props.automove + }); + props.tip.on({ + 'buttonclick': function() { + props.tip && props.tip.close(); + props.tip = undefined; + }, + 'closeclick': function() { + props.tip && props.tip.close(); + props.tip = undefined; + }, + 'dontshowclick': function() { + Common.NotificationCenter.trigger('file:help', props.link.src); + }, + 'close': function() { + props.name && Common.localStorage.setItem(props.name, 1); + props.callback && props.callback(); + props.next && _showTip(props.next); + delete _helpTips[step]; + } + }); + props.tip.show(); + } + return true; + }; + + return { + showTip: _showTip, + closeTip: _closeTip, + addTips: _addTips, + getNeedShow: _getNeedShow + } + })(); }); diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 48f130e9f7..a7e794ad50 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -54,7 +54,8 @@ define([ var $userList, $panelUsers, $btnUsers, $btnUserName, $labelDocName; var _readonlyRights = false; var isPDFEditor = !!window.PDFE, - isDocEditor = !!window.DE; + isDocEditor = !!window.DE, + isSSEEditor = !!window.SSE; var templateUserItem = '
  • " class="<% if (!user.get("online")) { %> offline <% } if (user.get("view")) {%> viewmode <% } %>">' + @@ -303,7 +304,10 @@ define([ this.btnDocMode.setCaption(isEdit ? this.textEdit : isReview ? this.textReview : isViewForm ? this.textViewForm : this.textView); this.btnDocMode.updateHint(isEdit ? this.tipDocEdit : isReview ? this.tipReview : isViewForm ? this.tipDocViewForm : this.tipDocView); this.btnDocMode.options.value = type; - show && !this.btnDocMode.isVisible() && this.btnDocMode.setVisible(true); + if (show && !this.btnDocMode.isVisible()) { + this.btnDocMode.setVisible(true); + Common.UI.TooltipManager.showTip('docMode'); + } if (this.btnDocMode.menu && typeof this.btnDocMode.menu === 'object') { var item = _.find(this.btnDocMode.menu.items, function(item) { return item.value == type; }); (item) ? item.setChecked(true) : this.btnDocMode.menu.clearAll(); @@ -521,6 +525,7 @@ define([ items: arr })); me.btnQuickAccess.menu.on('show:before', function (menu) { + Common.UI.TooltipManager.closeTip('quickAccess'); menu.items.forEach(function (item) { if (item.value === 'save') { item.setChecked(Common.localStorage.getBool(me.appPrefix + 'quick-access-save', true), true); @@ -557,6 +562,7 @@ define([ onChangeQuickAccess.call(me, 'header', props); }); Common.NotificationCenter.on('quickaccess:changed', onChangeQuickAccess.bind(me, 'settings')); + isSSEEditor && Common.UI.TooltipManager.showTip('quickAccess'); } if ( !appConfig.twoLevelHeader ) { @@ -671,11 +677,15 @@ define([ menuAlign: 'tr-br', items: arr })); + me.btnDocMode.on('click', function (menu, item) { + Common.UI.TooltipManager.closeTip('docMode'); + }); me.btnDocMode.menu.on('item:click', function (menu, item) { Common.NotificationCenter.trigger('doc:mode-apply', item.value, true); }); var item = _.find(me.btnDocMode.menu.items, function(item) { return item.value == type; }); item && item.setChecked(true); + me.btnDocMode.isVisible() && Common.UI.TooltipManager.showTip('docMode'); } if (appConfig.twoLevelHeader && !appConfig.compactHeader) Common.NotificationCenter.on('window:resize', onResize); @@ -962,6 +972,10 @@ define([ me.btnDocMode.render($html.find('#slot-btn-edit-mode')); changeDocMode.call(me); Common.NotificationCenter.on('doc:mode-changed', _.bind(changeDocMode, me)); + + !config.isPDFForm && Common.UI.LayoutManager.isElementVisible('header-editMode') && Common.UI.TooltipManager.addTips({ + 'docMode' : {name: 'de-help-tip-doc-mode', placement: 'bottom-left', text: me.helpDocMode, header: me.helpDocModeHeader, target: '#slot-btn-edit-mode'} + }); } else $html.find('#slot-btn-edit-mode').hide(); @@ -1042,6 +1056,10 @@ define([ }); me.btnQuickAccess.render($html.find('#slot-btn-dt-quick-access')); + isSSEEditor && Common.UI.TooltipManager.addTips({ + 'quickAccess' : {name: 'common-help-tip-quick-access', placement: 'bottom-right', text: me.helpQuickAccess, header: me.helpQuickAccessHeader, target: '#slot-btn-dt-quick-access'} + }); + return $html; } }, @@ -1343,7 +1361,11 @@ define([ textPrint: 'Print', textViewForm: 'Viewing form', tipDocViewForm: 'Viewing form', - textDocViewFormDesc: 'See how the form will look like when filling out' + textDocViewFormDesc: 'See how the form will look like when filling out', + helpDocMode: 'Easily change the way you work on a document: edit, review and track changes, or view only. This works individually for each user. So, you won’t affect or disturb other co-authors. ', + helpDocModeHeader: 'Switch between modes', + helpQuickAccess: 'Hide or show the functional buttons of your choice.', + helpQuickAccessHeader: 'Customize Quick Access' } }(), Common.Views.Header || {})) }); diff --git a/apps/common/main/resources/less/synchronize-tip.less b/apps/common/main/resources/less/synchronize-tip.less index 5154cda520..820a99820a 100644 --- a/apps/common/main/resources/less/synchronize-tip.less +++ b/apps/common/main/resources/less/synchronize-tip.less @@ -2,6 +2,12 @@ position: fixed; z-index: @zindex-navbar + 2; + .tip-header { + .font-size-medium(); + .font-weight-bold(); + margin-bottom: 4px; + } + &:not(.simple) { max-width: 300px; } diff --git a/apps/documenteditor/forms/locale/en.json b/apps/documenteditor/forms/locale/en.json index 5e393feba6..eff4687eff 100644 --- a/apps/documenteditor/forms/locale/en.json +++ b/apps/documenteditor/forms/locale/en.json @@ -36,6 +36,8 @@ "Common.UI.SearchBar.tipCloseSearch": "Close find", "Common.UI.SearchBar.tipNextResult": "Next result", "Common.UI.SearchBar.tipPreviousResult": "Previous result", + "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", + "Common.UI.SynchronizeTip.textGotIt": "Got it", "Common.UI.Themes.txtThemeClassicLight": "Classic light", "Common.UI.Themes.txtThemeContrastDark": "Contrast dark", "Common.UI.Themes.txtThemeDark": "Dark", diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 896b8364bb..e9501a080f 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -123,6 +123,7 @@ define([ 'insert:smartart' : this.onInsertSmartArt, 'smartart:mouseenter': this.mouseenterSmartArt, 'smartart:mouseleave': this.mouseleaveSmartArt, + 'tab:active': this.onActiveTab }, 'FileMenu': { 'menu:hide': this.onFileMenu.bind(this, 'hide'), @@ -270,6 +271,9 @@ define([ setMode: function(mode) { this.mode = mode; this.toolbar.applyLayout(mode); + !this.mode.isPDFForm && Common.UI.TooltipManager.addTips({ + 'pageColor' : {name: 'de-help-tip-page-color', placement: 'bottom-left', text: this.helpPageColor, header: this.helpPageColorHeader, target: '#slot-btn-pagecolor', automove: true} + }); }, attachRestrictedEditFormsUIEvents: function(toolbar) { @@ -1480,6 +1484,8 @@ define([ if (!(e && e.target===e.currentTarget)) return; + Common.UI.TooltipManager.closeTip('pageColor'); + var picker = this.toolbar.mnuPageColorPicker, color = this.api.asc_getPageColor(); @@ -3883,6 +3889,11 @@ define([ this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomItems(this.toolbar, data)); }, + onActiveTab: function(tab) { + (tab === 'layout') ? Common.UI.TooltipManager.showTip('pageColor') : Common.UI.TooltipManager.closeTip('pageColor'); + (tab !== 'home') && Common.UI.TooltipManager.closeTip('docMode'); + }, + textEmptyImgUrl : 'You need to specify image URL.', textWarning : 'Warning', textFontSizeErr : 'The entered value is incorrect.
    Please enter a numeric value between 1 and 300', @@ -4246,6 +4257,8 @@ define([ txtDownload: 'Download', txtSaveCopy: 'Save copy', errorAccessDeny: 'You are trying to perform an action you do not have rights for.
    Please contact your Document Server administrator.', + helpPageColorHeader: 'Page Color', + helpPageColor: 'Apply any background color to the pages in your document.' }, DE.Controllers.Toolbar || {})); }); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 3d15f86a09..0380edbf04 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -364,6 +364,7 @@ "Common.UI.SearchDialog.txtBtnReplace": "Replace", "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace all", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", + "Common.UI.SynchronizeTip.textGotIt": "Got it", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.
    Please click to save your changes and reload the updates.", "Common.UI.ThemeColorPalette.textRecentColors": "Recent colors", "Common.UI.ThemeColorPalette.textStandartColors": "Standard colors", @@ -570,6 +571,10 @@ "Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtRename": "Rename", + "Common.Views.Header.helpDocMode": "Easily change the way you work on a document: edit, review and track changes, or view only. This works individually for each user. So, you won’t affect or disturb other co-authors. ", + "Common.Views.Header.helpDocModeHeader": "Switch between modes", + "Common.Views.Header.helpQuickAccess": "Hide or show the functional buttons of your choice.", + "Common.Views.Header.helpQuickAccessHeader": "Customize Quick Access", "Common.Views.History.textCloseHistory": "Close History", "Common.Views.History.textHide": "Collapse", "Common.Views.History.textHideAll": "Hide detailed changes", @@ -1634,6 +1639,8 @@ "DE.Controllers.Toolbar.txtSymbol_xsi": "Xi", "DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "DE.Controllers.Toolbar.txtUntitled": "Untitled", + "DE.Controllers.Toolbar.helpPageColorHeader": "Page Color", + "DE.Controllers.Toolbar.helpPageColor": "Apply any background color to the pages in your document.", "DE.Controllers.Viewport.textFitPage": "Fit to Page", "DE.Controllers.Viewport.textFitWidth": "Fit to Width", "DE.Controllers.Viewport.txtDarkMode": "Dark mode", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 2e825af0a2..d4029a9df1 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -361,6 +361,7 @@ "Common.UI.SearchDialog.txtBtnReplaceAll": "Заменить все", "Common.UI.SynchronizeTip.textDontShow": "Больше не показывать это сообщение", "Common.UI.SynchronizeTip.textSynchronize": "Документ изменен другим пользователем.
    Нажмите, чтобы сохранить свои изменения и загрузить обновления.", + "Common.UI.SynchronizeTip.textGotIt": "ОК", "Common.UI.ThemeColorPalette.textRecentColors": "Недавние цвета", "Common.UI.ThemeColorPalette.textStandartColors": "Стандартные цвета", "Common.UI.ThemeColorPalette.textThemeColors": "Цвета темы", diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index 4d677df63a..7b3be5fa30 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -1384,6 +1384,8 @@ define([ }, onPdfModeApply: function(mode) { + Common.UI.TooltipManager.closeTip('editPdf'); + if (!this.appOptions.canSwitchMode) return; if ((mode==='comment' || mode==='edit') && false) { // TODO: fix when use co-edit diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 7f2c987108..43149c8ebe 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -176,6 +176,10 @@ define([ setMode: function(mode) { this.mode = mode; this.toolbar.applyLayout(mode); + Common.UI.TooltipManager.addTips({ + 'editPdf' : {name: 'pdfe-help-tip-edit-pdf', placement: 'bottom-right', text: this.helpEditPdf, header: this.helpEditPdfHeader, target: '#slot-btn-tb-edit-mode'}, + 'textComment' : {name: 'pdfe-help-tip-text-comment', placement: 'bottom-right', text: this.helpTextComment, header: this.helpTextCommentHeader, target: '#slot-btn-text-comment'} + }); }, attachCommonUIEvents: function(toolbar) { @@ -238,6 +242,7 @@ 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.btnTextComment.menu.on('show:before', _.bind(this.onBeforeTextComment, this)); // toolbar.btnRotate.on('click', _.bind(this.onRotateClick, this)); Common.NotificationCenter.on('leftmenu:save', _.bind(this.tryToSave, this)); Common.NotificationCenter.on('draw:start', _.bind(this.onDrawStart, this)); @@ -1036,7 +1041,12 @@ define([ // this.api && this.api.asc_Rotate(); }, + onBeforeTextComment: function(btn, e) { + Common.UI.TooltipManager.closeTip('textComment'); + }, + onBtnTextCommentClick: function(btn, e) { + Common.UI.TooltipManager.closeTip('textComment'); this.onInsertTextComment(btn.options.textboxType, btn, e); }, @@ -1324,6 +1334,7 @@ define([ me.toolbar.btnSubmit.updateHint(me.textRequired); } } + config.isEdit && Common.UI.TooltipManager.showTip('editPdf'); }); }, @@ -1346,6 +1357,8 @@ define([ this.requiredTooltip.close(); this.requiredTooltip = undefined; } + (tab !== 'home') && Common.UI.TooltipManager.closeTip('editPdf'); + (tab === 'comment') ? Common.UI.TooltipManager.showTip('textComment') : Common.UI.TooltipManager.closeTip('textComment'); }, applySettings: function() { @@ -2332,6 +2345,10 @@ define([ textGotIt: 'Got it', textSubmited: 'Form submitted successfully
    Click to close the tip.', confirmAddFontName: 'The font you are going to save is not available on the current device.
    The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
    Do you want to continue?', + helpTextComment: 'Insert a text comment or text callout in your PDF file.', + helpTextCommentHeader: 'Text Comment', + helpEditPdf: 'Edit text, add, delete, and rotate pages, insert images, tables, etc.', + helpEditPdfHeader: 'Edit PDF' }, PDFE.Controllers.Toolbar || {})); }); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 5e6f12ddad..016ce73770 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -76,6 +76,7 @@ "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace all", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.
    Please click to save your changes and reload the updates.", + "Common.UI.SynchronizeTip.textGotIt": "Got it", "Common.UI.ThemeColorPalette.textRecentColors": "Recent colors", "Common.UI.ThemeColorPalette.textStandartColors": "Standard colors", "Common.UI.ThemeColorPalette.textThemeColors": "Theme colors", @@ -232,6 +233,8 @@ "Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtRename": "Rename", + "Common.Views.Header.helpQuickAccess": "Hide or show the functional buttons of your choice.", + "Common.Views.Header.helpQuickAccessHeader": "Customize Quick Access", "Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:", "Common.Views.ImageFromUrlDialog.txtEmpty": "This field is required", "Common.Views.ImageFromUrlDialog.txtNotUrl": "This field should be a URL in the \"http://www.example.com\" format", @@ -1017,6 +1020,11 @@ "PDFE.Controllers.Toolbar.txtNeedDownload": "At the moment, PDF viewer can only save new changes in separate file copies. It doesn't support co-editing and other users won't see your changes unless you share a new file version.", "PDFE.Controllers.Toolbar.txtSaveCopy": "Save copy", "PDFE.Controllers.Toolbar.txtUntitled": "Untitled", + "PDFE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
    The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
    Do you want to continue?", + "PDFE.Controllers.Toolbar.helpTextComment": "Insert a text comment or text callout in your PDF file.", + "PDFE.Controllers.Toolbar.helpTextCommentHeader": "Text Comment", + "PDFE.Controllers.Toolbar.helpEditPdf": "Edit text, add, delete, and rotate pages, insert images, tables, etc.", + "PDFE.Controllers.Toolbar.helpEditPdfHeader": "Edit PDF", "PDFE.Controllers.Viewport.textFitPage": "Fit to Page", "PDFE.Controllers.Viewport.textFitWidth": "Fit to Width", "PDFE.Controllers.Viewport.txtDarkMode": "Dark mode", diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js index 9ce56f1faa..2e0069d0b7 100644 --- a/apps/presentationeditor/main/app/controller/Animation.js +++ b/apps/presentationeditor/main/app/controller/Animation.js @@ -178,6 +178,7 @@ define([ onAnimationPane: function(btn) { this._state.isAnimPaneVisible = btn.pressed; this.api.asc_ShowAnimPane(btn.pressed); + Common.UI.TooltipManager.closeTip('animPane'); }, onApiCloseAnimPane: function () { diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 10b6ee65a9..9c0b86a1ee 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -149,7 +149,8 @@ define([ 'insert:placeholder-btn': this.onBtnInsertPlaceholder.bind(this), 'insert:placeholder-menu': this.onMenuInsertPlaceholder.bind(this), 'title:hide' : this.onTitleHide.bind(this), - 'footers:hide' : this.onFootersHide.bind(this) + 'footers:hide' : this.onFootersHide.bind(this), + 'tab:active' : this.onActiveTab.bind(this) }, 'DocumentHolder': { 'smartart:mouseenter': this.mouseenterSmartArt, @@ -313,6 +314,11 @@ define([ setMode: function(mode) { this.mode = mode; this.toolbar.applyLayout(mode); + Common.UI.TooltipManager.addTips({ + 'colorSchema' : {name: 'pe-help-tip-color-schema', placement: 'bottom-left', text: this.helpColorSchema, header: this.helpColorSchemaHeader, target: '#slot-btn-colorschemas', automove: true}, + 'animPane' : {name: 'pe-help-tip-anim-pane', placement: 'bottom-left', text: this.helpAnimPane, header: this.helpAnimPaneHeader, target: '#animation-button-pane', automove: true}, + 'masterSlide' : {name: 'pe-help-tip-master-slide', placement: 'bottom-right', text: this.helpMasterSlide, header: this.helpMasterSlideHeader, target: '#slot-btn-slide-master'} + }); }, attachUIEvents: function(toolbar) { @@ -2068,6 +2074,7 @@ define([ var item = _.find(menu.items, function(item) { return item.value == value; }); (item) ? item.setChecked(true) : menu.clearAll(); } + Common.UI.TooltipManager.closeTip('colorSchema'); }, onSlideSize: function(menu, item) { @@ -2852,6 +2859,7 @@ define([ this.toolbar.lockToolbar(Common.enumLock.noSlides, this._state.no_slides, { array: this.btnsComment }); } } + config.isEdit && Common.UI.TooltipManager.showTip('colorSchema'); }, onFileMenu: function (opts) { @@ -3076,6 +3084,12 @@ define([ this.toolbar.chFooters.setValue(status, true); }, + onActiveTab: function(tab) { + (tab !== 'home') && Common.UI.TooltipManager.closeTip('colorSchema'); + (tab === 'animate') ? Common.UI.TooltipManager.showTip('animPane') : Common.UI.TooltipManager.closeTip('animPane'); + (tab === 'view') ? Common.UI.TooltipManager.showTip('masterSlide') : Common.UI.TooltipManager.closeTip('masterSlide'); + }, + textEmptyImgUrl : 'You need to specify image URL.', textWarning : 'Warning', textFontSizeErr : 'The entered value is incorrect.
    Please enter a numeric value between 1 and 300', @@ -3421,7 +3435,13 @@ define([ txtMatrix_2_2_DLineBracket : 'Empty Matrix with Brackets', txtMatrix_Flat_Round : 'Sparse Matrix', txtMatrix_Flat_Square : 'Sparse Matrix', - textInsert: 'Insert' + textInsert: 'Insert', + helpColorSchema: 'Apply a color scheme to your slides from the extended set.', + helpColorSchemaHeader: 'Updated Color Schemes', + helpMasterSlide: 'Quickly apply the same layout across multiple slides.', + helpMasterSlideHeader: 'Slide Master', + helpAnimPane: 'Easily view and manage all the applied animation effects.', + helpAnimPaneHeader: 'Animation Pane' }, PE.Controllers.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/app/controller/ViewTab.js b/apps/presentationeditor/main/app/controller/ViewTab.js index 950cc4fd48..5a39cbddca 100644 --- a/apps/presentationeditor/main/app/controller/ViewTab.js +++ b/apps/presentationeditor/main/app/controller/ViewTab.js @@ -403,6 +403,7 @@ define([ }, onChangeViewMode: function (m, state) { + Common.UI.TooltipManager.closeTip('slideMaster'); var mode; if (m === 'master') { mode = state ? 'master' : 'normal'; diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 43c6adcb8d..244e5752c0 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -456,6 +456,7 @@ "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace all", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.
    Please click to save your changes and reload the updates.", + "Common.UI.SynchronizeTip.textGotIt": "Got it", "Common.UI.ThemeColorPalette.textRecentColors": "Recent colors", "Common.UI.ThemeColorPalette.textStandartColors": "Standard colors", "Common.UI.ThemeColorPalette.textThemeColors": "Theme colors", @@ -652,6 +653,8 @@ "Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtRename": "Rename", + "Common.Views.Header.helpQuickAccess": "Hide or show the functional buttons of your choice.", + "Common.Views.Header.helpQuickAccessHeader": "Customize Quick Access", "Common.Views.History.textCloseHistory": "Close History", "Common.Views.History.textHide": "Collapse", "Common.Views.History.textHideAll": "Hide detailed changes", @@ -1643,6 +1646,12 @@ "PE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis", "PE.Controllers.Toolbar.txtSymbol_xsi": "Xi", "PE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", + "PE.Controllers.Toolbar.helpColorSchema": "Apply a color scheme to your slides from the extended set.", + "PE.Controllers.Toolbar.helpColorSchemaHeader": "Updated Color Schemes", + "PE.Controllers.Toolbar.helpMasterSlide": "Quickly apply the same layout across multiple slides.", + "PE.Controllers.Toolbar.helpMasterSlideHeader": "Slide Master", + "PE.Controllers.Toolbar.helpAnimPane": "Easily view and manage all the applied animation effects.", + "PE.Controllers.Toolbar.helpAnimPaneHeader": "Animation Pane", "PE.Controllers.Viewport.textFitPage": "Fit to slide", "PE.Controllers.Viewport.textFitWidth": "Fit to width", "PE.Views.Animation.str0_5": "0.5 s (Very Fast)", diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index faa7c633ed..7b7cdac556 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -91,6 +91,7 @@ define([ 'insert:smartart' : this.onInsertSmartArt, 'smartart:mouseenter': this.mouseenterSmartArt, 'smartart:mouseleave': this.mouseleaveSmartArt, + 'tab:active': this.onActiveTab }, 'FileMenu': { 'menu:hide': me.onFileMenu.bind(me, 'hide'), @@ -285,6 +286,9 @@ define([ setMode: function(mode) { this.mode = mode; this.toolbar.applyLayout(mode); + Common.UI.TooltipManager.addTips({ + 'protectRange' : {name: 'sse-help-tip-protect-range', placement: 'bottom-left', text: this.helpProtectRange, header: this.helpProtectRangeHeader, target: '#slot-btn-protect-range', automove: true} + }); }, attachUIEvents: function(toolbar) { @@ -5241,6 +5245,11 @@ define([ this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomItems(this.toolbar, data)); }, + onActiveTab: function(tab) { + (tab === 'protect') ? Common.UI.TooltipManager.showTip('protectRange') : Common.UI.TooltipManager.closeTip('protectRange'); + (tab !== 'home') && Common.UI.TooltipManager.closeTip('quickAccess'); + }, + textEmptyImgUrl : 'You need to specify image URL.', warnMergeLostData : 'Operation can destroy data in the selected cells.
    Continue?', textWarning : 'Warning', @@ -5622,7 +5631,9 @@ define([ txtLockSort: 'Data is found next to your selection, but you do not have sufficient permissions to change those cells.
    Do you wish to continue with the current selection?', textRecentlyUsed: 'Recently Used', errorMaxPoints: 'The maximum number of points in series per chart is 4096.', - warnNoRecommended: 'To create a chart, select the cells that contain the data you\'d like to use.
    If you have names for the rows and columns and you\'d like use them as labels, include them in your selection.' + warnNoRecommended: 'To create a chart, select the cells that contain the data you\'d like to use.
    If you have names for the rows and columns and you\'d like use them as labels, include them in your selection.', + helpProtectRange: 'Restrict viewing of cells in the selected range to protect important data.', + helpProtectRangeHeader: 'Protect Range' }, SSE.Controllers.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/controller/WBProtection.js b/apps/spreadsheeteditor/main/app/controller/WBProtection.js index b8f6184c98..3325e229e1 100644 --- a/apps/spreadsheeteditor/main/app/controller/WBProtection.js +++ b/apps/spreadsheeteditor/main/app/controller/WBProtection.js @@ -274,6 +274,8 @@ define([ }, onProtectRangeClick: function() { + Common.UI.TooltipManager.closeTip('protectRange'); + var me = this, win = new SSE.Views.ProtectedRangesManagerDlg({ api: me.api, diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 55e6d84beb..8eebdccba6 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -306,6 +306,7 @@ "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace all", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.
    Please click to save your changes and reload the updates.", + "Common.UI.SynchronizeTip.textGotIt": "Got it", "Common.UI.ThemeColorPalette.textRecentColors": "Recent colors", "Common.UI.ThemeColorPalette.textStandartColors": "Standard colors", "Common.UI.ThemeColorPalette.textThemeColors": "Theme colors", @@ -489,6 +490,8 @@ "Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtRename": "Rename", + "Common.Views.Header.helpQuickAccess": "Hide or show the functional buttons of your choice.", + "Common.Views.Header.helpQuickAccessHeader": "Customize Quick Access", "Common.Views.History.textCloseHistory": "Close History", "Common.Views.History.textHide": "Collapse", "Common.Views.History.textHideAll": "Hide detailed changes", @@ -1829,6 +1832,8 @@ "SSE.Controllers.Toolbar.warnLongOperation": "The operation you are about to perform might take rather much time to complete.
    Are you sure you want to continue?", "SSE.Controllers.Toolbar.warnMergeLostData": "Only the data from the upper-left cell will remain in the merged cell.
    Are you sure you want to continue?", "SSE.Controllers.Toolbar.warnNoRecommended": "To create a chart, select the cells that contain the data you'd like to use.
    If you have names for the rows and columns and you'd like use them as labels, include them in your selection.", + "SSE.Controllers.Toolbar.helpProtectRange": "Restrict viewing of cells in the selected range to protect important data.", + "SSE.Controllers.Toolbar.helpProtectRangeHeader": "Protect Range", "SSE.Controllers.Viewport.textFreezePanes": "Freeze panes", "SSE.Controllers.Viewport.textFreezePanesShadow": "Show Frozen Panes Shadow", "SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar",