From: Michael M Slusarz Date: Tue, 4 Aug 2009 19:39:20 +0000 (-0600) Subject: Lump the IMP/DIMP variables with any other scripts already pushed onto X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=475fc7fc0cf3e3ddad08ffea5dd3aa28b16334f4;p=horde.git Lump the IMP/DIMP variables with any other scripts already pushed onto the stack. --- diff --git a/imp/templates/common-header.inc b/imp/templates/common-header.inc index 0145e1fd9..ce169792e 100644 --- a/imp/templates/common-header.inc +++ b/imp/templates/common-header.inc @@ -1,4 +1,19 @@ ' : '') . ''; + $page_title = $GLOBALS['registry']->get('name'); -if (!empty($title)) $page_title .= ' :: ' . $title; + +if (!empty($title)) { + $page_title .= ' :: ' . $title; +} + if (!empty($refresh_time) && !empty($refresh_url)) { echo "\n"; } -$imp_view = Horde_Util::nonInputVar('imp_view'); + switch ($imp_view) { case 'dimp': $css = array(); @@ -25,13 +45,11 @@ case 'dimp': } } Horde::includeStylesheetFiles(array('additional' => $css, 'sub' => 'dimp')); - include IMP_TEMPLATES . '/javascript_defs_dimp.php'; break; default: Horde::includeStylesheetFiles(); Horde::includeScriptFiles(); - include IMP_TEMPLATES . '/javascript_defs.php'; break; } ?> diff --git a/imp/templates/javascript_defs.php b/imp/templates/javascript_defs.php index eb109799a..d931254a7 100644 --- a/imp/templates/javascript_defs.php +++ b/imp/templates/javascript_defs.php @@ -73,4 +73,6 @@ $code = array( ) ); -echo Horde::wrapInlineScript(array('var IMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()) . ';')); +Horde::addInlineScript(array( + 'var IMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()) +)); diff --git a/imp/templates/javascript_defs_dimp.php b/imp/templates/javascript_defs_dimp.php index 2627b9b50..7a47519e1 100644 --- a/imp/templates/javascript_defs_dimp.php +++ b/imp/templates/javascript_defs_dimp.php @@ -158,4 +158,6 @@ if ($compose_mode) { ); } -echo Horde::wrapInlineScript(array('var DIMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()))); +Horde::addInlineScript(array( + 'var DIMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()) +));