Fix javascript output in Nag
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Nov 2010 08:13:27 +0000 (01:13 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Nov 2010 08:13:27 +0000 (01:13 -0700)
nag/templates/common-header.inc

index 7c8c692..9917491 100644 (file)
@@ -14,8 +14,13 @@ if (!empty($title)) {
     $page_title .= ' :: ' . $title;
 }
 
+Horde::addInlineJsVars(array(
+    '-var Nag' => '{}'
+), array('top' => true));
+
 Horde::outputMetaTags();
 Horde::includeScriptFiles();
+Horde::outputInlineScript();
 
 Horde::addStylesheetFile($registry->get('themesfs') . '/categoryCSS.php', $registry->get('themesuri') . '/categoryCSS.php');
 
@@ -27,9 +32,6 @@ $bc = $prefs->getValue('show_panel')
 <title><?php echo htmlspecialchars($page_title) ?></title>
 <link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <?php Horde_Themes::includeStylesheetFiles() ?>
-<script type="text/javascript">
-var Nag = {};
-</script>
 </head>
 
 <body<?php if ($bc) echo ' class="' . $bc . '"' ?>>