Touch up PHP/JS interactions for inline comments
Summary: Ref T1460. Overall: - Pass `objectOwnerPHID` consistently. - Pass viewer consistently. - Set the correct draft state for checkboxes on the client. Test Plan: - Made inline comments in Differential. - Made inline comments in Diffusion. Reviewers: chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T1460 Differential Revision: https://secure.phabricator.com/D12186
This commit is contained in:
@@ -301,7 +301,7 @@ JX.install('DifferentialInlineCommentEditor', {
|
||||
};
|
||||
|
||||
new JX.Workflow(this._uri, data)
|
||||
.setHandler(JX.bind(this, function() {
|
||||
.setHandler(JX.bind(this, function(r) {
|
||||
checkbox.checked = !checkbox.checked;
|
||||
|
||||
var comment = JX.DOM.findAbove(
|
||||
@@ -309,8 +309,7 @@ JX.install('DifferentialInlineCommentEditor', {
|
||||
'div',
|
||||
'differential-inline-comment');
|
||||
JX.DOM.alterClass(comment, 'inline-is-done', !!checkbox.checked);
|
||||
|
||||
// TODO: Dynamically update the "inline-state-is-draft" class.
|
||||
JX.DOM.alterClass(comment, 'inline-state-is-draft', r.draftState);
|
||||
|
||||
this._didUpdate();
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user