Issue 2904 fixed. Widget page editing issue solved.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12708 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2013-02-06 08:37:57 +00:00
parent ee9247e866
commit 4e23d61c8d
3 changed files with 7 additions and 60 deletions

View file

@ -9,14 +9,14 @@
.pageAddContent{width:700px}
.widgetOutput{float:left;cursor:move;z-index:998;overflow:hidden;position:relative;width:100%;min-height:24px}
.widgetOutput .widgetBorder,
.widgetOutput .widgetBoxBorder{position:absolute;top:0;left:0;right:0;bottom:0;border:1px dashed #ccc;z-index:999}
.widgetOutput .widgetBoxBorder{height:100%;border:1px dashed #ccc;z-index:999;box-sizing:border-box;min-height:24px}
.widgetOutput .widgetResize {border:0;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 {border:0;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 .widgetResizeLeft {border:0;background:transparent url("../images/btn_resize_left.gif") no-repeat left bottom;width:12px;height:12px;position:absolute;bottom:1px;left:1px;cursor:pointer;z-index:1000}
.widgetOutput .widgetBoxResize {border:0;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{border:0;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:1000;overflow:hidden;*zoom:1;float:left;padding:0 10px;line-height:24px;position:absolute;visibility:hidden;box-shadow:0 0 3px #333 inset}
.widgetButtons#widgetButton{background-color:#C7DBE9;left:0;top:0}
.widgetButtons#widgetBoxButton{background-color:#D2E9C7;right:0;top:0}
.widgetButtons{z-index:1000;overflow:hidden;*zoom:1;float:left;padding:0 10px;line-height:24px;position:absolute;top:0;visibility:hidden;box-shadow:0 0 3px #333 inset}
.widgetButtons#widgetButton{background-color:#C7DBE9;left:0}
.widgetButtons#widgetBoxButton{background-color:#D2E9C7;right:0}
.widgetButtons>button{border:0;width:14px;height:14px;padding:14px 0 0 0;overflow:hidden;cursor:pointer;z-index:99;background:transparent url("../../../admin/tpl/img/glyphicons-halflings.png") no-repeat}
.widgetButtons .widgetSetup{background-position:-432px 0}
.widgetButtons .widgetSize,

View file

@ -50,9 +50,6 @@ function doStartPageModify(zoneID, module_srl) {
.find('>form')
.submit(function(){ doApplyWidgetSize(this); return false; });
// 모든 위젯들의 크기를 정해진 크기로 맞춤
doFitBorderSize();
// 드래그와 리사이즈와 관련된 이벤트 리스너 생성
xAddEventListener(document.getElementById('zonePageContent'), "click",doCheckWidget);
xAddEventListener(document.getElementById('zonePageContent'), "mousedown",doCheckWidgetDrag);
@ -213,9 +210,6 @@ function doSyncPageContent() {
}
if(typeof(editorStart)!='undefined') editorStart(1, "module_srl", "content", false, 400 );
//editor_upload_start(1);
//setFixedPopupSize();
}
// 부모창에 위젯을 추가
@ -263,7 +257,7 @@ function addContentWidget(fo_obj) {
'<button type="button" class="widgetResize"></button>'+
'<button type="button" class="widgetResizeLeft"></button>'+
'<div class="widgetBorder">'+
'<div style="padding:'+fo_obj.widget_padding_top.value+'px '+fo_obj.widget_padding_right.value+'px'+fo_obj.widget_padding_bottom.value+'px'+fo_obj.widget_padding_left.value+'px"></div>'+content+
'<div style="padding:'+fo_obj.widget_padding_top.value+'px '+fo_obj.widget_padding_right.value+'px '+fo_obj.widget_padding_bottom.value+'px '+fo_obj.widget_padding_left.value+'px"></div>'+content+
'</div>'+
'<div class="widgetContent" style="display:none;width:1px;height:1px;overflow:hidden;"></div>'+
'</div>';
@ -294,7 +288,6 @@ function doAddWidgetBox() {
'</div>'+
'</div>';
zonePageObj.innerHTML += tpl;
doFitBorderSize();
}
@ -309,25 +302,6 @@ function doAddWidget(fo) {
}
// widgetBorder에 height를 widgetOutput와 맞춰줌
function doFitBorderSize() {
/*var obj_list = jQuery('.widgetBorer', zonePageObj).get();
for(var i=0;i<obj_list.length;i++) {
var obj = obj_list[i];
var height = xHeight(obj.parentNode);
if(height<10) height = 24;
xHeight(obj, height);
obj.parentNode.style.clear = '';
}
var obj_list = jQuery('.widgetBoxBorder', zonePageObj).get();
for(var i=0;i<obj_list.length;i++) {
var obj = obj_list[i];
xHeight(obj, xHeight(obj.parentNode));
obj.parentNode.style.clear = '';
}*/
}
var selectedWidget = null;
var writedText = null;
var checkDocumentWrite = false;
@ -763,17 +737,6 @@ function doApplyWidgetSize(fo_obj) {
var width = _getSize(fo_obj.width.value);
if(width) selectedSizeWidget.style.width = width;
var height = _getSize(fo_obj.height.value);
if(height && height != "100%") selectedSizeWidget.style.height = height;
else {
selectedSizeWidget.style.height = '';
var widgetBorder = xGetElementsByClassName('widgetBorder',selectedSizeWidget);
for(var i=0;i<widgetBorder.length;i++) {
var obj = widgetBorder[i];
obj.style.height = '';
}
}
selectedSizeWidget.style.borderTop = _getBorderStyle(fo_obj.border_top_color, fo_obj.border_top_thick, fo_obj.border_top_type);
selectedSizeWidget.style.borderBottom = _getBorderStyle(fo_obj.border_bottom_color, fo_obj.border_bottom_thick, fo_obj.border_bottom_type);
selectedSizeWidget.style.borderLeft = _getBorderStyle(fo_obj.border_left_color, fo_obj.border_left_thick, fo_obj.border_left_type);
@ -947,7 +910,6 @@ var widgetDisappear = 0;
function widgetCreateTmpObject(obj) {
var id = obj.getAttribute('id');
tmpObj = xCreateElement('DIV');
tmpObj.id = id + '_tmp';
tmpObj.className = obj.className;
@ -955,15 +917,12 @@ function widgetCreateTmpObject(obj) {
tmpObj.style.margin= '0px';
tmpObj.style.padding = '0px';
tmpObj.style.width = obj.style.width;
tmpObj.style.display = 'none';
tmpObj.style.position = 'absolute';
tmpObj.style.opacity = 1;
tmpObj.style.filter = 'alpha(opacity=100)';
xLeft(tmpObj, xPageX(obj));
xTop(tmpObj, xPageY(obj));
document.body.appendChild(tmpObj);
widgetTmpObject[obj.id] = tmpObj;
return tmpObj;
@ -1044,10 +1003,6 @@ function widgetDrag(tobj, dx, dy) {
if( zoneRight < sx+new_width) new_width = zoneRight - sx;
// 위젯의 크기 조절
xWidth(tobj.nextSibling.nextSibling, new_width);
xHeight(tobj.nextSibling.nextSibling, new_height);
xWidth(tobj.parentNode, new_width);
xHeight(tobj.parentNode, new_height);
@ -1064,10 +1019,6 @@ function widgetDrag(tobj, dx, dy) {
var new_height = ny - sy;
if(new_height < minHeight) new_height = minHeight;
// 위젯의 크기 조절
xWidth(tobj.nextSibling, new_width);
xHeight(tobj.nextSibling, new_height);
xWidth(tobj.parentNode, new_width);
xHeight(tobj.parentNode, new_height);
@ -1104,7 +1055,6 @@ function widgetDrag(tobj, dx, dy) {
if(next1) next1.parentNode.insertBefore(tobj, next1);
if(next2) next2.parentNode.insertBefore(target_obj, next2);
doFitBorderSize();
widgetList = null;
return;
}
@ -1119,7 +1069,6 @@ function widgetDrag(tobj, dx, dy) {
var tt = parseInt(t,10) + parseInt(xHeight(p_tobj),10);
if( (tobj.xDPX < l || tobj.xDPX > ll) || (tobj.xDPY < t || tobj.xDPY > tt) ) {
zonePageObj.insertBefore(tobj, jQuery(tobj).parents('div.widgetOutput[widget=widgetBox]').get(0));
doFitBorderSize();
return;
}
@ -1158,7 +1107,6 @@ function widgetDrag(tobj, dx, dy) {
// 이동을 멈춤
widgetManualEnd();
doFitBorderSize();
boxList = null;
return;
}
@ -1193,7 +1141,6 @@ function widgetDrag(tobj, dx, dy) {
if(next1) next1.parentNode.insertBefore(tobj, next1);
if(next2) next2.parentNode.insertBefore(target_obj, next2);
doFitBorderSize();
widgetList = null;
return;
}

File diff suppressed because one or more lines are too long