Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangesetList.js
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | wake: function() { | ||||
label = pht('Jump to next inline comment, including hidden comments.'); | label = pht('Jump to next inline comment, including hidden comments.'); | ||||
this._installJumpKey('N', label, 1, 'comment', true); | this._installJumpKey('N', label, 1, 'comment', true); | ||||
label = pht( | label = pht( | ||||
'Jump to previous inline comment, including hidden comments.'); | 'Jump to previous inline comment, including hidden comments.'); | ||||
this._installJumpKey('P', label, -1, 'comment', true); | this._installJumpKey('P', label, -1, 'comment', true); | ||||
label = pht('Hide or show the current file.'); | |||||
this._installKey('h', label, this._onkeytogglefile); | |||||
label = pht('Jump to the table of contents.'); | label = pht('Jump to the table of contents.'); | ||||
this._installKey('t', label, this._ontoc); | this._installKey('t', label, this._ontoc); | ||||
label = pht('Reply to selected inline comment or change.'); | label = pht('Reply to selected inline comment or change.'); | ||||
this._installKey('r', label, JX.bind(this, this._onkeyreply, false)); | this._installKey('r', label, JX.bind(this, this._onkeyreply, false)); | ||||
label = pht('Reply and quote selected inline comment.'); | label = pht('Reply and quote selected inline comment.'); | ||||
this._installKey('R', label, JX.bind(this, this._onkeyreply, true)); | this._installKey('R', label, JX.bind(this, this._onkeyreply, true)); | ||||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | _onkeyedit: function() { | ||||
} | } | ||||
} | } | ||||
} | } | ||||
var pht = this.getTranslations(); | var pht = this.getTranslations(); | ||||
this._warnUser(pht('You must select a comment to edit.')); | this._warnUser(pht('You must select a comment to edit.')); | ||||
}, | }, | ||||
_onkeydone: function() { | _onkeydone: function() { | ||||
var cursor = this._cursorItem; | var cursor = this._cursorItem; | ||||
if (cursor) { | if (cursor) { | ||||
if (cursor.type == 'comment') { | if (cursor.type == 'comment') { | ||||
var inline = cursor.target; | var inline = cursor.target; | ||||
if (inline.canDone()) { | if (inline.canDone()) { | ||||
this.setFocus(null); | this.setFocus(null); | ||||
inline.toggleDone(); | inline.toggleDone(); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
var pht = this.getTranslations(); | var pht = this.getTranslations(); | ||||
this._warnUser(pht('You must select a comment to mark done.')); | this._warnUser(pht('You must select a comment to mark done.')); | ||||
}, | }, | ||||
epriestley: Oops, some copy-paste slipup nonsense here, one sec. | |||||
_onkeytogglefile: function() { | |||||
var cursor = this._cursorItem; | |||||
if (cursor) { | |||||
if (cursor.type == 'file') { | |||||
cursor.changeset.toggleVisibility(); | |||||
return; | |||||
} | |||||
} | |||||
var pht = this.getTranslations(); | |||||
this._warnUser(pht('You must select a file to hide or show.')); | |||||
}, | |||||
_onkeyhide: function() { | _onkeyhide: function() { | ||||
var cursor = this._cursorItem; | var cursor = this._cursorItem; | ||||
if (cursor) { | if (cursor) { | ||||
if (cursor.type == 'comment') { | if (cursor.type == 'comment') { | ||||
var inline = cursor.target; | var inline = cursor.target; | ||||
if (inline.canHide()) { | if (inline.canHide()) { | ||||
this.setFocus(null); | this.setFocus(null); | ||||
▲ Show 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | _onmenu: function(e) { | ||||
}; | }; | ||||
var reveal_item = new JX.PHUIXActionView() | var reveal_item = new JX.PHUIXActionView() | ||||
.setIcon('fa-eye'); | .setIcon('fa-eye'); | ||||
list.addItem(reveal_item); | list.addItem(reveal_item); | ||||
var visible_item = new JX.PHUIXActionView() | var visible_item = new JX.PHUIXActionView() | ||||
.setHandler(function(e) { | .setHandler(function(e) { | ||||
var diff = JX.DOM.scry( | |||||
JX.$(data.containerID), | |||||
'table', | |||||
'differential-diff'); | |||||
JX.Stratcom.invoke('differential-toggle-file', null, {diff: diff}); | |||||
e.prevent(); | e.prevent(); | ||||
menu.close(); | menu.close(); | ||||
changeset.toggleVisibility(); | |||||
}); | }); | ||||
list.addItem(visible_item); | list.addItem(visible_item); | ||||
add_link('fa-file-text', pht('Browse in Diffusion'), data.diffusionURI); | add_link('fa-file-text', pht('Browse in Diffusion'), data.diffusionURI); | ||||
add_link('fa-file-o', pht('View Standalone'), data.standaloneURI); | add_link('fa-file-o', pht('View Standalone'), data.standaloneURI); | ||||
var up_item = new JX.PHUIXActionView() | var up_item = new JX.PHUIXActionView() | ||||
.setHandler(function(e) { | .setHandler(function(e) { | ||||
▲ Show 20 Lines • Show All 624 Lines • Show Last 20 Lines |
Oops, some copy-paste slipup nonsense here, one sec.