mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +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
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue