mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 10:49:54 +09:00
위젯관리시 margin의 경우는 언제든 적용되도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2081 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c02e4a7523
commit
74563e253c
4 changed files with 33 additions and 22 deletions
|
|
@ -47,11 +47,12 @@
|
|||
$output = $oWidget->proc($args);
|
||||
}
|
||||
|
||||
if($args->widget_fix_width == 'Y') {
|
||||
$style = "";
|
||||
$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));
|
||||
$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_position) {
|
||||
$style .= sprintf("%s:%s;", "float", trim($args->widget_position));
|
||||
$output = sprintf('<div style="%s">%s</div>',$style, $output);
|
||||
|
|
@ -59,6 +60,8 @@
|
|||
$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);
|
||||
}
|
||||
|
||||
if(__DEBUG__==3) $GLOBALS['__widget_excute_elapsed__'] += getMicroTime() - $start;
|
||||
|
|
|
|||
|
|
@ -133,10 +133,13 @@ function doFillWidgetVars() {
|
|||
|
||||
}
|
||||
|
||||
var marginLeft = parseInt(selected_node.style.marginLeft.replace(/px$/,''),10);
|
||||
var marginRight = parseInt(selected_node.style.marginRight.replace(/px$/,''),10);
|
||||
var border = parseInt(selected_node.style.border);
|
||||
|
||||
var marginLeft = 0;
|
||||
if(selected_node.style.marginLeft) marginLeft = parseInt(selected_node.style.marginLeft.replace(/px$/,''),10);
|
||||
var marginRight = 0;
|
||||
if(selected_node.style.marginRight) marginRight = parseInt(selected_node.style.marginRight.replace(/px$/,''),10);
|
||||
var border = 0;
|
||||
if(selected_node.style.border) border= parseInt(selected_node.style.boarder.replace(/px$/,''),10);
|
||||
|
||||
fo_obj.widget_width.value = xWidth(selected_node) + marginLeft + marginRight - 6;
|
||||
|
||||
// 컬러셋 설정
|
||||
|
|
|
|||
|
|
@ -78,6 +78,22 @@
|
|||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<th scope="row">{$lang->widget_margin}</th>
|
||||
<td>
|
||||
{$lang->widget_margin_top} <input type="text" name="widget_margin_top" value="0" size="2" class="inputTypeText" />px
|
||||
{$lang->widget_margin_right} <input type="text" name="widget_margin_right" value="0" size="2" class="inputTypeText" />px
|
||||
{$lang->widget_margin_bottom} <input type="text" name="widget_margin_bottom" value="0" size="2" class="inputTypeText" />px
|
||||
{$lang->widget_margin_left} <input type="text" name="widget_margin_left" value="0" size="2" class="inputTypeText"/>px
|
||||
<br />
|
||||
{$lang->about_widget_margin}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" class="tableType5 gap1">
|
||||
<col width="100" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row">{$lang->widget_fix_width}</th>
|
||||
<td>
|
||||
|
|
@ -102,17 +118,6 @@
|
|||
<p>{$lang->about_widget_position}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->widget_margin}</th>
|
||||
<td>
|
||||
{$lang->widget_margin_top} <input type="text" name="widget_margin_top" value="0" size="2" class="inputTypeText" />px
|
||||
{$lang->widget_margin_right} <input type="text" name="widget_margin_right" value="0" size="2" class="inputTypeText" />px
|
||||
{$lang->widget_margin_bottom} <input type="text" name="widget_margin_bottom" value="0" size="2" class="inputTypeText" />px
|
||||
{$lang->widget_margin_left} <input type="text" name="widget_margin_left" value="0" size="2" class="inputTypeText"/>px
|
||||
<br />
|
||||
{$lang->about_widget_margin}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="popFooter" class="tCenter gap1">
|
||||
|
|
|
|||
|
|
@ -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/';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue