mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
TTXML 포맷의 데이터를 import할 수 있도록 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3423 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c8bc698b93
commit
4239d02404
12 changed files with 455 additions and 5 deletions
|
|
@ -27,6 +27,10 @@
|
|||
<th scope="col"><label for="source_type_message">{$lang->type_message}</label></th>
|
||||
<td class="left"><input type="radio" name="source_type" value="message" id="source_type_message" /> <label for="source_type_message">{$lang->about_type_message}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="source_type_ttxml">{$lang->type_ttxml}</label></th>
|
||||
<td class="left"><input type="radio" name="source_type" value="ttxml" id="source_type_ttxml" /> <label for="source_type_ttxml">{$lang->about_type_ttxml}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="source_type_syncmember">{$lang->type_syncmember}</label></th>
|
||||
<td class="left"><input type="radio" name="source_type" value="sync" id="source_type_syncmember" /> <label for="source_type_syncmember">{$lang->about_type_syncmember}</label></td>
|
||||
|
|
|
|||
|
|
@ -181,3 +181,65 @@ function completeImportModule(ret_obj, response_tags) {
|
|||
}
|
||||
}
|
||||
|
||||
/* TTXML 데이터 import */
|
||||
function doImportTTXML(fo_obj) {
|
||||
var target_module = fo_obj.target_module.options[fo_obj.target_module.selectedIndex].value;
|
||||
if(!target_module) return false;
|
||||
|
||||
var xml_file = fo_obj.xml_file.value;
|
||||
if(!xml_file) return false;
|
||||
|
||||
var params = new Array();
|
||||
params['xml_file'] = xml_file;
|
||||
params['target_module'] = target_module;
|
||||
params['total_count'] = fo_obj.total_count.value;
|
||||
params['success_count'] = fo_obj.success_count.value;
|
||||
params['readed_line'] = fo_obj.readed_line.value;
|
||||
params['user_id'] = fo_obj.user_id.value;
|
||||
|
||||
var response_tags = new Array("error","message", "total_count", "success_count", "readed_line", "is_finished");
|
||||
|
||||
exec_xml('importer','procImporterAdminTTXMLImport', params, completeImportTTXML, response_tags);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function completeImportTTXML(ret_obj, response_tags) {
|
||||
var total_count = ret_obj['total_count'];
|
||||
var success_count = ret_obj['success_count'];
|
||||
var readed_line = ret_obj['readed_line'];
|
||||
var is_finished = ret_obj['is_finished'];
|
||||
|
||||
if(is_finished == '1') {
|
||||
var fo_obj = xGetElementById("fo_import");
|
||||
fo_obj.target_module.disabled = false;
|
||||
fo_obj.xml_file.disabled = false;
|
||||
fo_obj.total_count.value = 0;
|
||||
fo_obj.success_count.value = 0;
|
||||
fo_obj.readed_line.value = 0;
|
||||
|
||||
xGetElementById("status").style.display = "none";
|
||||
xGetElementById("status_button_prev").style.display = "block";
|
||||
xGetElementById("status_button").style.display = "none";
|
||||
|
||||
|
||||
xInnerHtml("status", ret_obj['message']);
|
||||
|
||||
alert(ret_obj['message']);
|
||||
} else {
|
||||
var fo_obj = xGetElementById("fo_import");
|
||||
fo_obj.target_module.disabled = true;
|
||||
fo_obj.xml_file.disabled = true;
|
||||
fo_obj.total_count.value = total_count;
|
||||
fo_obj.success_count.value = success_count;
|
||||
fo_obj.readed_line.value = readed_line;
|
||||
|
||||
xGetElementById("status").style.display = "block";
|
||||
xGetElementById("status_button_prev").style.display = "none";
|
||||
xGetElementById("status_button").style.display = "block";
|
||||
|
||||
xInnerHtml("status", ret_obj['message']);
|
||||
|
||||
doImportTTXML(fo_obj);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
60
modules/importer/tpl/ttxml.html
Normal file
60
modules/importer/tpl/ttxml.html
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<!--%import("js/importer_admin.js")-->
|
||||
<!--%import("css/importer.css")-->
|
||||
|
||||
<h3>{$lang->importer} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<!-- 설명 -->
|
||||
<div class="infoText">{nl2br($lang->about_importer)}</div>
|
||||
|
||||
<!-- step 1-2. 대상이 게시물 정보일 경우 대상 모듈 목록을 선택하도록 함 -->
|
||||
<div>
|
||||
<form action="./" method="get" onsubmit="return doImportTTXML(this)" id="fo_import">
|
||||
<input type="hidden" name="total_count" value="0" />
|
||||
<input type="hidden" name="success_count" value="0" />
|
||||
<input type="hidden" name="readed_line" value="0" />
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<caption>{$lang->import_step_title[1]} - {$lang->import_step_desc[12]}</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<select name="target_module">
|
||||
<option value="">====================</option>
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<option value="{$val->module_srl}">{$val->browser_title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr>
|
||||
<td>
|
||||
{$lang->user_id} : <input type="text" name="user_id" value="{$logged_info->user_id}" class="inputTypeText w200" />
|
||||
<p>{$lang->about_ttxml_user_id}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<caption>{$lang->import_step_title[2]} - {$lang->import_step_desc[2]}</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" name="xml_file" value="./" class="inputTypeText w400" />
|
||||
<p>ex1) ../module.xml</p>
|
||||
<p>ex2) http://...../module.xml</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="button">
|
||||
<div id="status_button_prev"><span class="button"><input type="submit" value="{$lang->cmd_next}" /></span></div>
|
||||
<div id="status_button" style="display:none"><span class="button"><input type="submit" value="{$lang->cmd_continue}" /></span></div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="status" style="display:none"></div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue