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

@ -26,6 +26,14 @@ function exec_xml(module, act, params, callback_func, response_tags, callback_fu
// 결과 처리 후 callback_func에 넘겨줌
function xml_response_filter(oXml, callback_func, response_tags, callback_func_arg, fo_obj) {
var text = oXml.getResponseText();
if(text && !/^<response>/i.test(text)) {
var waiting_obj = xGetElementById("waitingforserverresponse");
if(waiting_obj) waiting_obj.style.visibility = "hidden";
alert(text);
return null;
}
var xmlDoc = oXml.getResponseXml();
if(!xmlDoc) return null;
@ -64,6 +72,7 @@ function xml_handler() {
this.setPath = xml_handlerSetPath;
this.addParam = xml_handlerAddParam;
this.getResponseXml = xml_handlerGetResponseXML;
this.getResponseText = xml_handlerGetResponseText;
this.toZMsgObject = xml_handlerToZMsgObject;
this.parseXMLDoc = xml_parseXmlDoc;
@ -160,6 +169,13 @@ function xml_handlerGetResponseXML() {
return null;
}
function xml_handlerGetResponseText() {
if(this.objXmlHttp && this.objXmlHttp.readyState == 4 && isDef(this.objXmlHttp.responseText)) {
return this.objXmlHttp.responseText;
}
return null;
}
function xml_parseXmlDoc(dom) {
@ -217,6 +233,17 @@ function xml_handlerToZMsgObject(xmlDoc, tags) {
var parsed_array = this.parseXMLDoc(xmlDoc.getElementsByTagName('response')[0]);
if(typeof(parsed_array)=='undefined') {
var ret = new Array();
ret['error'] = -1;
ret['message'] = "Unexpected error occured.";
try{
if(typeof(xmlDoc.childNodes[0].firstChild.data)!='undefined') ret['message']+="\r\n"+xmlDoc.childNodes[0].firstChild.data;
} catch(e) {
}
return ret;
}
var obj_ret = new Array();
for(var i=0; i<tags.length; i++) {
var key = tags[i];
@ -417,7 +444,7 @@ $.exec_json = function(action,data,func){
}
};
$.fn.exec_html = function(action,data,type){
$.fn.exec_html = function(action,data,type,func,args){
if(typeof(data) == 'undefined') data = {};
if(!$.inArray(type, ['html','append','prepend'])) type = 'html';
@ -437,6 +464,7 @@ $.fn.exec_html = function(action,data,type){
,success : function(html){
$("#waitingforserverresponse").css('visibility','hidden');
self[type](html);
if($.isFunction(func)) func(args);
}
});
}