From 86ada3ed8f3ea4f4c0100f5331968caa734e9643 Mon Sep 17 00:00:00 2001 From: ngleader Date: Fri, 27 Mar 2009 04:51:17 +0000 Subject: [PATCH] fix widgetStyle for widgetBox git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5986 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/widget/WidgetHandler.class.php | 6 +++--- modules/widget/tpl/js/widget.js | 12 ++++-------- widgetstyles/memo/css/widgetBoxStyle.css | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/classes/widget/WidgetHandler.class.php b/classes/widget/WidgetHandler.class.php index 0cc1cffc9..3928d4125 100644 --- a/classes/widget/WidgetHandler.class.php +++ b/classes/widget/WidgetHandler.class.php @@ -269,7 +269,7 @@ // 위젯 스타일을 컴파일 한다. if($args->widgetstyle){ - $widget_content_body = WidgetHandler::complieWidgetStyle($args->widgetstyle, $widget_content_body, $args, $include_info); + $widget_content_body = WidgetHandler::complieWidgetStyle($args->widgetstyle,$widget, $widget_content_body, $args, $include_info); } $output = $widget_content_header . $widget_content_body . $widget_content_footer; @@ -311,7 +311,7 @@ } - function complieWidgetStyle($widgetStyle,$widget_content_body, $args, $include_info){ + function complieWidgetStyle($widgetStyle,$widget,$widget_content_body, $args, $include_info){ if(!$widgetStyle) return $widget_content_body; $oWidgetModel = &getModel('widget'); @@ -328,7 +328,7 @@ } Context::set('widgetstyle_extar_var', $widgetstyle_extar_var); - if($include_info){ + if($include_info && $widget=='widgetBox'){ Context::set('widget_content', '
'.$widget_content_body.'
'); }else{ Context::set('widget_content', $widget_content_body); diff --git a/modules/widget/tpl/js/widget.js b/modules/widget/tpl/js/widget.js index 8e5319639..e71b7793e 100644 --- a/modules/widget/tpl/js/widget.js +++ b/modules/widget/tpl/js/widget.js @@ -166,7 +166,7 @@ function getWidgetBoxCode(childObj, widget) { if(jQuery('.widget_inner',childObj).size()>0){ o = jQuery('.widget_inner',childObj); - o = o.get(o.size()-1); + o = o.get(0); }else{ o = jQuery('.nullWidget',childObj).get(0); } @@ -1168,13 +1168,9 @@ function widgetDrag(tobj, dx, dy) { target_obj.appendChild(tobj); //박스 위젯에 위젯스타일이 적용된경우 또는 박스안에 위젯이 위젯스타일이 적용된겅우 - }else if(wb_ws.size() > 0){ - if(jQuery('div.widgetOutput',jQuery(target_obj)).size() > 0) { - target_obj.appendChild(tobj); - }else{ - wb_ws.get(0).appendChild(tobj); - } - } + }else{ + wb_ws.get(0).appendChild(tobj); + } // 이동을 멈춤 widgetManualEnd(); diff --git a/widgetstyles/memo/css/widgetBoxStyle.css b/widgetstyles/memo/css/widgetBoxStyle.css index 7b1a6a540..e03de44c9 100644 --- a/widgetstyles/memo/css/widgetBoxStyle.css +++ b/widgetstyles/memo/css/widgetBoxStyle.css @@ -10,7 +10,7 @@ .widgetBox .widgetContainer{ position:relative; z-index:10;} .widgetBox .widgetMore{ position:absolute; display:block; text-decoration:none; font-size:11px !important; white-space:nowrap; font-family:Tahoma; color:#000; text-align:center; z-index:20;} .widgetBox .widgetMore img{ border:0;} -.widgetBox .rcContainer{ display:block; width:100%; font-size:0; line-height:0; z-index:1; *zoom:1;} +.widgetBox .rcContainer{ display:block; width:100%; font-size:0; line-height:0; z-index:1; *zoom:1; clear:both;} .widgetBox .rc{ position:absolute; display:block; font-size:0; line-height:0; overflow:hidden;} .widgetBox .rcTop .tl{ top:0;} .widgetBox .rcTop .tr{ top:0;}