From 8084250f1795a70f42d04e417ee350cb466d3547 Mon Sep 17 00:00:00 2001 From: ngleader Date: Tue, 24 Mar 2009 07:20:22 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EC=9C=84=EC=A0=AF=20=EC=88=98=EC=A0=95=EC=8B=9C=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5950 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/widget/tpl/js/widget.js | 36 ++++++++++++------- widgets/content/skins/default/gallery.html | 4 +-- .../content/skins/default/image_title.html | 2 +- .../skins/default/image_title_content.html | 4 +-- widgets/content/skins/default/normal.html | 2 +- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/modules/widget/tpl/js/widget.js b/modules/widget/tpl/js/widget.js index d330ca6c0..0d0e23fca 100644 --- a/modules/widget/tpl/js/widget.js +++ b/modules/widget/tpl/js/widget.js @@ -80,8 +80,8 @@ function getWidgetContent(obj) { if(typeof(obj)=='undefined' || !obj) obj = zonePageObj; var widget = null; - jQuery(obj).find('div[widget]').each(function(){ - if(jQuery(this).parent().get(0) != obj) return; + jQuery('div.widgetOutput',obj).each(function(){ + if(jQuery(this).parent().get(0) != obj) return; widget = jQuery(this).attr('widget'); switch(widget) { case 'widgetBox' : @@ -169,7 +169,8 @@ function getWidgetCode(childObj, widget) { var attrs = ""; var code = ""; for(var i=0;i 0) return; doHideWidgetSizeSetup(); @@ -845,6 +842,7 @@ function restoreWidgetButtons() { var widgetButton = xGetElementById('widgetButton'); var boxWidgetButton = xGetElementById('widgetBoxButton'); if(!widgetButton || !boxWidgetButton) return; + widgetButton.style.visibility = 'hidden'; xGetElementById("zonePageContent").parentNode.appendChild(widgetButton); boxWidgetButton.style.visibility = 'hidden'; @@ -875,17 +873,25 @@ function showWidgetButton(name, obj) { function widgetSetup(evt) { var e = new xEvent(evt); var obj = e.target; - while(obj) { - if(obj.parentNode && typeof(obj.parentNode.className)!='undefined' && obj.parentNode.className == 'widgetButtons') return; - if(typeof(obj.className)!='undefined' && obj.className == 'widgetOutput') break; - obj = obj.parentNode; + + if(jQuery(obj).is('.widgetButtons') || jQuery(obj).parents('.widgetButtons').size() > 0) return; + if(jQuery(obj).is('.buttonBox') || jQuery(obj).parents('.buttonBox').size() > 0) return; + + + var o = jQuery(obj).parents('.widgetOutput'); + if(o.size() == 0){ + restoreWidgetButtons(); + return; } + /* if(!obj || typeof(obj.className)=='undefined' || obj.className != 'widgetOutput') { restoreWidgetButtons(); return; } +*/ - var widget = obj.getAttribute('widget'); + obj = o.get(0); + var widget = o.attr('widget'); if(!widget) return; if(widget == 'widgetBox') { @@ -1172,6 +1178,8 @@ function widgetDisapearObject(obj, tobj) { obj.parentNode.removeChild(obj); widgetTmpObject[tobj.id] = null; return; + + /* var it = 5; var ib = 1; @@ -1196,6 +1204,7 @@ function widgetDisapearObject(obj, tobj) { xLeft(obj, x); xTop(obj, y); }, it/ib); + */ } // 마우스다운 이벤트 발생시 호출됨 @@ -1274,6 +1283,7 @@ function widgetManualEnd() { if(!tobj) return; xRemoveEventListener(document, 'mouseup', widgetMouseUp, false); + xAddEventListener(document, 'mousemove', widgetDragMouseMove, false); var obj = widgetGetTmpObject(tobj); widgetDisapear = widgetDisapearObject(obj, tobj); diff --git a/widgets/content/skins/default/gallery.html b/widgets/content/skins/default/gallery.html index 5f3f0ee9c..57c96dc11 100644 --- a/widgets/content/skins/default/gallery.html +++ b/widgets/content/skins/default/gallery.html @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/widgets/content/skins/default/normal.html b/widgets/content/skins/default/normal.html index 178596d72..ae73bb470 100644 --- a/widgets/content/skins/default/normal.html +++ b/widgets/content/skins/default/normal.html @@ -25,7 +25,7 @@ - {$item->printExtraImages()} + {$item->printExtraImages()}