Ajout d'un raccourci pour refermer un article.

https://github.com/marienfressinaud/FreshRSS/issues/256
This commit is contained in:
Alexis Degrugillier
2013-11-17 15:23:48 -05:00
parent d0a7c1e023
commit ff1803e61a
7 changed files with 21 additions and 3 deletions

View File

@@ -337,7 +337,7 @@ class configureController extends ActionController {
'f10', 'f11', 'f12');
$this->view->list_keys = $list_keys;
$list_names = array ('mark_read', 'mark_favorite', 'go_website', 'next_entry',
'prev_entry', 'next_page', 'prev_page');
'prev_entry', 'next_page', 'prev_page', 'collapse_entry');
if (Request::isPost ()) {
$shortcuts = Request::param ('shortcuts');

View File

@@ -119,6 +119,7 @@ return array (
'shift_for_first' => '+ <code>shift</code> to skip to the first article of page',
'next_page' => 'Skip to the next page',
'previous_page' => 'Skip to the previous page',
'collapse_article' => 'Collapse current article',
'file_to_import' => 'File to import',
'import' => 'Import',

View File

@@ -119,6 +119,7 @@ return array (
'shift_for_first' => '+ <code>shift</code> pour passer au premier article de la page',
'next_page' => 'Passer à la page suivante',
'previous_page' => 'Passer à la page précédente',
'collapse_article' => 'Refermer l\'article courant',
'file_to_import' => 'Fichier à importer',
'import' => 'Importer',

View File

@@ -323,7 +323,8 @@ class RSSConfigurationDAO extends Model_array {
'mark_favorite' => 'f',
'go_website' => 'space',
'next_entry' => 'j',
'prev_entry' => 'k'
'prev_entry' => 'k',
'collapse_entry' => 'c',
);
public $mail_login = '';
public $mark_when = array (

View File

@@ -54,6 +54,13 @@
</div>
</div>
<div class="form-group">
<label class="group-name" for="collapse_entry"><?php echo Translate::t ('collapse_article'); ?></label>
<div class="group-controls">
<input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?php echo $s['collapse_entry']; ?>" />
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button>

View File

@@ -16,7 +16,8 @@
'mark_favorite:"', $s['mark_favorite'], '",',
'go_website:"', $s['go_website'], '",',
'prev_entry:"', $s['prev_entry'], '",',
'next_entry:"', $s['next_entry'], '"',
'next_entry:"', $s['next_entry'], '",',
'collapse_entry:"', $s['collapse_entry'], '"',
"},\n";
$mail = Session::param ('mail', 'null');

View File

@@ -214,6 +214,10 @@ function next_entry() {
}
}
function collapse_entry() {
$(".flux.active").removeClass("active");
}
function inMarkViewport(flux, box_to_follow, relative_follow) {
var top = flux.position().top;
if (relative_follow) {
@@ -319,6 +323,9 @@ function init_shortcuts() {
}, {
'disable_in_input': true
});
shortcut.add(shortcuts.collapse_entry, function () {
collapse_entry();
});
// Touches de navigation
shortcut.add(shortcuts.prev_entry, prev_entry, {