Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangesetList.js
| Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | wake: function() { | ||||
| label = pht('Edit selected inline comment.'); | label = pht('Edit selected inline comment.'); | ||||
| this._installKey('e', label, this._onkeyedit); | this._installKey('e', label, this._onkeyedit); | ||||
| label = pht('Mark or unmark selected inline comment as done.'); | label = pht('Mark or unmark selected inline comment as done.'); | ||||
| this._installKey('w', label, this._onkeydone); | this._installKey('w', label, this._onkeydone); | ||||
| label = pht('Collapse or expand inline comment.'); | label = pht('Collapse or expand inline comment.'); | ||||
| this._installKey('q', label, this._onkeycollapse); | this._installKey('q', label, this._onkeycollapse); | ||||
| label = pht('Hide or show all inline comments.'); | |||||
| this._installKey('A', label, this._onkeyhideall); | |||||
| }, | }, | ||||
| isAsleep: function() { | isAsleep: function() { | ||||
| return this._asleep; | return this._asleep; | ||||
| }, | }, | ||||
| newChangesetForNode: function(node) { | newChangesetForNode: function(node) { | ||||
| var changeset = JX.DiffChangeset.getForNode(node); | var changeset = JX.DiffChangeset.getForNode(node); | ||||
| ▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | _onkeycollapse: function() { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| var pht = this.getTranslations(); | var pht = this.getTranslations(); | ||||
| this._warnUser(pht('You must select a comment to hide.')); | this._warnUser(pht('You must select a comment to hide.')); | ||||
| }, | }, | ||||
| _onkeyhideall: function() { | |||||
| var inlines = this._getInlinesByType(); | |||||
| if (inlines.visible.length) { | |||||
| this._toggleInlines('all'); | |||||
| } else { | |||||
| this._toggleInlines('show'); | |||||
| } | |||||
| }, | |||||
| _warnUser: function(message) { | _warnUser: function(message) { | ||||
| new JX.Notification() | new JX.Notification() | ||||
| .setContent(message) | .setContent(message) | ||||
| .alterClassName('jx-notification-alert', true) | .alterClassName('jx-notification-alert', true) | ||||
| .setDuration(1000) | .setDuration(1000) | ||||
| .show(); | .show(); | ||||
| }, | }, | ||||
| ▲ Show 20 Lines • Show All 1,237 Lines • ▼ Show 20 Lines | _ondropdown: function() { | ||||
| .setName(pht('Show All Inlines')) | .setName(pht('Show All Inlines')) | ||||
| .setDisabled(!inlines.hidden.length); | .setDisabled(!inlines.hidden.length); | ||||
| }, | }, | ||||
| _onhideinlines: function(type, e) { | _onhideinlines: function(type, e) { | ||||
| this._dropdownMenu.close(); | this._dropdownMenu.close(); | ||||
| e.prevent(); | e.prevent(); | ||||
| this._toggleInlines(type); | |||||
| }, | |||||
| _toggleInlines: function(type) { | |||||
| var inlines = this._getInlinesByType(); | var inlines = this._getInlinesByType(); | ||||
| // Clear the selection state since we end up in a weird place if the | // Clear the selection state since we end up in a weird place if the | ||||
| // user hides the selected inline. | // user hides the selected inline. | ||||
| this._setSelectionState(null); | this._setSelectionState(null); | ||||
| var targets; | var targets; | ||||
| var mode = true; | var mode = true; | ||||
| ▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines | |||||