From 67dd80f84250f7e8b1b39693f5fef2ff27ffb85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulius=20=C5=A0ukys?= Date: Mon, 22 May 2017 09:33:55 +0200 Subject: [PATCH 1/8] Added additional configuration setting for #1530 . This includes default settings and translation entry for English --- app/Controllers/configureController.php | 1 + app/Models/ConfigurationSetter.php | 4 ++++ app/i18n/en/conf.php | 1 + app/views/configure/reading.phtml | 10 ++++++++++ app/views/helpers/javascript_vars.phtml | 1 + data/users/_/config.default.php | 1 + p/scripts/main.js | 8 ++++++++ 7 files changed, 26 insertions(+) diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index e73f106a6b1..155221d19e8 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -109,6 +109,7 @@ public function readingAction() { FreshRSS_Context::$user_conf->hide_read_feeds = Minz_Request::param('hide_read_feeds', false); FreshRSS_Context::$user_conf->onread_jump_next = Minz_Request::param('onread_jump_next', false); FreshRSS_Context::$user_conf->lazyload = Minz_Request::param('lazyload', false); + FreshRSS_Context::$user_conf->sides_close_article = Minz_Request::param('sides_close_article', false); FreshRSS_Context::$user_conf->sticky_post = Minz_Request::param('sticky_post', false); FreshRSS_Context::$user_conf->reading_confirm = Minz_Request::param('reading_confirm', false); FreshRSS_Context::$user_conf->auto_remove_article = Minz_Request::param('auto_remove_article', false); diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index 046f54955cb..70e1dea2e70 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -197,6 +197,10 @@ private function _hide_read_feeds(&$data, $value) { $data['hide_read_feeds'] = $this->handleBool($value); } + private function _sides_close_article(&$data, $value) { + $data['sides_close_article'] = $this->handleBool($value); + } + private function _lazyload(&$data, $value) { $data['lazyload'] = $this->handleBool($value); } diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index b5ab7351089..032c5fe4c70 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -93,6 +93,7 @@ 'display_categories_unfolded' => 'Show categories folded by default', 'hide_read_feeds' => 'Hide categories & feeds with no unread article (does not work with “Show all articles” configuration)', 'img_with_lazyload' => 'Use "lazy load" mode to load pictures', + 'sides_close_article' => 'Clicking outside of article text area closes the article', 'jump_next' => 'jump to next unread sibling (feed or category)', 'number_divided_when_reader' => 'Divided by 2 in the reading view.', 'read' => array( diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index 07dabf15fc7..ebb00c97bb8 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -106,6 +106,16 @@ +
+
+ +
+
+