mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@34 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
679e241d4f
commit
976f4f4074
8 changed files with 118 additions and 97 deletions
|
|
@ -5,15 +5,15 @@
|
|||
**/
|
||||
|
||||
// xml handler을 이용하는 user function
|
||||
function exec_xml(method_name, act, params, callback_func, response_tags, callback_func_arg) {
|
||||
function exec_xml(module, act, params, callback_func, response_tags, callback_func_arg) {
|
||||
var oXml = new xml_handler();
|
||||
oXml.reset();
|
||||
oXml.setMethod(method_name);
|
||||
oXml.addParam('act', act);
|
||||
for(var key in params) {
|
||||
var val = params[key];
|
||||
oXml.addParam(key, val);
|
||||
}
|
||||
oXml.addParam('module', module);
|
||||
oXml.addParam('act', act);
|
||||
|
||||
var waiting_obj = document.getElementById('waitingforserverresponse');
|
||||
waiting_obj.style.visibility = 'visible';
|
||||
|
|
@ -49,7 +49,6 @@ function xml_handler() {
|
|||
this.getXmlHttp = zGetXmlHttp;
|
||||
this.request = xml_handlerRequest;
|
||||
this.setPath = xml_handlerSetPath;
|
||||
this.setMethod = xml_handlerSetMethod;
|
||||
this.addParam = xml_handlerAddParam;
|
||||
this.getResponseXml = xml_handlerGetResponseXML;
|
||||
this.toZMsgObject = xml_handlerToZMsgObject;
|
||||
|
|
@ -74,7 +73,6 @@ function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags,
|
|||
var rd = "";
|
||||
rd += "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"
|
||||
+ "<methodCall>\n"
|
||||
+ "<methodName>"+this.method_name+"</methodName>\n"
|
||||
+ "<params>\n"
|
||||
|
||||
for (var key in this.params) {
|
||||
|
|
@ -97,9 +95,6 @@ function xml_handlerSetPath(path) {
|
|||
this.xml_path = "./"+path;
|
||||
}
|
||||
|
||||
function xml_handlerSetMethod(method_name) {
|
||||
this.method_name = method_name;
|
||||
}
|
||||
|
||||
function xml_handlerReset() {
|
||||
this.obj_xmlHttp = this.getXmlHttp();
|
||||
|
|
|
|||
|
|
@ -6,16 +6,23 @@
|
|||
|
||||
var alertMsg = new Array();
|
||||
|
||||
// filtering
|
||||
function XmlJsFilter(form_object, callback_user_func) {
|
||||
function filterAlertMessage(ret_obj) {
|
||||
var error = ret_obj["error"];
|
||||
var message = ret_obj["message"];
|
||||
if(typeof(message)!='undefined'&&message) alert(message);
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
// filtering
|
||||
function XmlJsFilter(form_object, module, act, callback_user_func) {
|
||||
|
||||
this.fo_obj = null;
|
||||
this.user_func = null;
|
||||
this.field = new Array();
|
||||
this.parameter = new Array();
|
||||
this.response = new Array();
|
||||
|
||||
this.fo_obj = form_object;
|
||||
this.module = module;
|
||||
this.act = act;
|
||||
this.user_func = callback_user_func;
|
||||
|
||||
this.addFieldItem = XmlJsFilterAddFieldItem;
|
||||
|
|
@ -210,21 +217,19 @@ function XmlJsFilterProc(confirm_msg) {
|
|||
|
||||
var params = this.getParameterParam();
|
||||
var response = this.response;
|
||||
var mid = params['mid'];
|
||||
var act = params['act'];
|
||||
|
||||
if(confirm_msg && !confirm(confirm_msg)) return false;
|
||||
|
||||
if(!act) {
|
||||
if(!this.act) {
|
||||
this.user_func(this.fo_obj, params);
|
||||
return true;
|
||||
}
|
||||
|
||||
exec_xml(mid, act, params, this.user_func, response, params);
|
||||
exec_xml(this.module, this.act, params, this.user_func, response, params);
|
||||
}
|
||||
|
||||
// form proc
|
||||
function procFormFilter(fo_obj, filter_func, user_func) {
|
||||
filter_func(fo_obj, user_func);
|
||||
function procFilter(fo_obj, filter_func) {
|
||||
filter_func(fo_obj);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue