aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Paulius Šukys <paul.sukys@gmail.com> 2017-05-22 11:24:52 +0200
committerGravatar Paulius Šukys <paul.sukys@gmail.com> 2017-05-22 11:24:52 +0200
commite98b510cbbccd46eaba683ab8404df123acec38e (patch)
treeb0be41e8021173945095ae3701525797e4460e13 /app
parent431683eb3d118a1072999e899ab2faf3cf58a5e4 (diff)
parent67dd80f84250f7e8b1b39693f5fef2ff27ffb85a (diff)
Merge branch 'master' into dev
Diffstat (limited to 'app')
-rwxr-xr-xapp/Controllers/configureController.php1
-rw-r--r--app/Models/ConfigurationSetter.php4
-rw-r--r--app/i18n/en/conf.php1
-rw-r--r--app/views/configure/reading.phtml10
-rw-r--r--app/views/helpers/javascript_vars.phtml1
5 files changed, 17 insertions, 0 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index e73f106a6..155221d19 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -109,6 +109,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
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 046f54955..70e1dea2e 100644
--- a/app/Models/ConfigurationSetter.php
+++ b/app/Models/ConfigurationSetter.php
@@ -197,6 +197,10 @@ class FreshRSS_ConfigurationSetter {
$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 8f7b31278..f4618a1ff 100644
--- a/app/i18n/en/conf.php
+++ b/app/i18n/en/conf.php
@@ -93,6 +93,7 @@ return array(
'display_categories_unfolded' => 'Show categories folded by default',
'hide_read_feeds' => 'Hide categories & feeds with no unread articles (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 07dabf15f..ebb00c97b 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -108,6 +108,16 @@
<div class="form-group">
<div class="group-controls">
+ <label class="checkbox" for="sides_close_article">
+ <input type="checkbox" name="sides_close_article" id="sides_close_article" value="1"<?php echo FreshRSS_Context::$user_conf->sides_close_article ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->sides_close_article; ?>"/>
+ <?php echo _t('conf.reading.sides_close_article'); ?>
+ <noscript> — <strong><?php echo _t('gen.js.should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
<label class="checkbox" for="reading_confirm">
<input type="checkbox" name="reading_confirm" id="reading_confirm" value="1"<?php echo FreshRSS_Context::$user_conf->reading_confirm ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->reading_confirm; ?>"/>
<?php echo _t('conf.reading.confirm_enabled'); ?>
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 059224305..2da53b679 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -13,6 +13,7 @@ echo htmlspecialchars(json_encode(array(
'auto_load_more' => !!FreshRSS_Context::$user_conf->auto_load_more,
'auto_actualize_feeds' => !!Minz_Session::param('actualize_feeds', false),
'does_lazyload' => !!FreshRSS_Context::$user_conf->lazyload ,
+ 'sides_close_article' => !!FreshRSS_Context::$user_conf->sides_close_article,
'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(),
'html5_notif_timeout' => FreshRSS_Context::$user_conf->html5_notif_timeout,
'auth_type' => FreshRSS_Context::$system_conf->auth_type,