위젯관리시 margin의 경우는 언제든 적용되도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2081 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-30 05:52:04 +00:00
parent c02e4a7523
commit 74563e253c
4 changed files with 33 additions and 22 deletions

View file

@ -39,17 +39,17 @@
}
if($vars->widget_fix_width == 'Y') {
$style = "";
$style = "";
$style .= sprintf("margin:%dpx %dpx %dpx %dpx;", $vars->widget_margin_top, $vars->widget_margin_right,$vars->widget_margin_bottom,$vars->widget_margin_left);
if($vars->widget_fix_width == 'Y') {
$vars->widget_width = $vars->widget_width - $vars->widget_margin_left - $vars->widget_margin_right;
$style .= sprintf("%s:%spx;", "width", trim($vars->widget_width));
$style .= sprintf("margin:%dpx %dpx %dpx %dpx;", $vars->widget_margin_top, $vars->widget_margin_right,$vars->widget_margin_bottom,$vars->widget_margin_left);
if($vars->widget_position) $style .= sprintf("%s:%s;", "float", trim($vars->widget_position));
else $style .= "float:left;";
$widget_code = sprintf('<img src="%s" class="zbxe_widget_output" widget="%s" %s style="%s" />', $blank_img_path, $widget, implode(' ',$attribute), $style);
} else {
$widget_code = sprintf('<img width="100" height="100" src="%s" class="zbxe_widget_output" widget="%s" %s />', $blank_img_path, $widget, implode(' ',$attribute));
$widget_code = sprintf('<img width="100" height="100" src="%s" class="zbxe_widget_output" style="%s" widget="%s" %s />', $blank_img_path, $style, $widget, implode(' ',$attribute));
}
$cache_path = './files/cache/widget_cache/';