mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Make "A" hide or show all inline comments
Summary: Ref T12733. See PHI17. Test Plan: Pressed "A", then pressed "A". Reviewers: chad Reviewed By: chad Maniphest Tasks: T12733 Differential Revision: https://secure.phabricator.com/D18274
This commit is contained in:
parent
8034b9d819
commit
c217d7619c
3 changed files with 27 additions and 7 deletions
|
@ -13,7 +13,7 @@ return array(
|
|||
'core.pkg.js' => '5d80e0db',
|
||||
'darkconsole.pkg.js' => '1f9a31bc',
|
||||
'differential.pkg.css' => '45951e9e',
|
||||
'differential.pkg.js' => '414ada25',
|
||||
'differential.pkg.js' => 'b71b8c5d',
|
||||
'diffusion.pkg.css' => 'a2d17c7d',
|
||||
'diffusion.pkg.js' => '6134c5a1',
|
||||
'favicon.ico' => '30672e08',
|
||||
|
@ -398,7 +398,7 @@ return array(
|
|||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
|
||||
'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => 'cb1570cb',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => '8f1cd52c',
|
||||
'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3',
|
||||
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
|
||||
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
|
||||
|
@ -778,7 +778,7 @@ return array(
|
|||
'phabricator-darkmessage' => 'c48cccdd',
|
||||
'phabricator-dashboard-css' => 'fe5b1869',
|
||||
'phabricator-diff-changeset' => '99abf4cd',
|
||||
'phabricator-diff-changeset-list' => 'cb1570cb',
|
||||
'phabricator-diff-changeset-list' => '8f1cd52c',
|
||||
'phabricator-diff-inline' => 'e83d28f3',
|
||||
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
|
||||
'phabricator-draggable-list' => 'bea6e7f4',
|
||||
|
@ -1567,6 +1567,10 @@ return array(
|
|||
'8e1baf68' => array(
|
||||
'phui-button-css',
|
||||
),
|
||||
'8f1cd52c' => array(
|
||||
'javelin-install',
|
||||
'phuix-button-view',
|
||||
),
|
||||
'8ff5e24c' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1950,10 +1954,6 @@ return array(
|
|||
'cae95e89' => array(
|
||||
'syntax-default-css',
|
||||
),
|
||||
'cb1570cb' => array(
|
||||
'javelin-install',
|
||||
'phuix-button-view',
|
||||
),
|
||||
'ccf1cbf8' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
|
|
@ -298,6 +298,9 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
'Show All Inlines' => pht('Show All Inlines'),
|
||||
|
||||
'List Inline Comments' => pht('List Inline Comments'),
|
||||
|
||||
'Hide or show all inline comments.' =>
|
||||
pht('Hide or show all inline comments.'),
|
||||
),
|
||||
));
|
||||
|
||||
|
|
|
@ -190,6 +190,10 @@ JX.install('DiffChangesetList', {
|
|||
|
||||
label = pht('Collapse or expand inline comment.');
|
||||
this._installKey('q', label, this._onkeycollapse);
|
||||
|
||||
label = pht('Hide or show all inline comments.');
|
||||
this._installKey('A', label, this._onkeyhideall);
|
||||
|
||||
},
|
||||
|
||||
isAsleep: function() {
|
||||
|
@ -448,6 +452,15 @@ JX.install('DiffChangesetList', {
|
|||
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) {
|
||||
new JX.Notification()
|
||||
.setContent(message)
|
||||
|
@ -1701,6 +1714,10 @@ JX.install('DiffChangesetList', {
|
|||
this._dropdownMenu.close();
|
||||
e.prevent();
|
||||
|
||||
this._toggleInlines(type);
|
||||
},
|
||||
|
||||
_toggleInlines: function(type) {
|
||||
var inlines = this._getInlinesByType();
|
||||
|
||||
// Clear the selection state since we end up in a weird place if the
|
||||
|
|
Loading…
Reference in a new issue