summaryrefslogtreecommitdiff
path: root/app/App_FrontController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-17 11:59:20 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-17 12:42:46 +0100
commit8c8e5257d8d092822ca956d014ee74521d147744 (patch)
treebabe45b34e8878c4b145bfb6a9e292cc12a1ce24 /app/App_FrontController.php
parentfb5bcbe044a8273d54fdc7bc525106a2ef797fc5 (diff)
Corrige bug chargement JS
Lorsque la vue par défaut était le mode lecture, le JS ne se chargeait pas. La faute au script LazyLoad qui n'était pas chargé correctement
Diffstat (limited to 'app/App_FrontController.php')
-rw-r--r--app/App_FrontController.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/App_FrontController.php b/app/App_FrontController.php
index 2a7b86f1b..b175442d6 100644
--- a/app/App_FrontController.php
+++ b/app/App_FrontController.php
@@ -43,6 +43,12 @@ class App_FrontController extends FrontController {
$this->conf = Session::param ('conf', new RSSConfiguration ());
View::_param ('conf', $this->conf);
Session::_param ('language', $this->conf->language ());
+
+ $output = Request::param ('output');
+ if(!$output) {
+ $output = $this->conf->viewMode();
+ Request::_param ('output', $output);
+ }
}
private function loadStylesAndScripts () {
@@ -53,11 +59,13 @@ class App_FrontController extends FrontController {
}
}
View::appendStyle (Url::display ('/themes/printer/style.css?' . @filemtime(PUBLIC_PATH . '/themes/printer/style.css')), 'print');
+
if (login_is_conf ($this->conf)) {
View::appendScript ('https://login.persona.org/include.js');
}
View::appendScript (Url::display ('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js')));
- if ($this->conf->lazyload () === 'yes' && ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader')) {
+ if ($this->conf->lazyload () === 'yes' &&
+ ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader')) {
View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.lazyload.min.js')));
}
View::appendScript (Url::display ('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js')));