diff --git a/library/ZendAfi/View/Helper/ListeNotices/Chrono.php b/library/ZendAfi/View/Helper/ListeNotices/Chrono.php index c9e2ab7738ad692d12c98bfd4d50c953ddb14d94..2478c57eb560a5ee4d2dbe13830a9f5e68963314 100644 --- a/library/ZendAfi/View/Helper/ListeNotices/Chrono.php +++ b/library/ZendAfi/View/Helper/ListeNotices/Chrono.php @@ -22,6 +22,12 @@ class ZendAfi_View_Helper_ListeNotices_Chrono extends ZendAfi_View_Helper_ListeN protected static $_id_counter = 0; protected $_timeline_path; + public function init() { + parent::init(); + $this->_timeline_path = BASE_URL . '/public/opac/TimelineJS3-3.5.1/compiled/js/'; + } + + public function loadScript() { Class_ScriptLoader::getInstance() ->addScript($this->_timeline_path . 'timeline-embed.js'); @@ -29,8 +35,6 @@ class ZendAfi_View_Helper_ListeNotices_Chrono extends ZendAfi_View_Helper_ListeN public function listeNotices_Chrono($data, $preferences=[]) { - $this->_timeline_path = BASE_URL . '/public/opac/TimelineJS3-3.5.1/compiled/js/'; - $this->loadScript(); static::$_id_counter = static::$_id_counter + 1;