no extra white space for image-only buttons

This commit is contained in:
Roland Gruber 2014-03-06 20:08:44 +00:00
parent dfec83853e
commit 5c58d2c140
1 changed files with 4 additions and 1 deletions

View File

@ -2683,7 +2683,10 @@ class htmlLink extends htmlElement {
function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) { function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
$image = ''; $image = '';
if ($this->image != null) { if ($this->image != null) {
$image = '<img class="align-middle" src="' . $this->image . '" alt="' . $this->text . '">&nbsp;'; $image = '<img class="align-middle" src="' . $this->image . '" alt="' . $this->text . '">';
if (!empty($this->text)) {
$image .= '&nbsp;';
}
} }
$title = ''; $title = '';
if ($this->title != null) { if ($this->title != null) {