Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit e8da159

Browse files
committed
Merge pull request #1468 from OpenBazaar/patchShortcuts
patches shortcuts
2 parents 0775b7d + c6d31f7 commit e8da159

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

js/config.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ module.exports = {
1515
keyShortcuts: {
1616
undo: 'z',
1717
discover: 'd',
18-
myPage: 'j',
19-
customizePage: 'k',
20-
create: 'l',
21-
purchases: ',',
22-
sales: '.',
23-
cases: '/',
24-
settings: ';',
25-
addressBar: '[',
18+
myPage: 't',
19+
customizePage: 'e',
20+
create: 'n',
21+
purchases: 'k',
22+
sales: 'm',
23+
cases: 'j',
24+
settings: 'g',
25+
addressBar: 'l',
2626
save: 's',
27-
refresh: 't',
28-
restart: 'r'
27+
refresh: 'r',
28+
restart: 'f'
2929
},
3030

3131
setTestnet: function(testNetBoolean){

js/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ $(window).bind('keydown', function(e) {
198198
}
199199

200200
if (ctrl) {
201+
e.preventDefault();
201202
switch (char) {
202203
case config.keyShortcuts.undo:
203204
//run undo programmatically to avoid crash
204-
e.preventDefault();
205205
document.execCommand('undo');
206206
break;
207207
case config.keyShortcuts.discover:
@@ -238,6 +238,9 @@ $(window).bind('keydown', function(e) {
238238
case config.keyShortcuts.refresh:
239239
Backbone.history.loadUrl();
240240
break;
241+
case config.keyShortcuts.restart:
242+
location.reload();
243+
break;
241244
}
242245

243246
if (route !== null) {

js/templates/pageNav.html

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,6 @@ <h3 class="margin0 marginTop25"><%= polyglot.t('Discover') %></h3>
123123
<%= polyglot.t('nav.settings') %>
124124
<span class="pull-right txt-muted"><%= config.keyShortcutPrefix + config.keyShortcuts.settings.toUpperCase() %></span>
125125
</a>
126-
<a class="js-navRefresh">
127-
<span class="ion-loop fontSize11 marginRight2 textOpacity1"></span>
128-
<%= polyglot.t('nav.refresh') %>
129-
<span class="pull-right txt-muted"><%= config.keyShortcutPrefix + config.keyShortcuts.refresh.toUpperCase() %></span>
130-
</a>
131-
<a class="js-navRestart">
132-
<span class="ion-refresh fontSize11 marginRight2 textOpacity1"></span>
133-
<%= polyglot.t('nav.restart') %>
134-
<span class="pull-right txt-muted"><%= config.keyShortcutPrefix + config.keyShortcuts.restart.toUpperCase() %></span>
135-
</a>
136126
<hr/>
137127
<a class="js-showAboutModal">
138128
<span class="ion-ios-book fontSize11 marginRight2 textOpacity1"></span>
@@ -165,7 +155,7 @@ <h3 class="margin0 marginTop25"><%= polyglot.t('Discover') %></h3>
165155
<a class="btn btn-togRight btn-fwd ion-chevron-right js-navFwd custCol-primary custCol-text fontSize13 tooltip" data-tooltip="<%= polyglot.t('nav.Forward') %>"></a>
166156
</div>
167157
<div class="ctrlGroup">
168-
<a class="btn btn-home ion-refresh custCol-primary custCol-text js-navRefresh tooltip" data-tooltip="<%= polyglot.t('Reload') %>"></a>
158+
<a class="btn btn-home ion-refresh custCol-primary custCol-text js-navRefresh tooltip" data-tooltip="<%= polyglot.t('Reload') %> <%= config.keyShortcutPrefix + config.keyShortcuts.refresh.toUpperCase() %>"> </a>
169159
</div>
170160
<div class="ctrlGroup flexExpand">
171161
<div class="txtFieldWrapper searchWrapper mainSearchWrapper js-mainSearchWrapper">

0 commit comments

Comments
 (0)