데이터 이전시 속도 업그레이드. % 그래프로 진행상황 보여주기등등..

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2003 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-25 04:39:59 +00:00
parent 0cf440e0b1
commit 359ba483a4
4 changed files with 94 additions and 33 deletions

View file

@ -8,5 +8,7 @@
<tag name="message" />
<tag name="is_finished" />
<tag name="position" />
<tag name="file_point" />
<tag name="total_count" />
</response>
</filter>

View file

@ -78,6 +78,8 @@
<input type="hidden" name="module_srl" value="" />
<input type="hidden" name="category_srl" value="" />
<input type="hidden" name="position" value="0" />
<input type="hidden" name="file_point" value="0" />
<input type="hidden" name="total_count" value="0" />
<div class="title">{$lang->import_step_title[2]}</div>
<div class="desc">{$lang->import_step_desc[2]}</div>
@ -95,7 +97,15 @@
</div>
<div id="step2_status" style="display:none;" class="gap1">
<div id="step2_position" style="height:150px;overflow-y:scroll;border:2px solid #DDDDDD;padding:10px;" class="desc"></div>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-bottom:10px;">
<col />
<col width="120" />
<tr>
<td><div id="bar" style="width:1px;height:10px;background-color:#EFEFEF;border:1px solid #888888"></div></td>
<td class="tRight"><span id="bar_status"></span>
</tr>
</table>
<div id="step2_position" style="height:100px;overflow-y:scroll;border:2px solid #DDDDDD;padding:10px;" class="desc"></div>
<div class="tRight gap1">
<span class="button"><input type="button" value="{$lang->cmd_continue}" onclick="doManualProcess(); return false" /></span>
</div>

View file

@ -87,6 +87,16 @@ function completeImport(ret_obj) {
var message = ret_obj['message'];
var is_finished = ret_obj['is_finished'];
var position = ret_obj['position'];
var file_point = ret_obj['file_point'];
var total_count = ret_obj['total_count'];
if(total_count>0) {
var bar = xGetElementById('bar');
var status = xGetElementById('bar_status');
var per = parseInt(position/total_count*100,10)
xInnerHtml(status, position+'/'+total_count+' ('+per+'%)');
bar.style.width = per+'%';
}
if(is_finished=='Y') {
alert(ret_obj["message"]);
@ -94,16 +104,16 @@ function completeImport(ret_obj) {
} else {
var fo_obj = xGetElementById('fo_step2');
fo_obj.position.value = position;
fo_obj.file_point.value = file_point;
fo_obj.total_count.value = total_count;
message = message.replace(/&lt;/g,"<").replace(/&gt;/g,">");
var obj = xGetElementById('step2_position');
var txt = xInnerHtml(obj);
if(txt.length > 1024*256) txt = '';
xInnerHtml(obj, txt+message);
if(txt.length > 1024*10) txt = '';
if(message != "success") xInnerHtml(obj, txt+message);
obj.scrollTop += xHeight(obj);
procFilter(fo_obj, import_xml);
}
}