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

Commit ad90816

Browse files
committed
Merge branch 'master' into modal-fullscreen
2 parents c9cfbab + da3020e commit ad90816

File tree

3 files changed

+63
-73
lines changed

3 files changed

+63
-73
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: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -242,59 +242,59 @@ $(window).bind('keydown', function(e) {
242242
Backbone.history.loadUrl();
243243
}
244244

245-
switch (char) {
246-
case config.keyShortcuts.undo:
247-
//run undo programmatically to avoid crash
248-
e.preventDefault();
249-
document.execCommand('undo');
250-
break;
251-
case config.keyShortcuts.discover:
252-
route = 'home';
253-
break;
254-
case config.keyShortcuts.myPage:
255-
route = 'userPage';
256-
break;
257-
case config.keyShortcuts.customizePage:
258-
route = 'userPage/' + user.get('guid') + '/customize';
259-
break;
260-
case config.keyShortcuts.create:
261-
route = 'userPage/' + user.get('guid') + '/listingNew';
262-
break;
263-
case config.keyShortcuts.purchases:
264-
route = 'transactions/purchases';
265-
break;
266-
case config.keyShortcuts.sales:
267-
route = 'transactions/sales';
268-
break;
269-
case config.keyShortcuts.cases:
270-
route = 'transactions/cases';
271-
break;
272-
case config.keyShortcuts.settings:
273-
route = 'settings';
274-
break;
275-
case config.keyShortcuts.addressBar:
276-
// Select all text in address bar
277-
$('.js-navAddressBar').select();
278-
break;
279-
case config.keyShortcuts.save:
280-
window.obEventBus.trigger('saveCurrentForm');
281-
break;
282-
case config.keyShortcuts.refresh:
283-
Backbone.history.loadUrl();
284-
break;
285-
}
286-
287-
if (route !== null) {
288-
e.preventDefault();
289-
Backbone.history.navigate(route, {
290-
trigger: true
291-
});
292-
}
245+
if (ctrl) {
246+
switch (char) {
247+
case config.keyShortcuts.undo:
248+
e.preventDefault();
249+
//run undo programmatically to avoid crash
250+
document.execCommand('undo');
251+
break;
252+
case config.keyShortcuts.discover:
253+
route = 'home';
254+
break;
255+
case config.keyShortcuts.myPage:
256+
route = 'userPage';
257+
break;
258+
case config.keyShortcuts.customizePage:
259+
route = 'userPage/' + user.get('guid') + '/customize';
260+
break;
261+
case config.keyShortcuts.create:
262+
route = 'userPage/' + user.get('guid') + '/listingNew';
263+
break;
264+
case config.keyShortcuts.purchases:
265+
route = 'transactions/purchases';
266+
break;
267+
case config.keyShortcuts.sales:
268+
route = 'transactions/sales';
269+
break;
270+
case config.keyShortcuts.cases:
271+
route = 'transactions/cases';
272+
break;
273+
case config.keyShortcuts.settings:
274+
route = 'settings';
275+
break;
276+
case config.keyShortcuts.addressBar:
277+
// Select all text in address bar
278+
$('.js-navAddressBar').select();
279+
break;
280+
case config.keyShortcuts.save:
281+
window.obEventBus.trigger('saveCurrentForm');
282+
break;
283+
case config.keyShortcuts.refresh:
284+
e.preventDefault();
285+
Backbone.history.loadUrl();
286+
break;
287+
case config.keyShortcuts.restart:
288+
location.reload();
289+
break;
290+
}
293291

294-
// Select all text in address bar
295-
if (char === config.keyShortcuts.addressBar) {
296-
// Select all text in address bar
297-
$('.js-navAddressBar').select();
292+
if (route !== null) {
293+
e.preventDefault();
294+
Backbone.history.navigate(route, {
295+
trigger: true
296+
});
297+
}
298298
}
299299
});
300300

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)