Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffInline.js
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | bindToRow: function(row) { | ||||
| 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._changesetID = data.changesetID; | this._changesetID = data.changesetID; | ||||
| this.updateObjective(); | |||||
| this.setInvisible(false); | this.setInvisible(false); | ||||
| this.updateObjective(); | |||||
| return this; | return this; | ||||
| }, | }, | ||||
| 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; | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | bindToReply: function(inline) { | ||||
| return this; | return this; | ||||
| }, | }, | ||||
| setChangeset: function(changeset) { | setChangeset: function(changeset) { | ||||
| this._changeset = changeset; | this._changeset = changeset; | ||||
| var objectives = changeset.getChangesetList().getObjectives(); | var objectives = changeset.getChangesetList().getObjectives(); | ||||
| // Create this inline's objective, but don't show it yet. | |||||
| this._objective = objectives.newObjective() | this._objective = objectives.newObjective() | ||||
| .setCallback(JX.bind(this, this._onobjective)); | .setCallback(JX.bind(this, this._onobjective)) | ||||
| this.updateObjective(); | .hide(); | ||||
| return this; | return this; | ||||
| }, | }, | ||||
| getChangeset: function() { | getChangeset: function() { | ||||
| return this._changeset; | return this._changeset; | ||||
| }, | }, | ||||
| Show All 21 Lines | updateObjective: function() { | ||||
| return; | return; | ||||
| } | } | ||||
| var pht = changeset.getChangesetList().getTranslations(); | var pht = changeset.getChangesetList().getTranslations(); | ||||
| var icon = 'fa-comment'; | var icon = 'fa-comment'; | ||||
| var color = 'bluegrey'; | var color = 'bluegrey'; | ||||
| var tooltip = null; | var tooltip = null; | ||||
| var anchor = this._row; | |||||
| if (this._isEditing) { | if (this._isEditing) { | ||||
| icon = 'fa-star'; | icon = 'fa-star'; | ||||
| color = 'pink'; | color = 'pink'; | ||||
| tooltip = pht('Editing Comment'); | tooltip = pht('Editing Comment'); | ||||
| // If we're editing, anchor to the row with the editor instead of the | |||||
| // actual comment row (which is invisible and can have a misleading | |||||
| // position). | |||||
| anchor = this._row.nextSibling; | |||||
| } else if (this._isDraft) { | } else if (this._isDraft) { | ||||
| // This inline is an unsubmitted draft. | // This inline is an unsubmitted draft. | ||||
| icon = 'fa-pencil'; | icon = 'fa-pencil'; | ||||
| color = 'indigo'; | color = 'indigo'; | ||||
| } else if (this._isFixed) { | } else if (this._isFixed) { | ||||
| // This inline has been marked done. | // This inline has been marked done. | ||||
| icon = 'fa-check'; | icon = 'fa-check'; | ||||
| color = 'grey'; | color = 'grey'; | ||||
| } else if (this._isGhost) { | } else if (this._isGhost) { | ||||
| icon = 'fa-comment-o'; | icon = 'fa-comment-o'; | ||||
| color = 'grey'; | color = 'grey'; | ||||
| } | } | ||||
| objective | objective | ||||
| .setAnchor(anchor) | |||||
| .setIcon(icon) | .setIcon(icon) | ||||
| .setColor(color) | .setColor(color) | ||||
| .setTooltip(tooltip) | .setTooltip(tooltip) | ||||
| .show(); | .show(); | ||||
| }, | }, | ||||
| canReply: function() { | canReply: function() { | ||||
| if (!this._hasAction('reply')) { | if (!this._hasAction('reply')) { | ||||
| ▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines | |||||