페이지에서 위젯 꾸미기 할 때 위젯상자의 설정 버튼도 나오도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5124 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-12-18 06:58:52 +00:00
parent 6cf8eafe2f
commit 44d15fde5f
3 changed files with 22 additions and 7 deletions

View file

@ -6,4 +6,4 @@ h3 { margin:0 10px 0 10px; }
.buttonBox { border:2px solid #EEEEEE; padding:5px; overflow:hidden; *zoom:1;}
.buttonBox .fr { height:28px; }
.buttonBox .fl { height:28px; }
.buttonBox .buttonDiv { margin:2px 0; padding:0; border-top:1px solid #EEEEEE; clear:both; }
.buttonBox .buttonDiv { margin:2px 0; padding:0; border-top:1px solid EEEEEE; clear:both; }

View file

@ -15,20 +15,22 @@
.widgetOutput { float:left; cursor:move; z-index:998; overflow:hidden; position:relative; width:100%; }
.widgetOutput .widgetBorder { border:1px dotted #17DA29; z-index:999; }
.widgetOutput .widgetBorder { border:1px solid #C7DBE9; z-index:999; }
.widgetOutput .widgetBoxBorder { border:1px solid #D2E9C7; z-index:999; }
.widgetOutput .widgetResize { background:transparent url("../images/btn_resize.gif") no-repeat left bottom; width:12px; height:12px; position:absolute; bottom:1px; right:1px; cursor:pointer; z-index:1000;}
.widgetOutput .widgetResizeLeft { background:transparent url("../images/btn_resize_left.gif") no-repeat left bottom; width:12px; height:12px; position:absolute; bottom:0; left:1px; cursor:pointer; z-index:1000;}
.widgetOutput .widgetBoxResize { background:transparent url("../images/btn_resize.gif") no-repeat left bottom; width:12px; height:12px; position:absolute; bottom:1px; right:1px; cursor:pointer; z-index:1000;}
.widgetOutput .widgetBoxResizeLeft { background:transparent url("../images/btn_resize_left.gif") no-repeat left bottom; width:12px; height:12px; position:absolute; bottom:0; left:1px; cursor:pointer; z-index:1000;}
.widgetButtons { z-index:9999; border:1px solid #555555; background-color:#FFFFFF; overflow:hidden; *zoom:1; float:left; padding:3px; position:absolute; left:0; top:0; visibility:hidden;}
.widgetButtons { z-index:9999; overflow:hidden; *zoom:1; float:left; padding:3px; position:absolute; visibility:hidden;}
#widgetButton { background-color:#C7DBE9;left:0; top:0;}
#widgetBoxButton { background-color:#D2E9C7; right:0; top:0;}
.widgetButtons div { float:left; }
.widgetButtons .widgetSetup { background:transparent url("../images/widget_setup.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}
.widgetButtons .widgetCopy { background:transparent url("../images/widget_copy.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}
.widgetButtons .widgetSize { background:transparent url("../images/widget_size.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}
.widgetButtons .widgetRemove { background:transparent url("../images/widget_remove.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}
.widgetButtons .widgetBoxBorder { border:1px dotted #267BEE; z-index:999; }
.widgetButtons .widgetBoxCopy { background:transparent url("../images/widget_copy.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}
.widgetButtons .widgetBoxSize { background:transparent url("../images/widget_size.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}
.widgetButtons .widgetBoxRemove { background:transparent url("../images/widget_remove.gif") no-repeat 1px 1px; width:14px; height:14px; cursor:pointer; z-index:1000;}

View file

@ -718,7 +718,6 @@ function restoreWidgetButtons() {
}
function showWidgetButton(name, obj) {
restoreWidgetButtons();
var widgetButton = xGetElementById(name);
if(!widgetButton) return;
widgetButton.style.visibility = 'visible';
@ -742,8 +741,22 @@ function widgetSetup(evt) {
var widget = obj.getAttribute('widget');
if(!widget) return;
if(widget == 'widgetBox') showWidgetButton('widgetBoxButton', obj);
else showWidgetButton('widgetButton', obj);
if(widget == 'widgetBox') {
restoreWidgetButtons();
showWidgetButton('widgetBoxButton', obj);
} else {
restoreWidgetButtons();
var p_obj = obj.parentNode;
while(p_obj) {
if(p_obj.getAttribute('widget')=='widgetBox') {
showWidgetButton('widgetBoxButton', p_obj);
break;
}
p_obj = p_obj.parentNode;
}
showWidgetButton('widgetButton', obj);
}
}
/* 위젯 드래그 */