diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index f2373f9eb..5a28a862a 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -188,6 +188,7 @@ define([ this._state.posx = this._state.posy = -1000; this._state.changes_length = 0; this._state.popoverVisible = false; + this.getPopover().hideTips(); this.popoverChanges.reset(); this.getPopover().hideReview(); } diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index 2a5b25aa8..3c8aa20b8 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -498,6 +498,26 @@ define([ itemTemplate: _.template(reviewTemplate) }); + var addtooltip = function (dataview, view, record) { + if (view.tipsArray) { + view.tipsArray.forEach(function (item) { + item.remove(); + }); + } + + var arr = [], + btns = $(view.el).find('.btn-goto'); + btns.tooltip({title: me.textFollowMove, placement: 'cursor'}); + btns.each(function (idx, item) { + arr.push($(item).data('bs.tooltip').tip()); + }); + view.tipsArray = arr; + }; + + this.reviewChangesView.on('item:add', addtooltip); + this.reviewChangesView.on('item:remove', addtooltip); + this.reviewChangesView.on('item:change', addtooltip); + this.reviewChangesView.on('item:click', function (picker, item, record, e) { var btn = $(e.target); if (btn) { @@ -508,6 +528,9 @@ define([ } else if (btn.hasClass('btn-delete')) { me.fireEvent('reviewchange:delete', [record.get('changedata')]); } else if (btn.hasClass('btn-goto')) { + var tip = btn.data('bs.tooltip'); + if (tip) tip.dontShow = true; + me.fireEvent('reviewchange:goto', [record.get('changedata')]); } } @@ -826,6 +849,9 @@ define([ } this.$window.css({overflow: ''}); + if (this.scroller) { + this.scroller.update({minScrollbarLength: 40, alwaysVisibleY: true}); + } }, saveText: function (clear) { if (this.commentsView && this.commentsView.cmpEl.find('.lock-area').length < 1) { @@ -903,6 +929,14 @@ define([ }); } }, this); + if (this.reviewChangesView) + _.each(this.reviewChangesView.dataViewItems, function (item) { + if (item.tipsArray) { + item.tipsArray.forEach(function (item) { + item.hide(); + }); + } + }, this); }, isCommentsViewMouseOver: function () { @@ -952,7 +986,7 @@ define([ textReply : 'Reply', textClose : 'Close', textResolve : 'Resolve', - textOpenAgain : "Open Again" - + textOpenAgain : "Open Again", + textFollowMove : 'Follow Move' }, Common.Views.ReviewPopover || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 839ab1944..c71bfd82d 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -285,6 +285,7 @@ "Common.Views.ReviewPopover.textOpenAgain": "Open Again", "Common.Views.ReviewPopover.textReply": "Reply", "Common.Views.ReviewPopover.textResolve": "Resolve", + "Common.Views.ReviewPopover.textFollowMove": "Follow Move", "Common.Views.SaveAsDlg.textLoading": "Loading", "Common.Views.SaveAsDlg.textTitle": "Folder for save", "Common.Views.SelectFileDlg.textLoading": "Loading",