mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 18:59:56 +09:00
위젯 생성 스크립트 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2083 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
641e4c5c4b
commit
4b107d24a6
10 changed files with 130 additions and 31 deletions
|
|
@ -47,21 +47,45 @@
|
|||
$output = $oWidget->proc($args);
|
||||
}
|
||||
|
||||
$style = "";
|
||||
$style .= sprintf("margin:%dpx %dpx %dpx %dpx;", $args->widget_margin_top, $args->widget_margin_right,$args->widget_margin_bottom,$args->widget_margin_left);
|
||||
|
||||
if($args->widget_fix_width == 'Y') {
|
||||
$style .= sprintf("%s:%spx;", "width", trim($args->widget_width));
|
||||
$widget_width_type = strtolower($args->widget_width_type);
|
||||
if(!$widget_width_type||!in_array($widget_width_type,array("px","%"))) $widget_width_type = "px";
|
||||
|
||||
|
||||
if($widget_width_type == "px") {
|
||||
|
||||
$style = "overflow:hidden;";
|
||||
$style .= sprintf("%s:%s%s;", "width", $args->widget_width - $args->widget_margin_right - $args->widget_margin_left, $widget_width_type);
|
||||
$style .= sprintf("margin-top:%dpx;margin-bottom:%dpx;", $args->widget_margin_top, $args->widget_margin_bottom);
|
||||
|
||||
|
||||
$inner_style = sprintf("margin-left:%dpx;margin-right:%dpx;", $args->widget_margin_left, $args->widget_margin_right);
|
||||
|
||||
if($args->widget_position) {
|
||||
$style .= sprintf("%s:%s;", "float", $args->widget_position);
|
||||
$output = sprintf('<div style="%s"><div style="%s">%s</div></div>',$style, $inner_style, $output);
|
||||
} else {
|
||||
$style .= "float:left;";
|
||||
$output = sprintf('<div class="clear"></div><div style="%s"><div style="%s">%s</div></div>',$style, $inner_style, $output);
|
||||
}
|
||||
|
||||
if($args->widget_position) {
|
||||
$style .= sprintf("%s:%s;", "float", trim($args->widget_position));
|
||||
$output = sprintf('<div style="%s">%s</div>',$style, $output);
|
||||
} else {
|
||||
$style .= "float:left;";
|
||||
$output = sprintf('<div class="clear"></div><div style="%s">%s</div>',$style, $output);
|
||||
|
||||
$style = sprintf("overflow:hidden;%s:%s%s;", "width", $args->widget_width, $widget_width_type);
|
||||
|
||||
$output = sprintf('<div style="margin:%dpx %dpx %dpx %dpx;">%s</div>', $args->widget_margin_top, $args->widget_margin_right,$args->widget_margin_bottom,$args->widget_margin_left, $output);
|
||||
|
||||
if($args->widget_position) {
|
||||
$style .= sprintf("%s:%s;", "float", $args->widget_position);
|
||||
$output = sprintf('<div style="%s">%s</div>',$style, $output);
|
||||
} else {
|
||||
$style .= "float:left;";
|
||||
$output = sprintf('<div class="clear"></div><div style="%s">%s</div>',$style, $output);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$output = sprintf('<div style="%s">%s</div>',$style, $output);
|
||||
$output = sprintf('<div style="margin:%dpx %dpx %dpx %dpx;">%s</div>', $args->widget_margin_top, $args->widget_margin_right,$args->widget_margin_bottom,$args->widget_margin_left, $output);
|
||||
}
|
||||
|
||||
if(__DEBUG__==3) $GLOBALS['__widget_excute_elapsed__'] += getMicroTime() - $start;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue