From: cajus Date: Wed, 3 Feb 2010 18:37:34 +0000 (+0000) Subject: Updated styles, autoselector and base selector X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e84607cf5728e38f073596a7656c154ed1ebf447;p=gosa.git Updated styles, autoselector and base selector git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15583 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/autocomplete.php b/gosa-core/html/autocomplete.php index 7db6f2573..caaa3a0c1 100644 --- a/gosa-core/html/autocomplete.php +++ b/gosa-core/html/autocomplete.php @@ -36,13 +36,29 @@ if (!session::global_is_set('ui')){ /* Base completition or filter completition? */ if (isset($_GET['type']) && $_GET['type'] == "base") { + + // Find dn based on name and description if (session::is_set("pathMapping") && count($_POST) == 1) { $res= ""; $pathMapping= session::get("pathMapping"); $search= preg_replace('/"/', '"', current($_POST)); - foreach ($pathMapping as $key => $value) { - if (mb_stristr($value, $search) !== false) { - $res.= "
  • $value
  • "; + + $config = session::global_get('config'); + foreach ($config->department_info as $dn => $info) { + if (!isset($pathMapping[$dn])) { + continue; + } + if (mb_stristr($info['name'], $search) !== false) { + $res.= "
  • ".$pathMapping[$dn].($info['description']==''?"":" [".$info['description']."]")."
  • "; + continue; + } + if (mb_stristr($info['description'], $search) !== false) { + $res.= "
  • ".$pathMapping[$dn].($info['description']==''?"":" [".$info['description']."]")."
  • "; + continue; + } + if (mb_stristr($pathMapping[$dn], $search) !== false) { + $res.= "
  • ".$pathMapping[$dn].($info['description']==''?"":" [".$info['description']."]")."
  • "; + continue; } } @@ -54,7 +70,6 @@ if (isset($_GET['type']) && $_GET['type'] == "base") { } else { - $config = session::global_get('config'); $ui = session::global_get('ui'); /* Is there a filter object arround? */ diff --git a/gosa-core/html/themes/default/style.css b/gosa-core/html/themes/default/style.css index 74e8185e6..302d4f1fd 100644 --- a/gosa-core/html/themes/default/style.css +++ b/gosa-core/html/themes/default/style.css @@ -1998,8 +1998,12 @@ overflow-y:auto; float:left; } +span.informal { +color:#444; +font-style:italic; +} + /* Max height for IE */ * html div.treeList { - height: expression( this.scrollHeight > 500 ? "500px" : "auto" ); +height: expression( this.scrollHeight > 500 ? "500px" : "auto" ); } - diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc index 4a41a8dc0..d0b9eab7b 100644 --- a/gosa-core/include/class_baseSelector.inc +++ b/gosa-core/include/class_baseSelector.inc @@ -186,9 +186,9 @@ class baseSelector { $selected= $this->base == $base?" class='treeListSelected'":""; $link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($base)."';$('submit_tree_base_".$this->pid."').click();\""; $this->tree.= "
  • ". - " ". - str_replace('-', '‑', str_replace(' ', ' ', $config->department_info[$base]['name']. - ($config->department_info[$base]['description']==''?'':' ['.$config->department_info[$base]['description'].']'))). + " ". + $this->gennonbreaks($config->department_info[$base]['name']). + ($config->department_info[$base]['description']==''?'':' ['.$this->gennonbreaks($config->department_info[$base]['description']).']'). ""; $last_indent= $indent; @@ -213,6 +213,13 @@ class baseSelector { return true; } + + function gennonbreaks($string) + { + return str_replace('-', '‑', str_replace(' ', ' ', $string)); + } + + function render() { return $this->tree;