index 4a41a8dc0db2596efd1a16bf04dd87ed74ae353d..2833ce5e36a00fd6df54c821e55528b139cb9da1 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'].']'))).
+ $this->tree.= "<li>".
+ image($config->department_info[$base]['img'])." <a$selected $link>".
+ $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;
}
// Close tree
- for ($i= 0; $i<$last_indent; $i++) {
+ for ($i= 1; $i<$last_indent; $i++) {
$this->tree.= "</li></ul>\n";
}
$this->tree.= "</div>\n";
// Draw submitter if required
if ($this->submitButton) {
- $this->tree.= " <input class='center' type='image' src='images/lists/submit.png' align='middle' title='"._("Submit")."' name='submit_base_".$this->pid."' id='submit_base_".$this->pid."' alt='"._("Submit")."'>";
+ $this->tree.= image('images/lists/submit.png', "submit_base_".$this->pid, _("Submit"));
}
$this->tree.= "<input type='submit' style='display:none' name='submit_tree_base_".$this->pid."' id='submit_tree_base_".$this->pid."'>";
$this->tree.= "<input type='hidden' name='bs_rebase_".$this->pid."' id='bs_rebase_".$this->pid."'>";
return true;
}
+
+ function gennonbreaks($string)
+ {
+ return str_replace('-', '‑', str_replace(' ', ' ', $string));
+ }
+
+
function render()
{
return $this->tree;