Merge lp:~cjohnston/launchpad/reply-link into lp:launchpad

Proposed by Chris Johnston
Status: Merged
Approved by: William Grant
Approved revision: no longer in the source branch.
Merged at revision: 17028
Proposed branch: lp:~cjohnston/launchpad/reply-link
Merge into: lp:launchpad
Diff against target: 30 lines (+6/-3)
1 file modified
lib/lp/code/javascript/branchmergeproposal.inlinecomments.js (+6/-3)
To merge this branch: bzr merge lp:~cjohnston/launchpad/reply-link
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+221429@code.launchpad.net

Commit message

Remove reply links from IC's when a user is not logged in.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/code/javascript/branchmergeproposal.inlinecomments.js'
--- lib/lp/code/javascript/branchmergeproposal.inlinecomments.js 2014-05-29 08:26:02 +0000
+++ lib/lp/code/javascript/branchmergeproposal.inlinecomments.js 2014-05-29 16:24:04 +0000
@@ -144,11 +144,11 @@
144 '<div class="boardComment">' +144 '<div class="boardComment">' +
145 '<div class="boardCommentDetails"></div>' +145 '<div class="boardCommentDetails"></div>' +
146 '<div class="boardCommentBody"><div></div></div>' +146 '<div class="boardCommentBody"><div></div></div>' +
147 '<div class="boardCommentFooter"></div>' +
148 '</div>');147 '</div>');
149 if (Y.Lang.isUndefined(comment.person)) {148 if (Y.Lang.isUndefined(comment.person)) {
150 // Creates a draft inline comment area.149 // Creates a draft inline comment area.
151 newrow.addClass('draft');150 newrow.addClass('draft');
151 newrow.append('<div class="boardCommentFooter"></div>');
152 newrow.one('.boardCommentDetails').set('text', 'Unsaved comment');152 newrow.one('.boardCommentDetails').set('text', 'Unsaved comment');
153 newrow.one('.boardCommentBody div')153 newrow.one('.boardCommentBody div')
154 .append('<span class="yui3-editable_text-text"></span>')154 .append('<span class="yui3-editable_text-text"></span>')
@@ -167,8 +167,11 @@
167 // Wrap resources coming from LP.cache, as they come from167 // Wrap resources coming from LP.cache, as they come from
168 // the LP API (updates during the page life-span). This way168 // the LP API (updates during the page life-span). This way
169 // the handling code can be unified.169 // the handling code can be unified.
170 newrow.one('.boardCommentFooter')170 if (LP.links['me'] !== undefined) {
171 .append('<a class="js-action draft-edit">Reply</a>');171 newrow.append('<div class="boardCommentFooter"></div>');
172 newrow.one('.boardCommentFooter')
173 .append('<a class="js-action draft-edit">Reply</a>');
174 }
172 if (Y.Lang.isUndefined(comment.person.get)) {175 if (Y.Lang.isUndefined(comment.person.get)) {
173 comment.person = namespace.lp_client.wrap_resource(176 comment.person = namespace.lp_client.wrap_resource(
174 null, comment.person);177 null, comment.person);