Differential D17116 Diff 41173 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 177 Lines • ▼ Show 20 Lines | _didCompleteWorkflow : function(response) { | ||||
| } | } | ||||
| if (op == 'undelete') { | if (op == 'undelete') { | ||||
| this._setRowState('visible'); | this._setRowState('visible'); | ||||
| } | } | ||||
| this._completed = true; | this._completed = true; | ||||
| JX.Stratcom.invoke('differential-inline-comment-update'); | this._didUpdate(); | ||||
| this.invoke('done'); | this.invoke('done'); | ||||
| }, | }, | ||||
| _didCancelWorkflow : function() { | _didCancelWorkflow : function() { | ||||
| this.invoke('done'); | this.invoke('done'); | ||||
| switch (this.getOperation()) { | switch (this.getOperation()) { | ||||
| ▲ Show 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | toggleCheckbox: function(id, checkbox) { | ||||
| JX.DOM.alterClass(comment, 'inline-state-is-draft', r.draftState); | JX.DOM.alterClass(comment, 'inline-state-is-draft', r.draftState); | ||||
| this._didUpdate(); | this._didUpdate(); | ||||
| })) | })) | ||||
| .start(); | .start(); | ||||
| }, | }, | ||||
| _didUpdate: function() { | _didUpdate: function() { | ||||
| JX.Stratcom.invoke('differential-inline-comment-update'); | // After making changes to inline comments, refresh the transaction | ||||
| // preview at the bottom of the page. | |||||
| // TODO: This isn't the cleanest way to find the preview form, but | |||||
| // rendering no longer has direct access to it. | |||||
| var forms = JX.DOM.scry(document.body, 'form', 'transaction-append'); | |||||
| if (forms.length) { | |||||
| JX.DOM.invoke(forms[0], 'shouldRefresh'); | |||||
| } | |||||
| } | } | ||||
| }, | }, | ||||
| statics : { | statics : { | ||||
| /** | /** | ||||
| * Global refernece to the 'undo' rows currently rendered in the document. | * Global refernece to the 'undo' rows currently rendered in the document. | ||||
| */ | */ | ||||
| Show All 28 Lines | |||||