From: cajus Date: Thu, 29 Nov 2007 12:32:39 +0000 (+0000) Subject: Added switch to disable dojo support. Nevertheless it's enabled by default. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2fe3e1c353dde60c77d1c0903bf4ba15b6a06552;p=gosa.git Added switch to disable dojo support. Nevertheless it's enabled by default. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7942 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/index.php b/html/index.php index 67d3c0826..d17234135 100644 --- a/html/index.php +++ b/html/index.php @@ -150,6 +150,16 @@ if (isset ($config->data['MAIN']['COMPILE'])){ } $smarty->assign ('nextfield', 'username'); +/* Setup dojo according to the configuration */ +if (isset ($config->data['MAIN']['DOJO']) && preg_match('/^(no|false)$/i', $config->data['MAIN']['DOJO'])){ + $smarty->assign ('dojo', FALSE); + $_SESSION['DOJO']= FALSE; +} else { + $smarty->assign ('dojo', TRUE); + $_SESSION['DOJO']= TRUE; +} + + /* Check for compile directory */ if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){ msg_dialog::display(_("Smarty"),sprintf(_("Directory '%s' specified as compile directory is not accessible!"), diff --git a/html/main.php b/html/main.php index fe78ce1c1..5930e4032 100644 --- a/html/main.php +++ b/html/main.php @@ -285,6 +285,8 @@ if ($_SESSION['js']==FALSE){ $smarty->assign("help_method"," onclick=\"return popup('helpviewer.php$plug','GOsa help');\""); } +$smarty->assign("dojo", $_SESSION['DOJO']); + $smarty->assign ("username", $ui->username); $smarty->assign ("go_logo", get_template_path('images/go_logo.png')); $smarty->assign ("go_base", get_template_path('images/dtree.png')); diff --git a/ihtml/themes/default/headers.tpl b/ihtml/themes/default/headers.tpl index 8f5a24c15..ddefbb27c 100644 --- a/ihtml/themes/default/headers.tpl +++ b/ihtml/themes/default/headers.tpl @@ -18,8 +18,10 @@ @@ -31,6 +33,7 @@ + {if $dojo} + {/if} + diff --git a/plugins/personal/generic/generic.tpl b/plugins/personal/generic/generic.tpl index e0633baa0..ed1be101b 100644 --- a/plugins/personal/generic/generic.tpl +++ b/plugins/personal/generic/generic.tpl @@ -528,6 +528,7 @@ +{if $dojo} {literal} {/literal} +{else} + + +{/if}