diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index bc5bc47f1..166ab0583 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -272,16 +272,8 @@ define([ me.fireEvent('comment:resolve', [commentId]); - readdresolves(); - } else if (btn.hasClass('btn-resolve-check', false)) { - var tip = btn.data('bs.tooltip'); - if (tip) tip.dontShow = true; - - me.fireEvent('comment:resolve', [commentId]); - readdresolves(); } else if (!btn.hasClass('msg-reply') && - !btn.hasClass('btn-resolve-check') && !btn.hasClass('btn-resolve')) { var isTextSelected = false; if (btn.hasClass('user-message')) { @@ -377,12 +369,12 @@ define([ } var arr = [], - btns = $(view.el).find('.btn-resolve'); + btns = $(view.el).find('.btn-resolve:not(.comment-resolved)'); btns.tooltip({title: me.textResolve, placement: 'cursor'}); btns.each(function(idx, item){ arr.push($(item).data('bs.tooltip').tip()); }); - btns = $(view.el).find('.btn-resolve-check'); + btns = $(view.el).find('.comment-resolved'); btns.tooltip({title: me.textOpenAgain, placement: 'cursor'}); btns.each(function(idx, item){ arr.push($(item).data('bs.tooltip').tip()); diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index 723632817..6eda90bda 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -258,12 +258,12 @@ define([ } var arr = [], - btns = $(view.el).find('.btn-resolve'); + btns = $(view.el).find('.btn-resolve:not(.comment-resolved)'); btns.tooltip({title: me.textResolve, placement: 'cursor'}); btns.each(function (idx, item) { arr.push($(item).data('bs.tooltip').tip()); }); - btns = $(view.el).find('.btn-resolve-check'); + btns = $(view.el).find('.comment-resolved'); btns.tooltip({title: me.textOpenAgain, placement: 'cursor'}); btns.each(function (idx, item) { arr.push($(item).data('bs.tooltip').tip()); @@ -451,14 +451,7 @@ define([ readdresolves(); - } else if (btn.hasClass('btn-resolve', false)) { - var tip = btn.data('bs.tooltip'); - if (tip) tip.dontShow = true; - - me.fireEvent('comment:resolve', [commentId]); - - readdresolves(); - } else if (btn.hasClass('btn-resolve-check', false)) { + } else if (btn.hasClass('btn-resolve')) { var tip = btn.data('bs.tooltip'); if (tip) tip.dontShow = true;