omit unit, when no size is given; display unit to the user, so he knows what he is selecting

This commit is contained in:
Klaus Leithoff 2013-02-22 09:46:31 +00:00
parent 945f256e1b
commit 8b740d21ff

View File

@ -72,7 +72,7 @@ class egw_ckeditor_config
$unit = 'px'; $unit = 'px';
$size = (string)(int)$size; $size = (string)(int)$size;
} }
return $size.$unit; return $size.($size?$unit:'');
} }
/** /**
@ -228,7 +228,7 @@ class egw_ckeditor_config
if (empty($unit)) $unit = 'px'; if (empty($unit)) $unit = 'px';
foreach(self::$font_size_options as $k => $v) foreach(self::$font_size_options as $k => $v)
{ {
$config['fontSize_sizes'] .= $v.'/'.$k.$unit.';'; $config['fontSize_sizes'] .= $v.$unit.'/'.$k.$unit.';';
} }
} }