From 0bd6ea1c08c08f653f1c88d349d31fbdcfce1d7f Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 17 Nov 2013 11:59:20 +0100 Subject: Corrige bug chargement JS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app/App_FrontController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/App_FrontController.php') diff --git a/app/App_FrontController.php b/app/App_FrontController.php index 902ae4613..483bae567 100644 --- a/app/App_FrontController.php +++ b/app/App_FrontController.php @@ -47,6 +47,12 @@ class App_FrontController extends FrontController { View::_param ('nb_not_read', $entryDAO->countNotRead ()); Session::_param ('language', $this->conf->language ()); + + $output = Request::param ('output'); + if(!$output) { + $output = $this->conf->viewMode(); + Request::_param ('output', $output); + } } private function loadStylesAndScripts () { @@ -57,11 +63,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'))); -- cgit v1.2.3