mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding new keyboard shortcut prefs.
This commit is contained in:
parent
37f782a7aa
commit
ac8e94bd9a
3 changed files with 90 additions and 2 deletions
|
@ -37,7 +37,8 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
$.make('div', { className: 'NB-modal-tabs' }, [
|
||||
$.make('div', { className: 'NB-modal-tab NB-active NB-modal-tab-general' }, 'General'),
|
||||
$.make('div', { className: 'NB-modal-tab NB-modal-tab-feeds' }, 'Feeds'),
|
||||
$.make('div', { className: 'NB-modal-tab NB-modal-tab-stories' }, 'Stories')
|
||||
$.make('div', { className: 'NB-modal-tab NB-modal-tab-stories' }, 'Stories'),
|
||||
$.make('div', { className: 'NB-modal-tab NB-modal-tab-keyboard' }, 'Keyboard')
|
||||
]),
|
||||
$.make('div', { className: 'NB-modal-loading' }),
|
||||
$.make('h2', { className: 'NB-modal-title' }, [
|
||||
|
@ -605,6 +606,77 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
'Show all comments'
|
||||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-tab NB-tab-keyboard' }, [
|
||||
(NEWSBLUR.Globals.is_premium && $.make('div', { className: 'NB-preferences-notpremium' }, [
|
||||
'You must have a ',
|
||||
$.make('div', { className: 'NB-splash-link NB-premium-link' }, 'premium account'),
|
||||
' to change keyboard shortcuts.'
|
||||
])),
|
||||
$.make('div', { className: 'NB-preference NB-preference-keyboard-verticalarrows' }, [
|
||||
$.make('div', { className: 'NB-preference-options' }, [
|
||||
$.make('div', [
|
||||
$.make('input', {
|
||||
id: 'NB-preference-keyboard-verticalarrows-1',
|
||||
type: 'radio',
|
||||
name: 'keyboard_verticalarrows',
|
||||
value: 'story',
|
||||
disabled: !NEWSBLUR.Globals.is_premium
|
||||
}),
|
||||
$.make('label', { 'for': 'NB-preference-keyboard-verticalarrows-1' }, 'Navigate between stories')
|
||||
]),
|
||||
$.make('div', [
|
||||
$.make('input', {
|
||||
id: 'NB-preference-keyboard-verticalarrows-2',
|
||||
type: 'radio',
|
||||
name: 'keyboard_verticalarrows',
|
||||
value: 'scroll',
|
||||
disabled: !NEWSBLUR.Globals.is_premium
|
||||
}),
|
||||
$.make('label', { 'for': 'NB-preference-keyboard-verticalarrows-2' }, 'Scroll up/down in story')
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||
'↓'
|
||||
]),
|
||||
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||
'↑'
|
||||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference NB-preference-keyboard-horizontalarrows' }, [
|
||||
$.make('div', { className: 'NB-preference-options' }, [
|
||||
$.make('div', [
|
||||
$.make('input', {
|
||||
id: 'NB-preference-keyboard-horizontalarrows-1',
|
||||
type: 'radio',
|
||||
name: 'keyboard_horizontalarrows',
|
||||
value: 'view',
|
||||
disabled: !NEWSBLUR.Globals.is_premium
|
||||
}),
|
||||
$.make('label', { 'for': 'NB-preference-keyboard-horizontalarrows-1' }, 'Switch views (original, feed, text, story)')
|
||||
]),
|
||||
$.make('div', [
|
||||
$.make('input', {
|
||||
id: 'NB-preference-keyboard-horizontalarrows-2',
|
||||
type: 'radio',
|
||||
name: 'keyboard_horizontalarrows',
|
||||
value: 'site',
|
||||
disabled: !NEWSBLUR.Globals.is_premium
|
||||
}),
|
||||
$.make('label', { 'for': 'NB-preference-keyboard-horizontalarrows-2' }, 'Open the next site/folder')
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||
'←'
|
||||
]),
|
||||
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||
'→'
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-modal-submit NB-modal-submit-form' }, [
|
||||
|
@ -739,6 +811,18 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=keyboard_verticalarrows]', $modal).each(function() {
|
||||
if ($(this).val() == NEWSBLUR.Preferences.keyboard_verticalarrows) {
|
||||
$(this).attr('checked', true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=keyboard_horizontalarrows]', $modal).each(function() {
|
||||
if ($(this).val() == NEWSBLUR.Preferences.keyboard_horizontalarrows) {
|
||||
$(this).attr('checked', true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
var order = NEWSBLUR.Preferences['default_order'];
|
||||
var read_filter = NEWSBLUR.Preferences['default_read_filter'];
|
||||
$('.NB-preference-view-setting-order-oldest', $modal).toggleClass('NB-active', order == 'oldest');
|
||||
|
@ -858,6 +942,8 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
newtab = 'feeds';
|
||||
} else if ($t.hasClass('NB-modal-tab-stories')) {
|
||||
newtab = 'stories';
|
||||
} else if ($t.hasClass('NB-modal-tab-keyboard')) {
|
||||
newtab = 'keyboard';
|
||||
}
|
||||
self.resize_modal();
|
||||
self.switch_tab(newtab);
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
'hide_read_feeds' : 0,
|
||||
'show_tooltips' : 1,
|
||||
'feed_order' : 'ALPHABETICAL',
|
||||
'keyboard_verticalarrows' : 'story',
|
||||
'keyboard_horizontalarrows': 'view',
|
||||
'ssl' : 0,
|
||||
'open_feed_action' : 0,
|
||||
'read_story_delay' : 0,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{% if new_user_queue_position == 0 %}
|
||||
You are at the front of the line! Just a few more minutes<br />until you receive your free invite to use NewsBlur.
|
||||
{% else %}
|
||||
There {{ new_user_queue_position|pluralize:"is,are" }} {{ new_user_queue_position }} {{ new_user_queue_position|pluralize:"person,people" }} in front of you{% if new_user_queue_behind %} <span style="color:#999">(and {{ new_user_queue_behind }} {{ new_user_queue_behind|pluralize:"person,people" }} behind you)</span>{% endif %}, {{ new_user_queue_position|pluralize:",all" }} patiently waiting<br /> on their free accounts on NewsBlur.
|
||||
There {{ new_user_queue_position|pluralize:"is,are" }} {{ new_user_queue_position|commify }} {{ new_user_queue_position|pluralize:"person,people" }} in front of you{% if new_user_queue_behind %} <span style="color:#999">(and {{ new_user_queue_behind|commify }} {{ new_user_queue_behind|pluralize:"person,people" }} behind you)</span>{% endif %}, {{ new_user_queue_position|pluralize:",all" }} patiently waiting<br /> on their free accounts on NewsBlur.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p style="margin: 6px 0 0;color: #355599;font-weight: bold;">By going premium you can get full and immediate access to NewsBlur.</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue