css 및 js 호출순서 조정기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2009-03-06 05:33:56 +00:00
parent 4f380d9c48
commit 61851f1dfe
2149 changed files with 109090 additions and 18689 deletions

View file

@ -28,9 +28,9 @@ function doPreProcessing(fo_obj) {
var type = fo_obj.type.value;
xDisplay('importForm','none');
xDisplay('process','block');
xInnerHtml('status','');
jQuery('#importForm').hide();
jQuery('#process').show();
jQuery('#status').empty();
prepared = false;
setTimeout(doPrepareDot, 50);
@ -48,17 +48,18 @@ function doPreProcessing(fo_obj) {
function doPrepareDot() {
if(prepared) return;
var str = xInnerHtml('status');
if(str.length<1 || str.length - preProcessingMsg.length > 50) str = preProcessingMsg;
var str = jQuery('#status').html();
if(str.length < 1 || str.length - preProcessingMsg.length > 50) str = preProcessingMsg;
else str += ".";
xInnerHtml('status', str);
jQuery('#status').html(str);
setTimeout(doPrepareDot, 50);
}
/* 준비가 끝났을때 호출되는 함수 */
function completePreProcessing(ret_obj, response_tags) {
prepared = true;
xInnerHtml('status','');
jQuery('#status').empty();
var status = ret_obj['status'];
var message = ret_obj['message'];
@ -76,17 +77,18 @@ function completePreProcessing(ret_obj, response_tags) {
return;
}
xDisplay('btn_reload','none');
xDisplay('btn_continue','block');
jQuery('#btn_reload').hide();
jQuery('#btn_continue').show();
var fo_obj = xGetElementById('fo_process');
var fo_obj = jQuery('#fo_process').get(0);
fo_obj.type.value = type;
fo_obj.total.value = total;
fo_obj.cur.value = cur;
fo_obj.key.value = key;
var fo_import = xGetElementById('fo_import');
var fo_import = jQuery('#fo_import').get(0);
if(fo_import && fo_import.target_module) fo_obj.target_module.value = fo_import.target_module.value;
if(fo_import && fo_import.guestbook_target_module) fo_obj.guestbook_target_module.value = fo_import.guestbook_target_module.value;
if(fo_import && fo_import.user_id) fo_obj.user_id.value = fo_import.user_id.value;
fo_obj.unit_count.value = fo_import.unit_count.options[fo_import.unit_count.selectedIndex].value;
@ -97,7 +99,7 @@ function completePreProcessing(ret_obj, response_tags) {
/* @brief 임포트 시작 */
function doImport() {
var fo_obj = xGetElementById('fo_process');
var fo_obj = jQuery('#fo_process').get(0);
var params = new Array();
params['type'] = fo_obj.type.value;
@ -105,6 +107,7 @@ function doImport() {
params['cur'] = fo_obj.cur.value;
params['key'] = fo_obj.key.value;
params['target_module'] = fo_obj.target_module.value;
params['guestbook_target_module'] = fo_obj.guestbook_target_module.value;
params['unit_count'] = fo_obj.unit_count.value;
params['user_id'] = fo_obj.user_id.value;
@ -124,26 +127,26 @@ function doImport() {
function completeImport(ret_obj, response_tags) {
var message = ret_obj['message'];
var type = ret_obj['type'];
var total = parseInt(ret_obj['total'],10);
var cur = parseInt(ret_obj['cur'],10);
var total = parseInt(ret_obj['total'], 10);
var cur = parseInt(ret_obj['cur'], 10);
var key = ret_obj['key'];
displayProgress(total, cur);
var fo_obj = xGetElementById('fo_process');
var fo_obj = jQuery('#fo_process').get(0);
fo_obj.type.value = type;
fo_obj.total.value = total;
fo_obj.cur.value = cur;
fo_obj.key.value = key;
// extract된 파일을 이용해서 import
if(total>cur) doImport();
if(total > cur) doImport();
else {
alert(message);
fo_obj.reset();
xDisplay('process','none');
xDisplay('importForm','block');
xGetElementById('fo_import').reset();
jQuery('#process').hide();
jQuery('#importForm').show();
jQuery('#fo_import').get(0).reset();
}
}
@ -151,19 +154,17 @@ function completeImport(ret_obj, response_tags) {
function displayProgress(total, cur) {
// 진행률 구함
var per = 0;
if(total > 0) per = Math.round(cur/total*100);
if(total > 0) per = Math.round(cur / total * 100);
else per = 100;
if(!per) per = 1;
var status = '<div class="progressBox"><div class="progress1" style="width:'+per+'%;">'+per+'%&nbsp;</div>';
status += '<div class="progress2">'+cur+'/'+total+'</div>';
status += '<div class="clear"></div></div>';
xInnerHtml('status', status);
jQuery('#status').html(status);
}
function insertSelectedModule(id, module_srl, mid, browser_title) {
var obj= xGetElementById('_'+id);
var sObj = xGetElementById(id);
sObj.value = module_srl;
obj.value = browser_title+' ('+mid+')';
jQuery('#' + id).val(module_srl);
jQuery('#_' + id).val(browser_title+' ('+mid+')');
}