Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffInline.js
| Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | updateObjective: function() { | ||||
| } | } | ||||
| 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 = this._snippet; | var tooltip = this._snippet; | ||||
| var anchor = this._row; | var anchor = this._row; | ||||
| var should_stack = false; | |||||
| 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 | // 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 | // actual comment row (which is invisible and can have a misleading | ||||
| // position). | // position). | ||||
| anchor = this._row.nextSibling; | 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'; | ||||
| } else if (this._replyToCommentPHID) { | |||||
| icon = 'fa-reply'; | |||||
| should_stack = true; | |||||
| } | } | ||||
| objective | objective | ||||
| .setAnchor(anchor) | .setAnchor(anchor) | ||||
| .setIcon(icon) | .setIcon(icon) | ||||
| .setColor(color) | .setColor(color) | ||||
| .setTooltip(tooltip) | .setTooltip(tooltip) | ||||
| .setShouldStack(should_stack) | |||||
| .show(); | .show(); | ||||
| }, | }, | ||||
| canReply: function() { | canReply: function() { | ||||
| if (!this._hasAction('reply')) { | if (!this._hasAction('reply')) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 522 Lines • Show Last 20 Lines | |||||