Differential D12186 Diff 29293 webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js
Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js
| Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | members : { | ||||
| toggleCheckbox: function(id, checkbox) { | toggleCheckbox: function(id, checkbox) { | ||||
| var data = { | var data = { | ||||
| op: 'done', | op: 'done', | ||||
| id: id | id: id | ||||
| }; | }; | ||||
| new JX.Workflow(this._uri, data) | new JX.Workflow(this._uri, data) | ||||
| .setHandler(JX.bind(this, function() { | .setHandler(JX.bind(this, function(r) { | ||||
| checkbox.checked = !checkbox.checked; | checkbox.checked = !checkbox.checked; | ||||
| var comment = JX.DOM.findAbove( | var comment = JX.DOM.findAbove( | ||||
| checkbox, | checkbox, | ||||
| 'div', | 'div', | ||||
| 'differential-inline-comment'); | 'differential-inline-comment'); | ||||
| JX.DOM.alterClass(comment, 'inline-is-done', !!checkbox.checked); | JX.DOM.alterClass(comment, 'inline-is-done', !!checkbox.checked); | ||||
| JX.DOM.alterClass(comment, 'inline-state-is-draft', r.draftState); | |||||
| // TODO: Dynamically update the "inline-state-is-draft" class. | |||||
| this._didUpdate(); | this._didUpdate(); | ||||
| })) | })) | ||||
| .start(); | .start(); | ||||
| }, | }, | ||||
| _didUpdate: function() { | _didUpdate: function() { | ||||
| JX.Stratcom.invoke('differential-inline-comment-update'); | JX.Stratcom.invoke('differential-inline-comment-update'); | ||||
| Show All 36 Lines | |||||