Add 'd' shortcut to open download dialog
Pressing the 'd' key in change view now opens the download dialog. Bug: Issue 4523 Change-Id: I9feb8334f1dc3a85261d77af9f7b9e3cdcf00517
This commit is contained in:
@@ -488,6 +488,10 @@
|
||||
this._openReplyDialog();
|
||||
}
|
||||
break;
|
||||
case 68: // 'd'
|
||||
e.preventDefault();
|
||||
this.$.downloadOverlay.open();
|
||||
break;
|
||||
case 82: // 'r'
|
||||
if (e.shiftKey) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -109,6 +109,13 @@ limitations under the License.
|
||||
// 'shift + R'
|
||||
MockInteractions.pressAndReleaseKeyOn(element, 82, 'shift');
|
||||
});
|
||||
|
||||
test('d should open download overlay', function() {
|
||||
var stub = sinon.stub(element.$.downloadOverlay, 'open');
|
||||
MockInteractions.pressAndReleaseKeyOn(element, 68); // 'd'
|
||||
assert.isTrue(stub.called);
|
||||
stub.restore();
|
||||
});
|
||||
});
|
||||
|
||||
test('reply button has updated count when there are drafts', function() {
|
||||
|
||||
@@ -157,6 +157,10 @@ limitations under the License.
|
||||
<td><span class="key">a</span></td>
|
||||
<td>Open reply dialog to publish comments and add reviewers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="key">d</span></td>
|
||||
<td>Open download overlay</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td class="header">File list</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user