summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5341379)
raw | patch | inline | side by side (parent: 5341379)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Mar 2006 13:14:27 +0000 (13:14 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Mar 2006 13:14:27 +0000 (13:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2833 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index 7c47cb0b1b3b6fc334b2b15ca925e488081b16fd..e4eb153d7fb7b22e5bae64a7f568ae197637a29f 100644 (file)
"logiinetnav", "logiinternet", "macintosh", "microsoft",
"microsoftpro", "omnikey101", "pc101", "pc102", "pc104",
"pc105", "rapidaccess", "rapidaccess2", "winbook");
- var $XKbLayouts= array ("default", "de", "intl", "us");
+ var $XKbLayouts= array ("default"=>"default","de"=> "de","intl" =>"intl","us" =>"us");
var $XKbVariants= array ("default", "nodeadkeys", "basic");
var $MouseTypes= array("AUTO", "ImPS/2", "PS/2", "Microsoft", "Logitech");
var $MousePorts= array("AUTO", "/dev/ttyS0", "/dev/ttyS1", "/dev/psaux", "/dev/input/mice");
{
plugin::plugin ($config, $dn);
+
+ /* try to read additional keyboard layouts
+ */
+ if(file_exists(CONFIG_DIR."/keyboardLayouts")){
+ if(is_readable(CONFIG_DIR."/keyboardLayouts")){
+ $str = file_get_contents(CONFIG_DIR."/keyboardLayouts");
+ $tmp = split("\n",$str);
+ foreach($tmp as $entry){
+ if((!empty($entry)) && (!preg_match("/^#/",$entry))){
+ $entry = trim($entry);
+ $tmp2 = split ("\:",$entry);
+ $la = trim($tmp2[0]); // What would be saved to ldap
+ $da = trim($tmp2[1]); // This wis displayed in the listbox
+ $this->XKbLayouts [ $la] = $da;
+ }
+ }
+ }
+ }
+
/* Load scanner models */
$fcontents = file ($this->config->basedir."/include/scanner.inc");
while (list ($line_num, $line) = each ($fcontents)) {
/* Arrays */
foreach(array("XMethods", "XDrivers", "XResolutions", "XColordepths",
- "gotoScannerModels", "XKbModels", "XKbLayouts", "XKbVariants",
+ "gotoScannerModels", "XKbModels","XKbVariants",
"MouseTypes", "MousePorts") as $val){
$smarty->assign("$val", $this->$val);
}
+ $smarty->assign("XKbLayouts", $this->XKbLayouts);
+ $smarty->assign("XKbLayoutKeys",array_flip($this->XKbLayouts));
+
$smarty->assign("xdmcpservers", $this->config->data['SERVERS']['TERMINAL']);
$smarty->assign("fontservers", $this->config->data['SERVERS']['FONT']);
$smarty->assign("nfsservers", $this->config->data['SERVERS']['NFS']);
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 6572c3fdbe8f8bec9eb3de34301409d215f83f97..2359b8566cb8eaebaf6738b4d9e7bc1e154c9dce 100644 (file)
"logiinetnav", "logiinternet", "macintosh", "microsoft",
"microsoftpro", "omnikey101", "pc101", "pc102", "pc104",
"pc105", "rapidaccess", "rapidaccess2", "winbook");
- var $XKbLayouts= array ("default", "de", "intl", "us");
+
+ /* Additional values will be extracted from /etc/gosa/keyboardLayouts */
+ var $XKbLayouts= array ("default"=>"default","de"=> "de","intl" =>"intl","us" =>"us");
var $XKbVariants= array ("default", "nodeadkeys", "basic");
var $MouseTypes= array("AUTO", "ImPS/2", "PS/2", "Microsoft", "Logitech");
var $MousePorts= array("AUTO", "/dev/ttyS0", "/dev/ttyS1", "/dev/psaux", "/dev/input/mice");
{
plugin::plugin ($config, $dn);
+ /* try to read additional keyboard layouts
+ */
+ if(file_exists(CONFIG_DIR."/keyboardLayouts")){
+ if(is_readable(CONFIG_DIR."/keyboardLayouts")){
+ $str = file_get_contents(CONFIG_DIR."/keyboardLayouts");
+ $tmp = split("\n",$str);
+ foreach($tmp as $entry){
+ if((!empty($entry)) && (!preg_match("/^#/",$entry))){
+ $entry = trim($entry);
+ $tmp2 = split ("\:",$entry);
+ $la = trim($tmp2[0]); // What would be saved to ldap
+ $da = trim($tmp2[1]); // This wis displayed in the listbox
+ $this->XKbLayouts [ $la] = $da;
+ }
+ }
+ }
+ }
+
/* Initialize methods */
$this->XMethods["default"]= _("default");
$this->XMethods["indirect"]= _("show chooser");
/* Arrays */
foreach(array("XMethods", "XDrivers", "XResolutions", "XColordepths",
- "XKbModels", "XKbLayouts", "XKbVariants",
+ "XKbModels", "XKbVariants",
"MouseTypes", "MousePorts") as $val){
$smarty->assign("$val", $this->$val);
}
+ $smarty->assign("XKbLayouts" ,$this->XKbLayouts);
+ $smarty->assign("XKbLayoutKeys" ,array_flip($this->XKbLayouts));
+
$smarty->assign("xdmcpservers", $this->config->data['SERVERS']['TERMINAL']);
$smarty->assign("fontservers", $this->config->data['SERVERS']['FONT']);
$smarty->assign("nfsservers", $this->config->data['SERVERS']['NFS']);
index fc856c88853456b17c18795e722867802111ddee..c757803949141646bfa0763ab1d929c837987211 100644 (file)
<td><LABEL for="gotoXKbLayout">{t}Layout{/t}</LABEL></td>
<td>
<select id="gotoXKbLayout" name="gotoXKbLayout" title="{t}Choose keyboard layout{/t}" {$gotoXKbLayoutACL}>
- {html_options values=$XKbLayouts output=$XKbLayouts selected=$gotoXKbLayout_select}
+ {html_options values=$XKbLayoutKeys output=$XKbLayouts selected=$gotoXKbLayout_select}
</select>
</td>
</tr>
diff --git a/plugins/admin/systems/workstationService.tpl b/plugins/admin/systems/workstationService.tpl
index 3346fca5ff807cf3110d448a1bf40a30cbe4e906..08d598125fbdea20dbb3ce415bd361d9fbb484d5 100644 (file)
<td><LABEL for="gotoXKbLayout">{t}Layout{/t}</LABEL></td>
<td>
<select id="gotoXKbLayout" name="gotoXKbLayout" title="{t}Choose keyboard layout{/t}" {$gotoXKbLayoutACL}>
- {html_options values=$XKbLayouts output=$XKbLayouts selected=$gotoXKbLayout_select}
+ {html_options values=$XKbLayoutKeys output=$XKbLayouts selected=$gotoXKbLayout_select}
</select>
</td>
</tr>