diff options
| author | 2018-11-18 08:08:27 -0500 | |
|---|---|---|
| committer | 2018-11-18 14:08:27 +0100 | |
| commit | f3a88614ef4a2541ee29054124d62c0cdc78f485 (patch) | |
| tree | b0844d3db889cebf38cc2a61e4613ec418f41f57 /app | |
| parent | 16a131380bb1ae17a18e4bf95d345cffb80a787c (diff) | |
Add shortcuts for focusing next and previous without opening articles. (#1767)
* add skipping option to toggleContent to use later for 'i' and 'o' hotkeys
* in English config j,k are now 'open' and not 'skip', i,o are called 'focus .. without opening'
Diffstat (limited to 'app')
| -rw-r--r-- | app/i18n/en/conf.php | 13 | ||||
| -rw-r--r-- | app/views/configure/shortcut.phtml | 14 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 2 |
3 files changed, 25 insertions, 4 deletions
diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index bf494162d..5894c12b7 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -151,25 +151,30 @@ return array( 'auto_share_help' => 'If there is only one sharing mode, it is used. Otherwise, modes are accessible by their number.', 'close_dropdown' => 'Close menus', 'collapse_article' => 'Collapse', - 'first_article' => 'Skip to the first article', + 'first_article' => 'Open the first article', 'focus_search' => 'Access search box', 'global_view' => 'Switch to global view', 'help' => 'Display documentation', 'javascript' => 'JavaScript must be enabled in order to use shortcuts', - 'last_article' => 'Skip to the last article', + 'last_article' => 'Open the last article', 'load_more' => 'Load more articles', 'mark_favorite' => 'Mark as favourite', 'mark_read' => 'Mark as read', 'navigation' => 'Navigation', 'navigation_help' => 'With the "Shift" modifier, navigation shortcuts apply on feeds.<br/>With the "Alt" modifier, navigation shortcuts apply on categories.', - 'next_article' => 'Skip to the next article', + 'next_article' => 'Open the next article', + 'other_action' => 'Other actions', + 'previous_article' => 'Open the previous article', + 'next_article' => 'Open the next article', 'normal_view' => 'Switch to normal view', 'other_action' => 'Other actions', - 'previous_article' => 'Skip to the previous article', + 'previous_article' => 'Open the previous article', 'reading_view' => 'Switch to reading view', 'rss_view' => 'Open RSS view in a new tab', 'see_on_website' => 'See on original website', 'shift_for_all_read' => '+ <code>shift</code> to mark all articles as read', + 'skip_next_article' => 'Focus next without opening', + 'skip_previous_article' => 'Focus previous without opening', 'title' => 'Shortcuts', 'user_filter' => 'Access user queries', 'user_filter_help' => 'If there is only one user query, it is used. Otherwise, queries are accessible by their number.', diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index 66db6a5d4..650c84df1 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -64,6 +64,20 @@ <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" data-leave-validation="<?php echo $s['prev_entry']; ?>"/> </div> </div> + + <div class="form-group"> + <label class="group-name" for="skip_next_entry"><?php echo _t('conf.shortcut.skip_next_article'); ?></label> + <div class="group-controls"> + <input type="text" id="skip_next_entry" name="shortcuts[skip_next_entry]" list="keys" value="<?php echo $s['skip_next_entry']; ?>" data-leave-validation="<?php echo $s['skip_next_entry']; ?>"/> + </div> + </div> + + <div class="form-group"> + <label class="group-name" for="skip_prev_entry"><?php echo _t('conf.shortcut.skip_previous_article'); ?></label> + <div class="group-controls"> + <input type="text" id="skip_prev_entry" name="shortcuts[skip_prev_entry]" list="keys" value="<?php echo $s['skip_prev_entry']; ?>" data-leave-validation="<?php echo $s['skip_prev_entry']; ?>"/> + </div> + </div> <div class="form-group"> <label class="group-name" for="first_entry"><?php echo _t('conf.shortcut.first_article'); ?></label> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index d7b3e4360..a434a04a3 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -26,6 +26,8 @@ echo htmlspecialchars(json_encode(array( 'go_website' => @$s['go_website'], 'prev_entry' => @$s['prev_entry'], 'next_entry' => @$s['next_entry'], + 'skip_prev_entry' => @$s['skip_prev_entry'], + 'skip_next_entry' => @$s['skip_next_entry'], 'first_entry' => @$s['first_entry'], 'last_entry' => @$s['last_entry'], 'collapse_entry' => @$s['collapse_entry'], |
