Review: add toolips for accept/reject buttons in balloons.
Comments: add toolips for edit/delete buttons in balloons (Bug 39539)
This commit is contained in:
parent
68e45180a2
commit
a1669cc103
|
@ -237,7 +237,6 @@ define([
|
|||
} else {
|
||||
this.commentsView = new CommentsPopoverDataView({
|
||||
el: $('#id-comments-popover'),
|
||||
store: me.commentsStore,
|
||||
itemTemplate: _.template(replaceWords(commentsTemplate, {
|
||||
textAddReply: me.textAddReply,
|
||||
textAdd: me.textAdd,
|
||||
|
@ -269,6 +268,16 @@ define([
|
|||
btns.each(function (idx, item) {
|
||||
arr.push($(item).data('bs.tooltip').tip());
|
||||
});
|
||||
btns = $(view.el).find('.btn-edit');
|
||||
btns.tooltip({title: me.txtEditTip, placement: 'cursor'});
|
||||
btns.each(function (idx, item) {
|
||||
arr.push($(item).data('bs.tooltip').tip());
|
||||
});
|
||||
btns = $(view.el).find('.btn-delete');
|
||||
btns.tooltip({title: me.txtDeleteTip, placement: 'cursor'});
|
||||
btns.each(function (idx, item) {
|
||||
arr.push($(item).data('bs.tooltip').tip());
|
||||
});
|
||||
view.tipsArray = arr;
|
||||
this.autoHeightTextBox();
|
||||
};
|
||||
|
@ -286,6 +295,9 @@ define([
|
|||
this.commentsView.on('item:change', addtooltip);
|
||||
this.commentsView.cmpEl.on('mouseover', onCommentsViewMouseOver).on('mouseout', onCommentsViewMouseOut);
|
||||
|
||||
this.commentsView.setStore(me.commentsStore);
|
||||
this.commentsView.onResetItems();
|
||||
|
||||
this.commentsView.on('item:click', function (picker, item, record, e) {
|
||||
var btn, showEditBox, showReplyBox, commentId, replyId, hideAddReply;
|
||||
|
||||
|
@ -307,6 +319,9 @@ define([
|
|||
}
|
||||
|
||||
if (btn.hasClass('btn-edit')) {
|
||||
var tip = btn.data('bs.tooltip');
|
||||
if (tip) tip.dontShow = true;
|
||||
|
||||
if (!_.isUndefined(replyId)) {
|
||||
me.fireEvent('comment:closeEditing', [commentId]);
|
||||
me.fireEvent('comment:editReply', [commentId, replyId, true]);
|
||||
|
@ -347,6 +362,9 @@ define([
|
|||
}
|
||||
}
|
||||
} else if (btn.hasClass('btn-delete')) {
|
||||
var tip = btn.data('bs.tooltip');
|
||||
if (tip) tip.dontShow = true;
|
||||
|
||||
if (!_.isUndefined(replyId)) {
|
||||
me.fireEvent('comment:removeReply', [commentId, replyId]);
|
||||
|
||||
|
@ -518,7 +536,6 @@ define([
|
|||
} else {
|
||||
this.reviewChangesView = new ReviewPopoverDataView({
|
||||
el: $('#id-review-popover'),
|
||||
store: me.reviewStore,
|
||||
itemTemplate: _.template(reviewTemplate)
|
||||
});
|
||||
|
||||
|
@ -535,6 +552,16 @@ define([
|
|||
btns.each(function (idx, item) {
|
||||
arr.push($(item).data('bs.tooltip').tip());
|
||||
});
|
||||
btns = $(view.el).find('.btn-accept');
|
||||
btns.tooltip({title: me.txtAccept, placement: 'cursor'});
|
||||
btns.each(function (idx, item) {
|
||||
arr.push($(item).data('bs.tooltip').tip());
|
||||
});
|
||||
btns = $(view.el).find('.btn-reject');
|
||||
btns.tooltip({title: me.txtReject, placement: 'cursor'});
|
||||
btns.each(function (idx, item) {
|
||||
arr.push($(item).data('bs.tooltip').tip());
|
||||
});
|
||||
view.tipsArray = arr;
|
||||
};
|
||||
|
||||
|
@ -546,8 +573,14 @@ define([
|
|||
var btn = $(e.target);
|
||||
if (btn) {
|
||||
if (btn.hasClass('btn-accept')) {
|
||||
var tip = btn.data('bs.tooltip');
|
||||
if (tip) tip.dontShow = true;
|
||||
|
||||
me.fireEvent('reviewchange:accept', [record.get('changedata')]);
|
||||
} else if (btn.hasClass('btn-reject')) {
|
||||
var tip = btn.data('bs.tooltip');
|
||||
if (tip) tip.dontShow = true;
|
||||
|
||||
me.fireEvent('reviewchange:reject', [record.get('changedata')]);
|
||||
} else if (btn.hasClass('btn-delete')) {
|
||||
me.fireEvent('reviewchange:delete', [record.get('changedata')]);
|
||||
|
@ -559,6 +592,9 @@ define([
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.reviewChangesView.setStore(me.reviewStore);
|
||||
this.reviewChangesView.onResetItems();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1249,6 +1285,10 @@ define([
|
|||
textOpenAgain : "Open Again",
|
||||
textFollowMove : 'Follow Move',
|
||||
textMention : '+mention will provide access to the document and send an email',
|
||||
textMentionNotify : '+mention will notify the user via email'
|
||||
textMentionNotify : '+mention will notify the user via email',
|
||||
txtAccept: 'Accept',
|
||||
txtReject: 'Reject',
|
||||
txtEditTip: 'Edit',
|
||||
txtDeleteTip: 'Delete'
|
||||
}, Common.Views.ReviewPopover || {}))
|
||||
});
|
|
@ -431,6 +431,10 @@
|
|||
"Common.Views.ReviewPopover.textOpenAgain": "Open Again",
|
||||
"Common.Views.ReviewPopover.textReply": "Reply",
|
||||
"Common.Views.ReviewPopover.textResolve": "Resolve",
|
||||
"Common.Views.ReviewPopover.txtAccept": "Accept current change",
|
||||
"Common.Views.ReviewPopover.txtReject": "Reject current change",
|
||||
"Common.Views.ReviewPopover.txtEditTip": "Edit",
|
||||
"Common.Views.ReviewPopover.txtDeleteTip": "Delete",
|
||||
"Common.Views.SaveAsDlg.textLoading": "Loading",
|
||||
"Common.Views.SaveAsDlg.textTitle": "Folder for save",
|
||||
"Common.Views.SelectFileDlg.textLoading": "Loading",
|
||||
|
|
|
@ -312,6 +312,8 @@
|
|||
"Common.Views.ReviewPopover.textOpenAgain": "Open Again",
|
||||
"Common.Views.ReviewPopover.textReply": "Reply",
|
||||
"Common.Views.ReviewPopover.textResolve": "Resolve",
|
||||
"Common.Views.ReviewPopover.txtEditTip": "Edit",
|
||||
"Common.Views.ReviewPopover.txtDeleteTip": "Delete",
|
||||
"Common.Views.SaveAsDlg.textLoading": "Loading",
|
||||
"Common.Views.SaveAsDlg.textTitle": "Folder for save",
|
||||
"Common.Views.SelectFileDlg.textLoading": "Loading",
|
||||
|
|
|
@ -364,6 +364,8 @@
|
|||
"Common.Views.ReviewPopover.textOpenAgain": "Open Again",
|
||||
"Common.Views.ReviewPopover.textReply": "Reply",
|
||||
"Common.Views.ReviewPopover.textResolve": "Resolve",
|
||||
"Common.Views.ReviewPopover.txtEditTip": "Edit",
|
||||
"Common.Views.ReviewPopover.txtDeleteTip": "Delete",
|
||||
"Common.Views.SaveAsDlg.textLoading": "Loading",
|
||||
"Common.Views.SaveAsDlg.textTitle": "Folder for save",
|
||||
"Common.Views.SelectFileDlg.textLoading": "Loading",
|
||||
|
|
Loading…
Reference in a new issue