mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-20 10:52:14 +09:00
xquared 적용을 위한 javascript 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3038 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
04a1fed23c
commit
4a55cfe522
9 changed files with 28 additions and 18 deletions
|
|
@ -10,6 +10,7 @@ function exec_xml(module, act, params, callback_func, response_tags, callback_fu
|
|||
var oXml = new xml_handler();
|
||||
oXml.reset();
|
||||
for(var key in params) {
|
||||
if(!params.hasOwnProperty(key)) continue;
|
||||
var val = params[key];
|
||||
oXml.addParam(key, val);
|
||||
}
|
||||
|
|
@ -88,6 +89,7 @@ function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags,
|
|||
+ "<params>\n"
|
||||
|
||||
for (var key in this.params) {
|
||||
if(!this.params.hasOwnProperty(key)) continue;
|
||||
var val = this.params[key];
|
||||
rd += "<"+key+"><![CDATA["+val+"]]></"+key+">\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,9 +302,10 @@ function XmlJsFilterProc(confirm_msg) {
|
|||
function procFilter(fo_obj, filter_func) {
|
||||
// form문 안에 위지윅 에디터가 세팅되어 있을 경우 에디터의 값과 지정된 content field를 sync
|
||||
var editor_sequence = fo_obj.getAttribute('editor_sequence');
|
||||
if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined' && typeof(editorGetContent)=='function') {
|
||||
var content = editorGetContent(editor_sequence);
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined') {
|
||||
if(typeof(editorRelKeys[editor_sequence]['func']) =='function') {
|
||||
editorRelKeys[editor_sequence]['func'](editor_sequence);
|
||||
}
|
||||
}
|
||||
|
||||
filter_func(fo_obj);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
<div class="blogWrite">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end--> class="blogEditor" id="fo_write">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end--> class="blogEditor" id="fo_write">
|
||||
<fieldset>
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
<div class="boardWrite">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end--> class="boardEditor" id="fo_write">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end--> class="boardEditor" id="fo_write">
|
||||
<fieldset>
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<!--%import("css/editor.css")-->
|
||||
|
||||
<!-- 기본 js/언어파일 로드 -->
|
||||
<!--%import("../../tpl/js/editor_common.js")-->
|
||||
<!--%import("../../tpl/js/editor.js")-->
|
||||
|
||||
<!-- 에디터 활성화 -->
|
||||
|
|
|
|||
|
|
@ -4,14 +4,6 @@
|
|||
* @brief 에디터 관련 스크립트
|
||||
*/
|
||||
|
||||
/**
|
||||
* 에디터에서 사용하기 위한 변수
|
||||
**/
|
||||
var editorMode = new Array(); ///<< 에디터의 html편집 모드 flag 세팅 변수 (html or null)
|
||||
var editorAutoSaveObj = {fo_obj:null, editor_sequence:0, title:'', content:'', locked:false} ///< 자동저장을 위한 정보를 가진 object
|
||||
var editorRelKeys = new Array(); ///< 에디터와 각 모듈과의 연동을 위한 key 값을 보관하는 변수
|
||||
var editorDragObj = {isDrag:false, y:0, obj:null, id:'', det:0, source_height:0}
|
||||
|
||||
/**
|
||||
* 에디터 사용시 사용되는 이벤트 연결 함수 호출
|
||||
**/
|
||||
|
|
@ -33,6 +25,11 @@ function editorGetTextArea(editor_sequence) {
|
|||
return xGetElementById( 'editor_textarea_' + editor_sequence );
|
||||
}
|
||||
|
||||
function editorSync(editor_sequence) {
|
||||
editorRelKeys[editor_sequence]['content'].value = editorGetContent(editor_sequence);
|
||||
}
|
||||
|
||||
|
||||
// editor_sequence에 해당하는 form문 구함
|
||||
function editorGetForm(editor_sequence) {
|
||||
var iframe_obj = editorGetIFrame(editor_sequence);
|
||||
|
|
@ -112,6 +109,7 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height) {
|
|||
editorRelKeys[editor_sequence] = new Array();
|
||||
editorRelKeys[editor_sequence]["primary"] = fo_obj[primary_key];
|
||||
editorRelKeys[editor_sequence]["content"] = fo_obj[content_key];
|
||||
editorRelKeys[editor_sequence]["func"] = editorSync;
|
||||
|
||||
// saved document(자동저장 문서)에 대한 확인
|
||||
if(typeof(fo_obj._saved_doc_title)!="undefined" ) { ///<< _saved_doc_title field가 없으면 자동저장 하지 않음
|
||||
|
|
|
|||
7
modules/editor/tpl/js/editor_common.js
Normal file
7
modules/editor/tpl/js/editor_common.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* 에디터에서 사용하기 위한 변수
|
||||
**/
|
||||
var editorMode = new Array(); ///<< 에디터의 html편집 모드 flag 세팅 변수 (html or null)
|
||||
var editorAutoSaveObj = {fo_obj:null, editor_sequence:0, title:'', content:'', locked:false} ///< 자동저장을 위한 정보를 가진 object
|
||||
var editorRelKeys = new Array(); ///< 에디터와 각 모듈과의 연동을 위한 key 값을 보관하는 변수
|
||||
var editorDragObj = {isDrag:false, y:0, obj:null, id:'', det:0, source_height:0}
|
||||
|
|
@ -18,8 +18,8 @@ var uploaded_files = new Array();
|
|||
* 이 함수는 editor.html 에서 파일 업로드 가능할 경우 호출됨
|
||||
**/
|
||||
// window.load 이벤트일 경우 && 문서 번호가 가상의 번호가 아니면 기존에 저장되어 있을지도 모르는 파일 목록을 가져옴
|
||||
function editor_upload_init(editor_sequence) {
|
||||
xAddEventListener(window,'load',function() { editor_upload_start(editor_sequence);} );
|
||||
function editor_upload_init(editor_sequence, el) {
|
||||
xAddEventListener(window,'load',function() { editor_upload_start(editor_sequence, el);} );
|
||||
}
|
||||
|
||||
function editor_upload_get_target_srl(editor_sequence) {
|
||||
|
|
@ -32,7 +32,7 @@ function editor_upload_get_uploader_name(editor_sequence) {
|
|||
}
|
||||
|
||||
// 파일 업로드를 위한 기본 준비를 함
|
||||
function editor_upload_start(editor_sequence) {
|
||||
function editor_upload_start(editor_sequence, fo_obj) {
|
||||
// 캐시 삭제
|
||||
try { document.execCommand('BackgroundImageCache',false,true); } catch(e) { }
|
||||
|
||||
|
|
@ -58,7 +58,8 @@ function editor_upload_start(editor_sequence) {
|
|||
if(!field_obj) return;
|
||||
|
||||
// 에디터를 감싸는 form을 구해 submit target을 임시 iframe으로 변경
|
||||
var fo_obj = editorGetForm(editor_sequence);
|
||||
if(!fo_obj)
|
||||
fo_obj = editorGetForm(editor_sequence);
|
||||
fo_obj.target = 'tmp_upload_iframe';
|
||||
|
||||
// SWF uploader 생성
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<div class="boardWrite">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert)" class="boardEditor">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" class="boardEditor">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
|
||||
<input type="hidden" name="document_srl" value="{$oDocument->get('document_srl')}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue