Added additional configuration setting for #1530 . This includes default settings and translation entry for English

pull/1537/head
Paulius Šukys 7 years ago
parent be0bcfef7e
commit 67dd80f842
  1. 1
      app/Controllers/configureController.php
  2. 4
      app/Models/ConfigurationSetter.php
  3. 1
      app/i18n/en/conf.php
  4. 10
      app/views/configure/reading.phtml
  5. 1
      app/views/helpers/javascript_vars.phtml
  6. 1
      data/users/_/config.default.php
  7. 8
      p/scripts/main.js

@ -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->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->onread_jump_next = Minz_Request::param('onread_jump_next', false);
FreshRSS_Context::$user_conf->lazyload = Minz_Request::param('lazyload', 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->sticky_post = Minz_Request::param('sticky_post', false);
FreshRSS_Context::$user_conf->reading_confirm = Minz_Request::param('reading_confirm', 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); FreshRSS_Context::$user_conf->auto_remove_article = Minz_Request::param('auto_remove_article', false);

@ -197,6 +197,10 @@ class FreshRSS_ConfigurationSetter {
$data['hide_read_feeds'] = $this->handleBool($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) { private function _lazyload(&$data, $value) {
$data['lazyload'] = $this->handleBool($value); $data['lazyload'] = $this->handleBool($value);
} }

@ -93,6 +93,7 @@ return array(
'display_categories_unfolded' => 'Show categories folded by default', '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)', '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', '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)', 'jump_next' => 'jump to next unread sibling (feed or category)',
'number_divided_when_reader' => 'Divided by 2 in the reading view.', 'number_divided_when_reader' => 'Divided by 2 in the reading view.',
'read' => array( 'read' => array(

@ -106,6 +106,16 @@
</div> </div>
</div> </div>
<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="form-group">
<div class="group-controls"> <div class="group-controls">
<label class="checkbox" for="reading_confirm"> <label class="checkbox" for="reading_confirm">

@ -13,6 +13,7 @@ echo htmlspecialchars(json_encode(array(
'auto_load_more' => !!FreshRSS_Context::$user_conf->auto_load_more, 'auto_load_more' => !!FreshRSS_Context::$user_conf->auto_load_more,
'auto_actualize_feeds' => !!Minz_Session::param('actualize_feeds', false), 'auto_actualize_feeds' => !!Minz_Session::param('actualize_feeds', false),
'does_lazyload' => !!FreshRSS_Context::$user_conf->lazyload , 'does_lazyload' => !!FreshRSS_Context::$user_conf->lazyload ,
'sides_close_article' => !!FreshRSS_Context::$user_conf->sides_close_article,
'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(), 'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(),
'html5_notif_timeout' => FreshRSS_Context::$user_conf->html5_notif_timeout, 'html5_notif_timeout' => FreshRSS_Context::$user_conf->html5_notif_timeout,
'auth_type' => FreshRSS_Context::$system_conf->auth_type, 'auth_type' => FreshRSS_Context::$system_conf->auth_type,

@ -22,6 +22,7 @@ return array (
'hide_read_feeds' => true, 'hide_read_feeds' => true,
'onread_jump_next' => true, 'onread_jump_next' => true,
'lazyload' => true, 'lazyload' => true,
'sides_close_article' => false,
'sticky_post' => true, 'sticky_post' => true,
'reading_confirm' => false, 'reading_confirm' => false,
'auto_remove_article' => false, 'auto_remove_article' => false,

@ -705,6 +705,13 @@ function init_stream(divStream) {
if ($(e.target).closest('.content, .item.website, .item.link').length > 0) { if ($(e.target).closest('.content, .item.website, .item.link').length > 0) {
return; return;
} }
// setting for not-closing after clicking outside article area
if (context.sides_close_article &&
e.target.tagName.toUpperCase() === 'DIV' &&
$.inArray("flux_content", e.target.attributes)) {
return;
}
var old_active = $(".flux.current"), var old_active = $(".flux.current"),
new_active = $(this).parent(); new_active = $(this).parent();
isCollapsed = true; isCollapsed = true;
@ -714,6 +721,7 @@ function init_stream(divStream) {
} }
return true; return true;
} }
toggleContent(new_active, old_active); toggleContent(new_active, old_active);
}); });

Loading…
Cancel
Save