Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffInline.js
| Show All 25 Lines | members: { | ||||
| _isDeleted: false, | _isDeleted: false, | ||||
| _isInvisible: false, | _isInvisible: false, | ||||
| _isLoading: false, | _isLoading: false, | ||||
| _changeset: null, | _changeset: null, | ||||
| _isCollapsed: false, | _isCollapsed: false, | ||||
| _isDraft: null, | _isDraft: null, | ||||
| _isDraftDone: null, | |||||
| _isFixed: null, | _isFixed: null, | ||||
| _isEditing: false, | _isEditing: false, | ||||
| _isNew: false, | _isNew: false, | ||||
| _isSynthetic: false, | _isSynthetic: false, | ||||
| bindToRow: function(row) { | bindToRow: function(row) { | ||||
| this._row = row; | this._row = row; | ||||
| Show All 26 Lines | bindToRow: function(row) { | ||||
| (data.left != data.right); | (data.left != data.right); | ||||
| this._replyToCommentPHID = data.replyToCommentPHID; | this._replyToCommentPHID = data.replyToCommentPHID; | ||||
| this._isDraft = data.isDraft; | this._isDraft = data.isDraft; | ||||
| this._isFixed = data.isFixed; | this._isFixed = data.isFixed; | ||||
| this._isGhost = data.isGhost; | this._isGhost = data.isGhost; | ||||
| this._isSynthetic = data.isSynthetic; | this._isSynthetic = data.isSynthetic; | ||||
| this._isDraftDone = data.isDraftDone; | |||||
| this._changesetID = data.changesetID; | this._changesetID = data.changesetID; | ||||
| this._isNew = false; | this._isNew = false; | ||||
| this._snippet = data.snippet; | this._snippet = data.snippet; | ||||
| this.setInvisible(false); | this.setInvisible(false); | ||||
| return this; | return this; | ||||
| Show All 14 Lines | members: { | ||||
| isDeleted: function() { | isDeleted: function() { | ||||
| return this._isDeleted; | return this._isDeleted; | ||||
| }, | }, | ||||
| isSynthetic: function() { | isSynthetic: function() { | ||||
| return this._isSynthetic; | return this._isSynthetic; | ||||
| }, | }, | ||||
| isDraftDone: function() { | |||||
| return this._isDraftDone; | |||||
| }, | |||||
| bindToRange: function(data) { | bindToRange: function(data) { | ||||
| this._displaySide = data.displaySide; | this._displaySide = data.displaySide; | ||||
| this._number = parseInt(data.number, 10); | this._number = parseInt(data.number, 10); | ||||
| this._length = parseInt(data.length, 10); | this._length = parseInt(data.length, 10); | ||||
| this._isNewFile = data.isNewFile; | this._isNewFile = data.isNewFile; | ||||
| this._changesetID = data.changesetID; | this._changesetID = data.changesetID; | ||||
| this._isNew = true; | this._isNew = true; | ||||
| ▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | _ondone: function(response) { | ||||
| JX.DOM.alterClass(comment, 'inline-is-done', response.isChecked); | JX.DOM.alterClass(comment, 'inline-is-done', response.isChecked); | ||||
| // NOTE: This is marking the inline as having an unsubmitted checkmark, | // NOTE: This is marking the inline as having an unsubmitted checkmark, | ||||
| // as opposed to a submitted checkmark. This is different from the | // as opposed to a submitted checkmark. This is different from the | ||||
| // top-level "draft" state of unsubmitted comments. | // top-level "draft" state of unsubmitted comments. | ||||
| JX.DOM.alterClass(comment, 'inline-state-is-draft', response.draftState); | JX.DOM.alterClass(comment, 'inline-state-is-draft', response.draftState); | ||||
| this._isFixed = response.isChecked; | this._isFixed = response.isChecked; | ||||
| this._isDraftDone = !!response.draftState; | |||||
| this._didUpdate(); | this._didUpdate(); | ||||
| }, | }, | ||||
| create: function(text) { | create: function(text) { | ||||
| var uri = this._getInlineURI(); | var uri = this._getInlineURI(); | ||||
| var handler = JX.bind(this, this._oncreateresponse); | var handler = JX.bind(this, this._oncreateresponse); | ||||
| var data = this._newRequestData('new', text); | var data = this._newRequestData('new', text); | ||||
| ▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines | |||||