From 7b17c60bb18b122f3d14795780f4642717cfd81b Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 24 Aug 2014 11:34:58 -0400 Subject: [PATCH 1/3] Add shortcuts Add a shortcut to open the wiki. Shortcut is F1 and is not modifiable. Add a shortcut to access user filters the same way to access share actions. --- app/Controllers/configureController.php | 2 +- app/Models/Configuration.php | 2 + app/i18n/en.php | 2 + app/i18n/fr.php | 2 + app/layout/nav_menu.phtml | 2 +- app/views/configure/shortcut.phtml | 8 ++++ app/views/helpers/javascript_vars.phtml | 7 +++- constants.php | 1 + p/scripts/main.js | 49 ++++++++++++++++++++++++- 9 files changed, 70 insertions(+), 5 deletions(-) diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index bb96bfae3..461cbceda 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -240,7 +240,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { 'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right', 's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', - '9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', + '9', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12'); $this->view->list_keys = $list_keys; diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 4c804a9fb..989603b20 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -45,6 +45,8 @@ class FreshRSS_Configuration { 'load_more' => 'm', 'auto_share' => 's', 'focus_search' => 'a', + 'user_filter' => 'u', + 'help' => 'f1', ), 'topline_read' => true, 'topline_favorite' => true, diff --git a/app/i18n/en.php b/app/i18n/en.php index be0cdc642..76da5d182 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -180,6 +180,8 @@ return array ( 'auto_share' => 'Share', 'auto_share_help' => 'If there is only one sharing mode, it is used. Else modes are accessible by their number.', 'focus_search' => 'Access search box', + 'user_filter' => 'Access user filters', + 'user_filter_help' => 'If there is only one user filter, it is used. Else filters are accessible by their number.', 'file_to_import' => 'File to import
(OPML, Json or Zip)', 'file_to_import_no_zip' => 'File to import
(OPML or Json)', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 08f12234e..a8f7a3a98 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -180,6 +180,8 @@ return array ( 'auto_share' => 'Partager', 'auto_share_help' => 'S’il n’y a qu’un mode de partage, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.', 'focus_search' => 'Accéder à la recherche', + 'user_filter' => 'Accéder aux filtres utilisateur', + 'user_filter_help' => 'S’il n’y a qu’un filtre utilisateur, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.', 'file_to_import' => 'Fichier à importer
(OPML, Json ou Zip)', 'file_to_import_no_zip' => 'Fichier à importer
(OPML ou Json)', diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 25833c16d..7cd15c1a3 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -96,7 +96,7 @@ conf->queries as $query) { ?> -
  • +
  • diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index bfb13f003..73ad0ebb8 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -103,6 +103,14 @@ +
    + +
    + + +
    +
    +
    diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 7144c519a..2144f1576 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -4,7 +4,8 @@ echo '"use strict";', "\n"; $mark = $this->conf->mark_when; echo 'var ', - 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', + 'help_url="', FRESHRSS_WIKI, '"', + ',hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', ',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"', ',auto_mark_article=', $mark['article'] ? 'true' : 'false', ',auto_mark_site=', $mark['site'] ? 'true' : 'false', @@ -25,7 +26,9 @@ echo ',shortcuts={', 'collapse_entry:"', $s['collapse_entry'], '",', 'load_more:"', $s['load_more'], '",', 'auto_share:"', $s['auto_share'], '",', - 'focus_search:"', $s['focus_search'], '"', + 'focus_search:"', $s['focus_search'], '",', + 'user_filter:"', $s['user_filter'], '",', + 'help:"', $s['help'], '"', "},\n"; if (Minz_Request::param ('output') === 'global') { diff --git a/constants.php b/constants.php index e32b8cbc3..483989371 100644 --- a/constants.php +++ b/constants.php @@ -1,6 +1,7 @@ Date: Sun, 24 Aug 2014 12:46:40 -0400 Subject: [PATCH 2/3] Change wiki url --- constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants.php b/constants.php index 483989371..90c7a38e4 100644 --- a/constants.php +++ b/constants.php @@ -1,7 +1,7 @@ Date: Wed, 27 Aug 2014 21:02:24 -0400 Subject: [PATCH 3/3] Add configuration for help configuration --- app/Controllers/configureController.php | 2 +- app/i18n/en.php | 1 + app/i18n/fr.php | 1 + app/views/configure/shortcut.phtml | 7 +++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 461cbceda..bb96bfae3 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -240,7 +240,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { 'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right', 's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', - '9', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', + '9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12'); $this->view->list_keys = $list_keys; diff --git a/app/i18n/en.php b/app/i18n/en.php index 76da5d182..bcd7a3da5 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -182,6 +182,7 @@ return array ( 'focus_search' => 'Access search box', 'user_filter' => 'Access user filters', 'user_filter_help' => 'If there is only one user filter, it is used. Else filters are accessible by their number.', + 'help' => 'Display documentation', 'file_to_import' => 'File to import
    (OPML, Json or Zip)', 'file_to_import_no_zip' => 'File to import
    (OPML or Json)', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index a8f7a3a98..395f2b5d2 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -182,6 +182,7 @@ return array ( 'focus_search' => 'Accéder à la recherche', 'user_filter' => 'Accéder aux filtres utilisateur', 'user_filter_help' => 'S’il n’y a qu’un filtre utilisateur, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.', + 'help' => 'Afficher la documentation', 'file_to_import' => 'Fichier à importer
    (OPML, Json ou Zip)', 'file_to_import_no_zip' => 'Fichier à importer
    (OPML ou Json)', diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index 73ad0ebb8..a4029b676 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -111,6 +111,13 @@
    +
    + +
    + +
    +
    +