mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
우측 정렬 위젯의 크기 조절 및 전체적인 위젯 크기 조절 기능 정리. 하단 버튼 정리
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2967 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a63f250388
commit
b2f9c62d90
11 changed files with 80 additions and 51 deletions
|
|
@ -5,7 +5,7 @@ h3 { margin:0 10px 0 10px; }
|
|||
.editor_box { margin:0 10px 10px 10px; }
|
||||
.button_box { float:right; overflow:hidden; }
|
||||
|
||||
.adminLayer { margin-top:30px; border:1px solid #CCCCCC; padding:10px; overflow:hidden;}
|
||||
.adminLayer { margin-top:30px; }
|
||||
|
||||
#zonePageContent { overflow:hidden; width:100%; padding:none !important; margin:none !important;}
|
||||
|
||||
|
|
@ -16,7 +16,8 @@ h3 { margin:0 10px 0 10px; }
|
|||
.widgetOutput .widgetSetup { background:#FFFFFF url("../images/widget_setup.gif") no-repeat left top; width:22px; height:22px; position:absolute; top:1px; right:48px; cursor:pointer; z-index:1000;}
|
||||
.widgetOutput .widgetSize { background:#FFFFFF url("../images/widget_size.gif") no-repeat left top; width:22px; height:22px; position:absolute; top:1px; right:24px; cursor:pointer; z-index:1000;}
|
||||
.widgetOutput .widgetRemove { background:#FFFFFF url("../images/widget_remove.gif") no-repeat left top; width:22px; height:22px; position:absolute; top:1px; right:1px; cursor:pointer; z-index:1000;}
|
||||
.widgetOutput .widgetResize { background:transparent url("../images/btn_resize.gif") no-repeat left top; width:12px; height:12px; position:absolute; bottom:1px; right:1px; cursor:pointer; z-index:1000;}
|
||||
.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;}
|
||||
|
||||
#pageSizeLayer { width:500px; overflow:hidden; border:1px solid #888888; background:#FFFFFF; z-index:2000; position:absolute; }
|
||||
#pageSizeLayer table { border:0; width:100%; table-layout:fixed; }
|
||||
|
|
|
|||
BIN
modules/page/tpl/images/btn_resize_left.gif
Normal file
BIN
modules/page/tpl/images/btn_resize_left.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 B |
|
|
@ -151,23 +151,6 @@ function doUnSelectAll(obj, key) {
|
|||
}
|
||||
}
|
||||
|
||||
/* 빈 공간 추가 */
|
||||
function doAddEmptyBox() {
|
||||
var zoneObj = xGetElementById("zonePageContent");
|
||||
|
||||
var dummy = '<div class="widgetOutput" style="width:100%;height:50px;" widget="_empty" />'+
|
||||
'<div class="widgetRemove"></div>'+
|
||||
'<div class="widgetResize"></div>'+
|
||||
'<div class="widgetBorder">'+
|
||||
'<div style="%s">'+
|
||||
''+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
|
||||
xInnerHtml(zoneObj, xInnerHtml(zoneObj)+dummy);
|
||||
}
|
||||
|
||||
/* 컨텐츠 추가 */
|
||||
function doAddContent(module_srl) {
|
||||
popopen("./?module=page&act=dispPageAdminAddContent&module_srl="+module_srl, "addContent");
|
||||
|
|
@ -336,7 +319,7 @@ function doCheckWidgetDrag(e) {
|
|||
|
||||
p_obj = obj;
|
||||
while(p_obj) {
|
||||
if(p_obj.className == 'widgetOutput' || p_obj.className == 'widgetResize') {
|
||||
if(p_obj.className == 'widgetOutput' || p_obj.className == 'widgetResize' || p_obj.className == 'widgetResizeLeft') {
|
||||
widgetDragEnable(p_obj, widgetDragStart, widgetDrag, widgetDragEnd);
|
||||
widgetMouseDown(e);
|
||||
return;
|
||||
|
|
@ -576,7 +559,7 @@ function widgetDragEnable(obj, funcDragStart, funcDrag, funcDragEnd) {
|
|||
|
||||
// 드래그를 시작할때 호출되는 함수 (이동되는 형태를 보여주기 위한 작업을 함)
|
||||
function widgetDragStart(tobj, px, py) {
|
||||
if(tobj.className == 'widgetResize') return;
|
||||
if(tobj.className == 'widgetResize' || tobj.className == 'widgetResizeLeft' ) return;
|
||||
var obj = widgetGetTmpObject(tobj);
|
||||
|
||||
xInnerHtml(obj, xInnerHtml(tobj));
|
||||
|
|
@ -594,21 +577,58 @@ function widgetDragStart(tobj, px, py) {
|
|||
|
||||
// 드래그 시작후 마우스를 이동할때 발생되는 이벤트에 의해 실행되는 함수
|
||||
function widgetDrag(tobj, dx, dy) {
|
||||
var minWidth = 74;
|
||||
var minHeight = 40;
|
||||
|
||||
// 위젯 리사이즈
|
||||
var sx = xPageX(tobj.parentNode);
|
||||
var sy = xPageY(tobj.parentNode);
|
||||
|
||||
var nx = tobj.xDPX;
|
||||
var ny = tobj.xDPY;
|
||||
|
||||
var zoneWidth = xWidth('zonePageContent');
|
||||
var zoneLeft = xPageX('zonePageContent');
|
||||
var zoneRight = zoneLeft + zoneWidth;
|
||||
|
||||
var pWidth = xWidth(tobj.parentNode);
|
||||
|
||||
var float = xIE4Up?tobj.parentNode.style.styleFloat:tobj.parentNode.style.cssFloat;
|
||||
if(!float) float = 'left';
|
||||
|
||||
// 위젯 리사이즈 (우측)
|
||||
if(tobj.className == 'widgetResize') {
|
||||
if(nx < sx+minWidth) nx = sx+minWidth;
|
||||
if(nx > zoneRight) nx = zoneRight;
|
||||
|
||||
var sx = xPageX(tobj.parentNode);
|
||||
var sy = xPageY(tobj.parentNode);
|
||||
if(float == 'right') nx = sx + pWidth;
|
||||
|
||||
var new_width = tobj.xDPX - sx;
|
||||
if(new_width < 25) new_width = 25;
|
||||
var new_width = nx - sx;
|
||||
if(new_width < minWidth) new_width = minWidth;
|
||||
|
||||
var new_height = tobj.xDPY - sy;
|
||||
if(new_height < 25) new_height = 25;
|
||||
var new_height = ny - sy;
|
||||
if(new_height < minHeight) new_height = minHeight;
|
||||
|
||||
if( xPageX('zonePageContent') + xWidth('zonePageContent') < xPageX(tobj.parentNode) + new_width) new_width = xPageX('zonePageContent') + xWidth('zonePageContent') - xPageX(tobj.parentNode);
|
||||
//if(new_width > xWidth('zonePageContent')-2) new_width = xWidth('zonePageContent')-2;
|
||||
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);
|
||||
|
||||
// 위젯 리사이즈 (좌측)
|
||||
} else if(tobj.className == 'widgetResizeLeft') {
|
||||
|
||||
if(nx < zoneLeft) nx = zoneLeft;
|
||||
|
||||
if(float == 'left') nx = sx;
|
||||
|
||||
var new_width = pWidth + (sx - nx);
|
||||
if(new_width < minWidth) new_width = minWidth;
|
||||
|
||||
var new_height = ny - sy;
|
||||
if(new_height < minHeight) new_height = minHeight;
|
||||
|
||||
// 위젯의 크기 조절
|
||||
xWidth(tobj.nextSibling, new_width);
|
||||
|
|
@ -617,7 +637,6 @@ function widgetDrag(tobj, dx, dy) {
|
|||
xWidth(tobj.parentNode, new_width);
|
||||
xHeight(tobj.parentNode, new_height);
|
||||
|
||||
|
||||
// 위젯 드래그
|
||||
} else {
|
||||
var obj = widgetGetTmpObject(tobj);
|
||||
|
|
|
|||
|
|
@ -8,23 +8,30 @@
|
|||
<form action="./" id="pageFo" onsubmit="return doSubmitPageContent(this);">
|
||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||
<input type="hidden" name="content" value="" />
|
||||
<div class="fl">
|
||||
<select name="widget_list">
|
||||
<!--@foreach($widget_list as $widget)-->
|
||||
<option value="{$widget->widget}">{$widget->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<span class="button"><input type="button" value="{$lang->cmd_insert}" onclick="doAddWidget(this.form); return false;"/></span>
|
||||
<span class="button"><input type="button" value="{$lang->cmd_content_insert}" onclick="doAddContent('{$module_info->module_srl}'); return false;" /></span>
|
||||
</div>
|
||||
<div class="fr">
|
||||
<span class="button"><input type="button" value="{$lang->cmd_cancel}" onclick="location.href=current_url.setQuery('act','');return false;"/></span>
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_save}"/></span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr>
|
||||
<td class="nowrap tCenter">
|
||||
<select name="widget_list">
|
||||
<!--@foreach($widget_list as $widget)-->
|
||||
<option value="{$widget->widget}">{$widget->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<span class="button"><input type="button" value="{$lang->cmd_insert}" onclick="doAddWidget(this.form); return false;"/></span>
|
||||
</td>
|
||||
<td class="tCenter">
|
||||
<span class="button"><input type="button" value="{$lang->cmd_content_insert}" onclick="doAddContent('{$module_info->module_srl}'); return false;" /></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="centerButton">
|
||||
<span class="button"><input type="button" value="{$lang->cmd_back}" onclick="location.href=current_url.setQuery('act','');return false;"/></span>
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_save}"/></span>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var confirm_delete_msg = "{$lang->confirm_delete}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue