Code

Added switch to disable dojo support. Nevertheless it's enabled by default.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Nov 2007 12:32:39 +0000 (12:32 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Nov 2007 12:32:39 +0000 (12:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7942 594d385d-05f5-0310-b6e9-bd551577e9d8

html/index.php
html/main.php
ihtml/themes/default/headers.tpl
plugins/personal/generic/generic.tpl

index 67d3c08267dc230d6dda57a2c48c82c9bef30bc5..d17234135099f5f4d9813c9db7e63923c64b660f 100644 (file)
@@ -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!"),
index fe78ce1c1bb866c419c86879b535b35b37fdf1bc..5930e4032cd0b3186c9412eb29929fd05d91291b 100644 (file)
@@ -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'));
index 8f5a24c155263f7ff90140b69ef6057ff8b9ed52..ddefbb27c4712dd519b30f85c5b02f2a31745d66 100644 (file)
 
   <style type="text/css">
        @import url('themes/default/style.css');
+       {if $dojo}
        @import url('include/dojo/dijit/themes/tundra/tundra.css');
        @import url('include/dojo/dojo/resources/dojo.css');
+       {/if}
   </style>
   <link rel="shortcut icon" href="favicon.ico">
 
@@ -31,6 +33,7 @@
   <script language="javascript" src="include/layersmenu-browser_detection.js" type="text/javascript"></script>
   <script language="javascript" src="include/layersmenu-library.js" type="text/javascript"></script>
   <script language="javascript" src="include/layersmenu.js" type="text/javascript"></script>
+  {if $dojo}
   <script language="javascript" src="include/dojo/dojo/dojo.js" type="text/javascript" djConfig="parseOnLoad: true"></script>
 
   <script type="text/javascript">
@@ -38,5 +41,7 @@
        dojo.require("dijit.form.TextBox");
        dojo.require("dijit.form.ValidationTextBox");
   </script>
+  {/if}
+
 </head>
 
index e0633baa06600f25be78f94b7e6a9b575b9ec70d..ed1be101b233e73572ab1050f20fb711b3ec41f3 100644 (file)
 
 <input type=hidden name="generic">
 
+{if $dojo}
 {literal}
 <!-- Place cursor -->
 <script language="JavaScript" type="text/javascript">
   -->
 </script>
 {/literal}
+{else}
+<!-- Place cursor -->
+<script language="JavaScript" type="text/javascript">
+  <!-- // First input field on page
+        focus_field('sn');
+       if (document.mainform.yearSel != "")
+                               populate(document.mainform,document.mainform.dateOfBirth);
+  -->
+</script>
+{/if}