A free, self-hostable news aggregator…
Load feed configuration on the same page
Marien Fressinaud7481887db746
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.phpindex a7def6d9a..dd7a0a441 100755--- a/app/Controllers/configureController.php+++ b/app/Controllers/configureController.php@@ -90,6 +90,10 @@ class FreshRSS_configure_Controller extends Minz_ActionController {* Default values are empty strings unless specified.*/public function feedAction() {+ if (Minz_Request::param('ajax')) {+ $this->view->_useLayout(false);+ }+$catDAO = new FreshRSS_CategoryDAO();$this->view->categories = $catDAO->listCategories(false);diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtmlindex 8f77f9724..008dc8c98 100644--- a/app/views/configure/categorize.phtml+++ b/app/views/configure/categorize.phtml@@ -73,7 +73,7 @@$empty = $feed->nbEntries() == 0 ? ' empty' : '';?><li class="item<?php echo $error, $empty; ?>">- <a class="configure" href="<?php echo _url('configure', 'feed', 'id', $feed->id()); ?>"><?php echo _i('configure'); ?></a>+ <a class="configure open-slider" href="<?php echo _url('configure', 'feed', 'id', $feed->id()); ?>"><?php echo _i('configure'); ?></a><img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <?php echo $feed->name(); ?></li><?php }@@ -85,3 +85,6 @@</div><?php } ?></div>++<div id="slider">+</div>diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtmlindex e96a28739..f58ac65af 100644--- a/app/views/configure/feed.phtml+++ b/app/views/configure/feed.phtml@@ -1,8 +1,12 @@-<?php $this->partial ('aside_feed'); ?>+<?php+ if (!Minz_Request::param('ajax')) {+ $this->partial('aside_feed');+ }+?><?php if ($this->flux) { ?><div class="post">- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a> <?php echo Minz_Translate::t ('or'); ?> <a href="<?php echo _url ('index', 'index', 'get', 'f_' . $this->flux->id ()); ?>"><?php echo Minz_Translate::t ('filter'); ?></a>+ <!-- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a> <?php echo Minz_Translate::t ('or'); ?> <a href="<?php echo _url ('index', 'index', 'get', 'f_' . $this->flux->id ()); ?>"><?php echo Minz_Translate::t ('filter'); ?></a> --><h1><?php echo $this->flux->name (); ?></h1><?php echo $this->flux->description (); ?>diff --git a/p/scripts/main.js b/p/scripts/main.jsindex f6d5d2907..7fed7a819 100644--- a/p/scripts/main.js+++ b/p/scripts/main.js@@ -1240,6 +1240,35 @@ function faviconNbUnread(n) {}}+function init_slider_observers() {+ var slider = $('#slider');+ if (slider.length < 1) {+ return;+ }++ $('.open-slider').on('click', function() {+ if (ajax_loading) {+ return false;+ }++ ajax_loading = true;++ var url_slide = $(this).attr('href');++ $.ajax({+ type: 'GET',+ url: url_slide,+ data : { ajax: true }+ }).done(function (data) {+ slider.html(data);+ slider.show();+ ajax_loading = false;+ });++ return false;+ })+}+function init_all() {if (!(window.$ && window.url_freshrss)) {if (window.console) {@@ -1275,6 +1304,7 @@ function init_all() {init_feed_observers();init_password_observers();init_stats_observers();+ init_slider_observers();}if (window.console) {diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.cssindex a5a29ab23..397f943a6 100644--- a/p/themes/base-theme/template.css+++ b/p/themes/base-theme/template.css@@ -645,6 +645,11 @@ br + br + br {display: none;}+/*=== Slider */+#slider {+ min-height: 50px;+}+/*=== DIVERS *//*===========*/.nav-login,