Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangesetList.js
| Show First 20 Lines • Show All 1,346 Lines • ▼ Show 20 Lines | _redrawBanner: function() { | ||||
| var inlines = changesets[ii].getInlines(); | var inlines = changesets[ii].getInlines(); | ||||
| for (var jj = 0; jj < inlines.length; jj++) { | for (var jj = 0; jj < inlines.length; jj++) { | ||||
| var inline = inlines[jj]; | var inline = inlines[jj]; | ||||
| if (inline.isDeleted()) { | if (inline.isDeleted()) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| if (inline.isSynthetic()) { | |||||
| continue; | |||||
| } | |||||
| if (inline.isEditing()) { | if (inline.isEditing()) { | ||||
| unsaved.push(inline); | unsaved.push(inline); | ||||
| } else if (!inline.getID()) { | |||||
| // These are new comments which have been cancelled, and do not | |||||
| // count as anything. | |||||
| continue; | |||||
| } else if (inline.isDraft()) { | } else if (inline.isDraft()) { | ||||
| unsubmitted.push(inline); | unsubmitted.push(inline); | ||||
| } else if (!inline.isDone()) { | } else if (!inline.isDone()) { | ||||
| undone.push(inline); | undone.push(inline); | ||||
| } else { | } else { | ||||
| done.push(inline); | done.push(inline); | ||||
| } | } | ||||
| } | } | ||||
| Show All 25 Lines | _redrawBanner: function() { | ||||
| unsubmitted_button.setText( | unsubmitted_button.setText( | ||||
| unsubmitted.length + ' ' + pht('Unsubmitted')); | unsubmitted.length + ' ' + pht('Unsubmitted')); | ||||
| JX.DOM.show(unsubmitted_button.getNode()); | JX.DOM.show(unsubmitted_button.getNode()); | ||||
| } else { | } else { | ||||
| JX.DOM.hide(unsubmitted_button.getNode()); | JX.DOM.hide(unsubmitted_button.getNode()); | ||||
| } | } | ||||
| if (done.length || undone.length) { | if (done.length || undone.length) { | ||||
| done_button.setText([ | // If you haven't marked any comments as "Done", we just show text | ||||
| // like "3 Comments". If you've marked at least one done, we show | |||||
| // "1 / 3 Comments". | |||||
| var done_text; | |||||
| if (done.length) { | |||||
| done_text = [ | |||||
| done.length, | done.length, | ||||
| ' / ', | ' / ', | ||||
| (done.length + undone.length), | (done.length + undone.length), | ||||
| ' ', | ' ', | ||||
| pht('Comments') | pht('Comments') | ||||
| ]); | ]; | ||||
| } else { | |||||
| done_text = [ | |||||
| undone.length, | |||||
| ' ', | |||||
| pht('Comments') | |||||
| ]; | |||||
| } | |||||
| done_button.setText(done_text); | |||||
| JX.DOM.show(done_button.getNode()); | JX.DOM.show(done_button.getNode()); | ||||
| // If any comments are not marked "Done", this cycles through the | // If any comments are not marked "Done", this cycles through the | ||||
| // missing comments. Otherwise, it cycles through all the saved | // missing comments. Otherwise, it cycles through all the saved | ||||
| // comments. | // comments. | ||||
| if (undone.length) { | if (undone.length) { | ||||
| this._doneMode = 'undone'; | this._doneMode = 'undone'; | ||||
| ▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines | |||||