1. 컨텐츠 위젯을 지울때 잘못된 요청이라는 메세지가 나타나지 않도록 수정

2. 위젯 제거후 위젯 설정 버튼이 나타나지 않는 문제 수정
3. 동영상등이 위젯 내용에 포함되었을 경우 동영상 컨텐츠를 살짝 내려 설정 버튼이 나타나도록 수정


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5145 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-12-22 02:40:34 +00:00
parent 9086bae05a
commit 61ab00b3a6
2 changed files with 31 additions and 11 deletions

View file

@ -75,6 +75,7 @@ function doStartPageModify(zoneID, module_srl) {
// 드래그와 리사이즈와 관련된 이벤트 리스너 생성
xAddEventListener(document,"click",doCheckWidget);
xAddEventListener(document,"mousedown",doCheckWidgetDrag);
xAddEventListener(document,'mouseover',widgetSetup);
}
@ -84,7 +85,7 @@ function removeAllWidget() {
var response_tags = new Array('error','message');
var params = new Array();
params['module_srl'] = xGetElementById('pageFo').module_srl.value;
exec_xml('widget',"procWidgetRemoveContents",params,function() { xInnerHtml(zonePageObj,'') });
exec_xml('widget',"procWidgetRemoveContents",params,function() { restoreWidgetButtons(); xInnerHtml(zonePageObj,'') });
}
/**
@ -447,6 +448,7 @@ function completeCopyWidgetContent(ret_obj, response_tags, params, p_obj) {
// content widget 제거
function completeDeleteWidgetContent(ret_obj, response_tags, params, p_obj) {
restoreWidgetButtons();
p_obj.parentNode.removeChild(p_obj);
}
@ -705,9 +707,7 @@ function doApplyWidgetSize(fo_obj) {
doHideWidgetSizeSetup();
}
/* 위젯 조절 */
xAddEventListener(document,'mouseover',widgetSetup);
var hideElements = new Array();
function restoreWidgetButtons() {
var widgetButton = xGetElementById('widgetButton');
var boxWidgetButton = xGetElementById('widgetBoxButton');
@ -716,17 +716,35 @@ function restoreWidgetButtons() {
xGetElementById("zonePageContent").parentNode.appendChild(widgetButton);
boxWidgetButton.style.visibility = 'hidden';
xGetElementById("zonePageContent").parentNode.appendChild(boxWidgetButton);
for(var i=0;i<hideElements.length;i++) {
var obj = hideElements[0];
obj.style.paddingTop = 0;
}
hideElements = new Array();
}
function showWidgetButton(name, obj) {
var widgetButton = xGetElementById(name);
if(!widgetButton) return;
widgetButton.style.visibility = 'visible';
var cobj = obj.firstChild;
while(cobj) {
if(cobj.nodeName == "DIV" && cobj.className == "widgetBorder") {
if(/embed/i.test(xInnerHtml(cobj))) {
hideElements[hideElements.length] = cobj;
cobj.style.paddingTop = '20px';
}
}
cobj = cobj.nextSibling;
}
obj.appendChild(widgetButton);
}
function widgetSetup(evt) {
var e = new xEvent(evt);
var obj = e.target;
while(obj) {
@ -750,12 +768,14 @@ function widgetSetup(evt) {
showWidgetButton('widgetButton', obj);
var p_obj = obj.parentNode;
while(p_obj) {
if(p_obj.getAttribute('widget')=='widgetBox') {
showWidgetButton('widgetBoxButton', p_obj);
break;
if(p_obj) {
while(p_obj) {
if(p_obj.nodeName == 'DIV' && p_obj.getAttribute('widget')=='widgetBox') {
showWidgetButton('widgetBoxButton', p_obj);
break;
}
p_obj = p_obj.parentNode;
}
p_obj = p_obj.parentNode;
}
}
}