diff options
| author | 2022-05-15 21:52:52 +0200 | |
|---|---|---|
| committer | 2022-05-15 21:52:52 +0200 | |
| commit | 807ea755e0bddb814f5c55bdfa5321ce144fe816 (patch) | |
| tree | ac19704b8bea917d06fca95aecff828db804b204 /app | |
| parent | 0cde4e898f94a10b5da7a221d5ddab904e0f2b1d (diff) | |
fix preview (#4291)
* fix
* Update extra.js
* reorga the scripts
* Update extra.js
* Several fixes
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1125472321
* More fixes
* Cleaning
* fix pr 4291
* Reorganise some script functions
* Remove unused popup-txt
And associated function openPopupWithMessage
* Fix archiving categories
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126924602
* Fix stats
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126983134
* Fix direct subscription
E.g. http://localhost/i/?c=subscription&id=735
* Fix subscription add
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126991621
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app')
| -rw-r--r-- | app/Controllers/statsController.php | 1 | ||||
| -rw-r--r-- | app/Controllers/subscriptionController.php | 4 | ||||
| -rw-r--r-- | app/layout/layout.phtml | 13 | ||||
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 13 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 4 |
5 files changed, 21 insertions, 14 deletions
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index a50a35343..be29bfac4 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -131,6 +131,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { * - last week */ public function idleAction() { + FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js'))); $feed_dao = FreshRSS_Factory::createFeedDao(); $statsDAO = FreshRSS_Factory::createStatsDAO(); $feeds = $statsDAO->calculateFeedLastDate(); diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 60a433f50..1994a2164 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -45,6 +45,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { */ public function indexAction() { FreshRSS_View::appendScript(Minz_Url::display('/scripts/category.js?' . @filemtime(PUBLIC_PATH . '/scripts/category.js'))); + FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js'))); FreshRSS_View::prependTitle(_t('sub.title') . ' · '); $this->view->onlyFeedsWithError = Minz_Request::paramTernary('error'); @@ -90,6 +91,8 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { public function feedAction() { if (Minz_Request::param('ajax')) { $this->view->_layout(false); + } else { + FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js'))); } $feedDAO = FreshRSS_Factory::createFeedDao(); @@ -323,6 +326,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { * This action displays the page to add a new feed */ public function addAction() { + FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js'))); FreshRSS_View::prependTitle(_t('sub.title.add') . ' . '); } } diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index e0519960e..f1a84e134 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -77,18 +77,5 @@ if (_t('gen.dir') === 'rtl') { <span class="msg"><?= $msg ?></span> <a class="close" href=""><?= _i('close') ?></a> </div> - -<!-- Popup--> -<div id="popup"> - <div id="popup-content"> - <div id="popup-close" class="popup-row">×</div> - <div id="popup-txt" class="popup-row"></div> - <div id="popup-iframe-container" class="popup-row"> - <div id="popup-iframe-sub"> - <iframe id="popup-iframe" frameborder="0"></iframe> - </div> - </div> - </div> -</div> </body> </html> diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 4c117bdea..da4e04e50 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -1,5 +1,5 @@ <?php /** @var FreshRSS_View $this */ ?> -<div class="post"> +<div class="post" id="feed_update"> <h1><?= $this->feed->name() ?></h1> <div> @@ -591,3 +591,14 @@ </div> </form> </div> + +<div id="popup"> + <div id="popup-content"> + <div id="popup-close" class="popup-row">×</div> + <div id="popup-iframe-container" class="popup-row"> + <div id="popup-iframe-sub"> + <iframe id="popup-iframe" frameborder="0"></iframe> + </div> + </div> + </div> +</div> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 5d78890f3..99437c7a6 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -22,6 +22,10 @@ echo htmlspecialchars(json_encode(array( 'auth_type' => FreshRSS_Context::$system_conf->auth_type, 'current_view' => Minz_Request::actionName(), 'csrf' => FreshRSS_Auth::csrfToken(), + 'mtime' => [ + 'extra.js' => @filemtime(PUBLIC_PATH . '/scripts/extra.js'), + 'feed.js' => @filemtime(PUBLIC_PATH . '/scripts/feed.js'), + ], ), 'shortcuts' => array( 'actualize' => @$s['actualize'], |
