diff --git a/classes/widget/WidgetHandler.class.php b/classes/widget/WidgetHandler.class.php
index 70c333f11..4f7ef704f 100644
--- a/classes/widget/WidgetHandler.class.php
+++ b/classes/widget/WidgetHandler.class.php
@@ -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('
%s
',$style, $output);
@@ -59,6 +60,8 @@
$style .= "float:left;";
$output = sprintf('%s
',$style, $output);
}
+ } else {
+ $output = sprintf('%s
',$style, $output);
}
if(__DEBUG__==3) $GLOBALS['__widget_excute_elapsed__'] += getMicroTime() - $start;
diff --git a/modules/widget/tpl/js/widget_admin.js b/modules/widget/tpl/js/widget_admin.js
index d0656fe30..8c24a15fd 100644
--- a/modules/widget/tpl/js/widget_admin.js
+++ b/modules/widget/tpl/js/widget_admin.js
@@ -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;
// 컬러셋 설정
diff --git a/modules/widget/tpl/widget_generate_code_in_page.html b/modules/widget/tpl/widget_generate_code_in_page.html
index e64cbe85c..6f408b11c 100644
--- a/modules/widget/tpl/widget_generate_code_in_page.html
+++ b/modules/widget/tpl/widget_generate_code_in_page.html
@@ -78,6 +78,22 @@
+
+ | {$lang->widget_margin} |
+
+ {$lang->widget_margin_top} px
+ {$lang->widget_margin_right} px
+ {$lang->widget_margin_bottom} px
+ {$lang->widget_margin_left} px
+
+ {$lang->about_widget_margin}
+ |
+
+
+
+