mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
xquared에서 Drag로 크기 조절 가능하게 함
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3053 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
40df9a7b74
commit
54903b5d0e
6 changed files with 74 additions and 61 deletions
|
|
@ -1,5 +1,7 @@
|
|||
@charset "utf-8";
|
||||
.xeEditor .editor_info .editor_autosaved_message { color:#888888; text-align:right; }
|
||||
.xeEditor .textAreaDragIndicator { text-align:center; background:url(../images/lineTextAreaDrag.gif) repeat-x left center; padding:5px 0 5px 0; }
|
||||
.xeEditor .textAreaDragIndicatorBar { background:url(../images/buttonTextAreaDrag.gif) no-repeat center; cursor:move;height:14px;}
|
||||
|
||||
.xeEditor .fileAttach { position:relative; top:20px; padding:0 1em .5em 1em;}
|
||||
.xeEditor .fileAttach .preview { padding:5px; width:110px; height:110px; border:1px solid #e1e1dd; background:#fbfbfb; float:left; margin-right:.5em;}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<textarea id="editor_textarea_{$editor_sequence}" class="editor_iframe_textarea" style="display:none; height:{$editor_height}" rows="10" cols="10"></textarea>
|
||||
|
||||
<!-- 에디터 크기 조절 bar -->
|
||||
<!-- <div class="textAreaDragIndicator"><div class="textAreaDragIndicatorBar" id="editor_drag_bar_{$editor_sequence}"></div></div>-->
|
||||
<div class="textAreaDragIndicator"><div class="textAreaDragIndicatorBar" id="editor_drag_bar_{$editor_sequence}"></div></div>
|
||||
|
||||
<!--@if($allow_fileupload)-->
|
||||
<!-- 첨부파일 영역 -->
|
||||
|
|
|
|||
BIN
modules/editor/skins/xquared/images/buttonTextAreaDrag.gif
Normal file
BIN
modules/editor/skins/xquared/images/buttonTextAreaDrag.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 B |
BIN
modules/editor/skins/xquared/images/lineTextAreaDrag.gif
Normal file
BIN
modules/editor/skins/xquared/images/lineTextAreaDrag.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 B |
|
|
@ -7,19 +7,12 @@
|
|||
/**
|
||||
* 에디터 사용시 사용되는 이벤트 연결 함수 호출
|
||||
**/
|
||||
xAddEventListener(document, 'mousedown', editorDragStart);
|
||||
xAddEventListener(document, 'mouseup', editorDragStop);
|
||||
xAddEventListener(document, 'mouseup', editorEventCheck);
|
||||
|
||||
/**
|
||||
* 에디터의 상태나 객체를 구하기 위한 함수
|
||||
**/
|
||||
|
||||
// editor_sequence값에 해당하는 iframe의 object를 return
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
return xGetElementById( 'editor_iframe_'+ editor_sequence );
|
||||
}
|
||||
|
||||
// editor_sequence값에 해당하는 textarea object를 return
|
||||
function editorGetTextArea(editor_sequence) {
|
||||
return xGetElementById( 'editor_textarea_' + editor_sequence );
|
||||
|
|
@ -631,59 +624,6 @@ function editorChangeMode(obj, editor_sequence) {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* iframe 세로 크기 조절 드래그 관련
|
||||
**/
|
||||
function editorDragStart(evt) {
|
||||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
if(typeof(obj.id)=='undefined'||!obj.id) return;
|
||||
|
||||
var id = obj.id;
|
||||
if(id.indexOf('editor_drag_bar_')!=0) return;
|
||||
|
||||
editorDragObj.isDrag = true;
|
||||
editorDragObj.y = e.pageY;
|
||||
editorDragObj.obj = e.target;
|
||||
editorDragObj.id = id.substr('editor_drag_bar_'.length);
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
|
||||
editorDragObj.source_height = xHeight(iframe_obj);
|
||||
|
||||
xAddEventListener(document, 'mousemove', editorDragMove, false);
|
||||
xAddEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
}
|
||||
|
||||
function editorDragMove(evt) {
|
||||
if(!editorDragObj.isDrag) return;
|
||||
|
||||
var e = new xEvent(evt);
|
||||
var h = e.pageY - editorDragObj.y;
|
||||
|
||||
editorDragObj.isDrag = true;
|
||||
editorDragObj.y = e.pageY;
|
||||
editorDragObj.obj = e.target;
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
xHeight(iframe_obj, xHeight(iframe_obj)+h);
|
||||
xHeight(iframe_obj.parentNode, xHeight(iframe_obj)+10);
|
||||
}
|
||||
|
||||
function editorDragStop(evt) {
|
||||
if(!editorDragObj.isDrag) return;
|
||||
|
||||
xRemoveEventListener(document, 'mousemove', editorDragMove, false);
|
||||
xRemoveEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
if(typeof(fixAdminLayoutFooter)=='function') fixAdminLayoutFooter(xHeight(iframe_obj)-editorDragObj.source_height);
|
||||
|
||||
editorDragObj.isDrag = false;
|
||||
editorDragObj.y = 0;
|
||||
editorDragObj.obj = null;
|
||||
editorDragObj.id = '';
|
||||
}
|
||||
|
||||
// Editor Option Button
|
||||
function eOptionOver(obj) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ var editorAutoSaveObj = {fo_obj:null, editor_sequence:0, title:'', content:'', l
|
|||
var editorRelKeys = new Array(); ///< 에디터와 각 모듈과의 연동을 위한 key 값을 보관하는 변수
|
||||
var editorDragObj = {isDrag:false, y:0, obj:null, id:'', det:0, source_height:0}
|
||||
|
||||
/**
|
||||
* 에디터 사용시 사용되는 이벤트 연결 함수 호출
|
||||
**/
|
||||
xAddEventListener(document, 'mousedown', editorDragStart);
|
||||
xAddEventListener(document, 'mouseup', editorDragStop);
|
||||
|
||||
function editorGetContent(editor_sequence) {
|
||||
return editorRelKeys[editor_sequence]["func"](editor_sequence);
|
||||
}
|
||||
|
|
@ -70,3 +76,68 @@ function _editorAutoSave() {
|
|||
function editorRemoveSavedDoc() {
|
||||
exec_xml("editor","procEditorRemoveSavedDoc");
|
||||
}
|
||||
|
||||
/**
|
||||
* 에디터의 상태나 객체를 구하기 위한 함수
|
||||
**/
|
||||
|
||||
// editor_sequence값에 해당하는 iframe의 object를 return
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
if(editorRelKeys[editor_sequence]['editor'] != undefined)
|
||||
return editorRelKeys[editor_sequence]['editor'].getFrame();
|
||||
return xGetElementById( 'editor_iframe_'+ editor_sequence );
|
||||
}
|
||||
|
||||
/**
|
||||
* iframe 세로 크기 조절 드래그 관련
|
||||
**/
|
||||
function editorDragStart(evt) {
|
||||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
if(typeof(obj.id)=='undefined'||!obj.id) return;
|
||||
|
||||
var id = obj.id;
|
||||
if(id.indexOf('editor_drag_bar_')!=0) return;
|
||||
|
||||
editorDragObj.isDrag = true;
|
||||
editorDragObj.y = e.pageY;
|
||||
editorDragObj.obj = e.target;
|
||||
editorDragObj.id = id.substr('editor_drag_bar_'.length);
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
|
||||
editorDragObj.source_height = xHeight(iframe_obj);
|
||||
|
||||
xAddEventListener(document, 'mousemove', editorDragMove, false);
|
||||
xAddEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
}
|
||||
|
||||
function editorDragMove(evt) {
|
||||
if(!editorDragObj.isDrag) return;
|
||||
|
||||
var e = new xEvent(evt);
|
||||
var h = e.pageY - editorDragObj.y;
|
||||
|
||||
editorDragObj.isDrag = true;
|
||||
editorDragObj.y = e.pageY;
|
||||
editorDragObj.obj = e.target;
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
xHeight(iframe_obj, xHeight(iframe_obj)+h);
|
||||
xHeight(iframe_obj.parentNode, xHeight(iframe_obj)+10);
|
||||
}
|
||||
|
||||
function editorDragStop(evt) {
|
||||
if(!editorDragObj.isDrag) return;
|
||||
|
||||
xRemoveEventListener(document, 'mousemove', editorDragMove, false);
|
||||
xRemoveEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
if(typeof(fixAdminLayoutFooter)=='function') fixAdminLayoutFooter(xHeight(iframe_obj)-editorDragObj.source_height);
|
||||
|
||||
editorDragObj.isDrag = false;
|
||||
editorDragObj.y = 0;
|
||||
editorDragObj.obj = null;
|
||||
editorDragObj.id = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue