summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1f634b)
raw | patch | inline | side by side (parent: d1f634b)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 3 Feb 2010 18:37:34 +0000 (18:37 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 3 Feb 2010 18:37:34 +0000 (18:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15583 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/autocomplete.php | patch | blob | history | |
gosa-core/html/themes/default/style.css | patch | blob | history | |
gosa-core/include/class_baseSelector.inc | patch | blob | history |
index 7db6f25736b178d5b0abb932edf584c0fc38441c..caaa3a0c137d2be62b6ad30767a358f232e6a62a 100644 (file)
/* 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.= "<li>$value</li>";
+
+ $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.= "<li>".$pathMapping[$dn].($info['description']==''?"":"<span class='informal'> [".$info['description']."]</span>")."</li>";
+ continue;
+ }
+ if (mb_stristr($info['description'], $search) !== false) {
+ $res.= "<li>".$pathMapping[$dn].($info['description']==''?"":"<span class='informal'> [".$info['description']."]</span>")."</li>";
+ continue;
+ }
+ if (mb_stristr($pathMapping[$dn], $search) !== false) {
+ $res.= "<li>".$pathMapping[$dn].($info['description']==''?"":"<span class='informal'> [".$info['description']."]</span>")."</li>";
+ continue;
}
}
} else {
- $config = session::global_get('config');
$ui = session::global_get('ui');
/* Is there a filter object arround? */
index 74e8185e60dd3f11503fb6a1922e136a2501d065..302d4f1fd9eb60061a7d233dc698ae8b8d28d1db 100644 (file)
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" );
}
-
index 4a41a8dc0db2596efd1a16bf04dd87ed74ae353d..d0b9eab7b568bba5f1659c2f5b265d3880e46a33 100644 (file)
$selected= $this->base == $base?" class='treeListSelected'":"";
$link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($base)."';$('submit_tree_base_".$this->pid."').click();\"";
$this->tree.= "<li><a$selected $link>".
- "<img src='".$config->department_info[$base]['img']."'> ".
- str_replace('-', '‑', str_replace(' ', ' ', $config->department_info[$base]['name'].
- ($config->department_info[$base]['description']==''?'':' ['.$config->department_info[$base]['description'].']'))).
+ "<img class='center' src='".$config->department_info[$base]['img']."'> ".
+ $this->gennonbreaks($config->department_info[$base]['name']).
+ ($config->department_info[$base]['description']==''?'':' <span class="informal">['.$this->gennonbreaks($config->department_info[$base]['description']).']</span>').
"</a>";
$last_indent= $indent;
return true;
}
+
+ function gennonbreaks($string)
+ {
+ return str_replace('-', '‑', str_replace(' ', ' ', $string));
+ }
+
+
function render()
{
return $this->tree;