mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 07:39:55 +09:00
게시판/블로그/페이지 모듈의 글작성 하단에 미리보기 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2014 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5278a58c80
commit
812283e33a
22 changed files with 72 additions and 14 deletions
|
|
@ -562,3 +562,35 @@ function setLangType(lang_type) {
|
|||
expire.setTime(expire.getTime()+ (7000 * 24 * 3600000));
|
||||
xSetCookie('lang_type', lang_type, expire);
|
||||
}
|
||||
|
||||
/* 미리보기 */
|
||||
function doDocumentPreview(obj) {
|
||||
var fo_obj = obj;
|
||||
while(fo_obj.nodeName != "FORM") {
|
||||
fo_obj = fo_obj.parentNode;
|
||||
}
|
||||
if(fo_obj.nodeName != "FORM") return;
|
||||
|
||||
var content = fo_obj.content.value;
|
||||
|
||||
var win = window.open("","previewDocument","toolbars=no,width=700px;height:800px;");
|
||||
|
||||
var dummy_obj = xGetElementById("previewDocument");
|
||||
|
||||
if(!dummy_obj) {
|
||||
var fo_code = '<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'">'+
|
||||
'<input type="hidden" name="module" value="document" />'+
|
||||
'<input type="hidden" name="act" value="dispDocumentPreview" />'+
|
||||
'<input type="hidden" name="content" />'+
|
||||
'</form>';
|
||||
var dummy = xCreateElement("DIV");
|
||||
xInnerHtml(dummy, fo_code);
|
||||
window.document.body.insertBefore(dummy,window.document.body.lastChild);
|
||||
dummy_obj = xGetElementById("previewDocument");
|
||||
}
|
||||
|
||||
if(dummy_obj) {
|
||||
dummy_obj.content.value = content;
|
||||
dummy_obj.submit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue