first commit

This commit is contained in:
2024-12-12 15:33:18 +01:00
commit 2c8998663e
3360 changed files with 777573 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
if(!this.JSON){this.JSON={};}
(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());

View File

@@ -0,0 +1,482 @@
/*
http://www.JSON.org/json2.js
2010-08-25
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
NOT CONTROL.
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
replacer an optional parameter that determines how object
values are stringified for objects. It can be a
function or an array of strings.
space an optional parameter that specifies the indentation
of nested structures. If it is omitted, the text will
be packed without extra whitespace. If it is a number,
it will specify the number of spaces to indent at each
level. If it is a string (such as '\t' or '&nbsp;'),
it contains the characters used to indent at each level.
This method produces a JSON text from a JavaScript value.
When an object value is found, if the object contains a toJSON
method, its toJSON method will be called and the result will be
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
will be passed the key associated with the value, and this will be
bound to the value
For example, this would serialize Dates as ISO strings.
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
You can provide an optional replacer method. It will be passed the
key and value of each member, with this bound to the containing
object. The value that is returned from your method will be
serialized. If your method returns undefined, then the member will
be excluded from the serialization.
If the replacer parameter is an array of strings, then it will be
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.
Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects will be
dropped; in arrays they will be replaced with null. You can use
a replacer function to replace those with JSON values.
JSON.stringify(undefined) returns undefined.
The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.
If the space parameter is a non-empty string, then that string will
be used for indentation. If the space parameter is a number, then
the indentation will be that many spaces.
Example:
text = JSON.stringify(['e', {pluribus: 'unum'}]);
// text is '["e",{"pluribus":"unum"}]'
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
});
// text is '["Date(---current time---)"]'
JSON.parse(text, reviver)
This method parses a JSON text to produce an object or array.
It can throw a SyntaxError exception.
The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.
Example:
// Parse the text. Values that look like ISO date strings will
// be converted to Date objects.
myData = JSON.parse(text, function (key, value) {
var a;
if (typeof value === 'string') {
a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
if (a) {
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+a[5], +a[6]));
}
}
return value;
});
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
var d;
if (typeof value === 'string' &&
value.slice(0, 5) === 'Date(' &&
value.slice(-1) === ')') {
d = new Date(value.slice(5, -1));
if (d) {
return d;
}
}
return value;
});
This is a reference implementation. You are free to copy, modify, or
redistribute.
*/
/*jslint evil: true, strict: false */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
*/
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
if (!this.JSON) {
this.JSON = {};
}
(function () {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON !== 'function') {
Date.prototype.toJSON = function (key) {
return isFinite(this.valueOf()) ?
this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z' : null;
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ?
'"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' :
'"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0 ? '[]' :
gap ? '[\n' + gap +
partial.join(',\n' + gap) + '\n' +
mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
k = rep[i];
if (typeof k === 'string') {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0 ? '{}' :
gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
mind + '}' : '{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
// If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse');
};
}
}());

View File

@@ -0,0 +1,434 @@
if('undefined'==typeof xajax)
xajax={};if('undefined'==typeof xajax.config)
xajax.config={};xajax.config.setDefault=function(option,defaultValue){if('undefined'==typeof xajax.config[option])
xajax.config[option]=defaultValue;}
xajax.config.setDefault('commonHeaders',{'If-Modified-Since':'Sat, 1 Jan 2000 00:00:00 GMT'
});xajax.config.setDefault('postHeaders',{});xajax.config.setDefault('getHeaders',{});xajax.config.setDefault('waitCursor',false);xajax.config.setDefault('statusMessages',false);xajax.config.setDefault('baseDocument',document);xajax.config.setDefault('requestURI',xajax.config.baseDocument.URL);xajax.config.setDefault('defaultMode','asynchronous');xajax.config.setDefault('defaultHttpVersion','HTTP/1.1');xajax.config.setDefault('defaultContentType','application/x-www-form-urlencoded');xajax.config.setDefault('defaultResponseDelayTime',1000);xajax.config.setDefault('defaultExpirationTime',10000);xajax.config.setDefault('defaultMethod','POST');xajax.config.setDefault('defaultRetry',5);xajax.config.setDefault('defaultReturnValue',false);xajax.config.setDefault('maxObjectDepth',20);xajax.config.setDefault('maxObjectSize',2000);xajax.config.setDefault('responseQueueSize',1000);xajax.config.status={update:function(){return{onRequest:function(){window.status='Sending Request...';},
onWaiting:function(){window.status='Waiting for Response...';},
onProcessing:function(){window.status='Processing...';},
onComplete:function(){window.status='Done.';}
}
},
dontUpdate:function(){return{onRequest:function(){},
onWaiting:function(){},
onProcessing:function(){},
onComplete:function(){}
}
}
}
xajax.config.cursor={update:function(){return{onWaiting:function(){if(xajax.config.baseDocument.body)
xajax.config.baseDocument.body.style.cursor='wait';},
onComplete:function(){xajax.config.baseDocument.body.style.cursor='auto';}
}
},
dontUpdate:function(){return{onWaiting:function(){},
onComplete:function(){}
}
}
}
xajax.tools={}
xajax.tools.$=function(sId){if(!sId)
return null;var oDoc=xajax.config.baseDocument;var obj=oDoc.getElementById(sId);if(obj)
return obj;if(oDoc.all)
return oDoc.all[sId];return obj;}
xajax.tools.in_array=function(array,valueToCheck){var i=0;var l=array.length;while(i < l){if(array[i]==valueToCheck)
return true;++i;}
return false;}
xajax.tools.doubleQuotes=function(haystack){return haystack.replace(new RegExp("'",'g'),'"');}
xajax.tools._enforceDataType=function(value){value=new String(value);var type=value.substr(0,1);value=value.substr(1);if('*'==type)
value=null;else if('N'==type)
value=value-0;else if('B'==type)
value=!!value;return value;}
xajax.tools._nodeToObject=function(node){if(null==node)
return '';if('undefined'!=typeof node.nodeName){if('#cdata-section'==node.nodeName||'#text'==node.nodeName){var data='';do if(node.data)data+=node.data;while(node=node.nextSibling);return xajax.tools._enforceDataType(data);}else if('xjxobj'==node.nodeName){var key=null;var value=null;var data=new Array;var child=node.firstChild;while(child){if('e'==child.nodeName){var grandChild=child.firstChild;while(grandChild){if('k'==grandChild.nodeName)
key=xajax.tools._enforceDataType(grandChild.firstChild.data);else('v'==grandChild.nodeName)
value=xajax.tools._nodeToObject(grandChild.firstChild);grandChild=grandChild.nextSibling;}
if(null!=key){data[key]=value;key=value=null;}
}
child=child.nextSibling;}
return data;}
}
throw{code:10001,data:node.nodeName};}
xajax.tools.getRequestObject=function(){if('undefined'!=typeof XMLHttpRequest){xajax.tools.getRequestObject=function(){return new XMLHttpRequest();}
}else if('undefined'!=typeof ActiveXObject){xajax.tools.getRequestObject=function(){try{return new ActiveXObject('Msxml2.XMLHTTP.4.0');}catch(e){xajax.tools.getRequestObject=function(){try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(e2){xajax.tools.getRequestObject=function(){return new ActiveXObject('Microsoft.XMLHTTP');}
return xajax.tools.getRequestObject();}
}
return xajax.tools.getRequestObject();}
}
}else if(window.createRequest){xajax.tools.getRequestObject=function(){return window.createRequest();}
}else{xajax.tools.getRequestObject=function(){throw{code:10002};}
}
return xajax.tools.getRequestObject();}
xajax.tools.getBrowserHTML=function(sValue){var oDoc=xajax.config.baseDocument;if(!oDoc.body)
return '';var elWorkspace=xajax.$('xajax_temp_workspace');if(!elWorkspace){elWorkspace=oDoc.createElement('div');elWorkspace.setAttribute('id','xajax_temp_workspace');elWorkspace.style.display='none';elWorkspace.style.visibility='hidden';oDoc.body.appendChild(elWorkspace);}
elWorkspace.innerHTML=sValue;var browserHTML=elWorkspace.innerHTML;elWorkspace.innerHTML='';return browserHTML;}
xajax.tools.willChange=function(element,attribute,newData){if('string'==typeof element)
element=xajax.$(element);if(element){var oldData;eval('oldData=element.'+attribute);return(newData!=oldData);}
return false;}
xajax.tools.getFormValues=function(parent){var submitDisabledElements=false;if(arguments.length > 1&&arguments[1]==true)
submitDisabledElements=true;var prefix='';if(arguments.length > 2)
prefix=arguments[2];if('string'==typeof parent)
parent=xajax.$(parent);var aFormValues={};if(parent)
if(parent.childNodes)
xajax.tools._getFormValues(aFormValues,parent.childNodes,submitDisabledElements,prefix);return aFormValues;}
xajax.tools._getFormValues=function(aFormValues,children,submitDisabledElements,prefix){var iLen=children.length;for(var i=0;i < iLen;++i){var child=children[i];if(('undefined'!=typeof child.childNodes)&&(child.type!='select-one')&&(child.type!='select-multiple'))
xajax.tools._getFormValues(aFormValues,child.childNodes,submitDisabledElements,prefix);xajax.tools._getFormValue(aFormValues,child,submitDisabledElements,prefix);}
}
xajax.tools._getFormValue=function(aFormValues,child,submitDisabledElements,prefix){if(!child.name)
return;if('PARAM'==child.tagName)return;if(child.disabled)
if(true==child.disabled)
if(false==submitDisabledElements)
return;if(prefix!=child.name.substring(0,prefix.length))
return;if(child.type)
if(child.type=='radio'||child.type=='checkbox')
if(false==child.checked)
return;var name=child.name;var values=[];if('select-multiple'==child.type){var jLen=child.length;for(var j=0;j < jLen;++j){var option=child.options[j];if(true==option.selected)
values.push(option.value);}
}else{values=child.value;}
var keyBegin=name.indexOf('[');if(0 <=keyBegin){var n=name;var k=n.substr(0,n.indexOf('['));var a=n.substr(n.indexOf('['));if(typeof aFormValues[k]=='undefined')
aFormValues[k]=[];var p=aFormValues;while(a.length!=0){var sa=a.substr(0,a.indexOf(']')+1);var lk=k;var lp=p;a=a.substr(a.indexOf(']')+1);p=p[k];k=sa.substr(1,sa.length-2);if(k==''){if('select-multiple'==child.type){k=lk;p=lp;}else{k=p.length;}
}
if(typeof p[k]=='undefined')
p[k]=[];}
p[k]=values;}else{aFormValues[name]=values;}
}
xajax.tools.stripOnPrefix=function(sEventName){sEventName=sEventName.toLowerCase();if(0==sEventName.indexOf('on'))
sEventName=sEventName.replace(/on/,'');return sEventName;}
xajax.tools.addOnPrefix=function(sEventName){sEventName=sEventName.toLowerCase();if(0!=sEventName.indexOf('on'))
sEventName='on'+sEventName;return sEventName;}
xajax.tools.xml={};xajax.tools.xml.parseAttributes=function(child,obj){var iLen=child.attributes.length;for(var i=0;i < iLen;++i){var attr=child.attributes[i];obj[attr.name]=attr.value;}
}
xajax.tools.xml.parseChildren=function(child,obj){obj.data='';if(0 < child.childNodes.length){if(1 < child.childNodes.length){var grandChild=child.firstChild;do{if('#cdata-section'==grandChild.nodeName||'#text'==grandChild.nodeName){obj.data+=grandChild.data;}
}while(grandChild=grandChild.nextSibling);}else{var grandChild=child.firstChild;if('xjxobj'==grandChild.nodeName){obj.data=xajax.tools._nodeToObject(grandChild);return;}else if('#cdata-section'==grandChild.nodeName||'#text'==grandChild.nodeName){obj.data=grandChild.data;}
}
}else if('undefined'!=typeof child.data){obj.data=child.data;}
obj.data=xajax.tools._enforceDataType(obj.data);}
xajax.tools.xml.processFragment=function(xmlNode,seq,oRet,oRequest){var xx=xajax;var xt=xx.tools;while(xmlNode){if('cmd'==xmlNode.nodeName){var obj={};obj.fullName='*unknown*';obj.sequence=seq;obj.request=oRequest;obj.context=oRequest.context;xt.xml.parseAttributes(xmlNode,obj);xt.xml.parseChildren(xmlNode,obj);xt.queue.push(xx.response,obj);}else if('xjxrv'==xmlNode.nodeName){oRet=xt._nodeToObject(xmlNode.firstChild);}else if('debugmsg'==xmlNode.nodeName){}else
throw{code:10004,data:xmlNode.nodeName}
++seq;xmlNode=xmlNode.nextSibling;}
return oRet;}
xajax.tools.queue={}
xajax.tools.queue.create=function(size){return{start:0,
size:size,
end:0,
commands:[],
timeout:null
}
}
xajax.tools.queue.retry=function(obj,count){var retries=obj.retries;if(retries){--retries;if(1 > retries)
return false;}else retries=count;obj.retries=retries;return true;}
xajax.tools.queue.rewind=function(theQ){if(0 < theQ.start)
--theQ.start;else
theQ.start=theQ.size;}
xajax.tools.queue.setWakeup=function(theQ,when){if(null!=theQ.timeout){clearTimeout(theQ.timeout);theQ.timeout=null;}
theQ.timout=setTimeout(function(){xajax.tools.queue.process(theQ);},when);}
xajax.tools.queue.process=function(theQ){if(null!=theQ.timeout){clearTimeout(theQ.timeout);theQ.timeout=null;}
var obj=xajax.tools.queue.pop(theQ);while(null!=obj){try{if(false==xajax.executeCommand(obj))
return false;}catch(e){}
delete obj;obj=xajax.tools.queue.pop(theQ);}
return true;}
xajax.tools.queue.push=function(theQ,obj){var next=theQ.end+1;if(next > theQ.size)
next=0;if(next!=theQ.start){theQ.commands[theQ.end]=obj;theQ.end=next;}else
throw{code:10003}
}
xajax.tools.queue.pushFront=function(theQ,obj){xajax.tools.queue.rewind(theQ);theQ.commands[theQ.start]=obj;}
xajax.tools.queue.pop=function(theQ){var next=theQ.start;if(next==theQ.end)
return null;next++;if(next > theQ.size)
next=0;var obj=theQ.commands[theQ.start];delete theQ.commands[theQ.start];theQ.start=next;return obj;}
xajax.responseProcessor={};xajax.tools.json={}
xajax.tools.json.processFragment=function(nodes,seq,oRet,oRequest){var xx=xajax;var xt=xx.tools;for(nodeName in nodes){if('xjxobj'==nodeName){for(a in nodes[nodeName]){var obj=nodes[nodeName][a];obj.fullName='*unknown*';obj.sequence=seq;obj.request=oRequest;obj.context=oRequest.context;xt.queue.push(xx.response,obj);++seq;}
}else if('xjxrv'==nodeName){oRet=nodes[nodeName];}else if('debugmsg'==nodeName){txt=nodes[nodeName];}else
throw{code:10004,data:obj.fullName}
}
return oRet;}
xajax.responseProcessor.json=function(oRequest){var xx=xajax;var xt=xx.tools;var xcb=xx.callback;var gcb=xcb.global;var lcb=oRequest.callback;var oRet=oRequest.returnValue;if(xt.in_array(xx.responseSuccessCodes,oRequest.request.status)){xcb.execute([gcb,lcb],'onSuccess',oRequest);var seq=0;if(oRequest.request.responseText){try{var responseJSON=eval('('+oRequest.request.responseText+')');}catch(ex){throw(ex);}
if(('object'==typeof responseJSON)&&('object'==typeof responseJSON.xjxobj)){oRequest.status.onProcessing();oRet=xt.json.processFragment(responseJSON,seq,oRet,oRequest);}else{}
}
var obj={};obj.fullName='Response Complete';obj.sequence=seq;obj.request=oRequest;obj.context=oRequest.context;obj.cmd='rcmplt';xt.queue.push(xx.response,obj);if(null==xx.response.timeout)
xt.queue.process(xx.response);}else if(xt.in_array(xx.responseRedirectCodes,oRequest.request.status)){xcb.execute([gcb,lcb],'onRedirect',oRequest);window.location=oRequest.request.getResponseHeader('location');xx.completeResponse(oRequest);}else if(xt.in_array(xx.responseErrorsForAlert,oRequest.request.status)){xcb.execute([gcb,lcb],'onFailure',oRequest);xx.completeResponse(oRequest);}
return oRet;}
xajax.responseProcessor.xml=function(oRequest){var xx=xajax;var xt=xx.tools;var xcb=xx.callback;var gcb=xcb.global;var lcb=oRequest.callback;var oRet=oRequest.returnValue;if(xt.in_array(xx.responseSuccessCodes,oRequest.request.status)){xcb.execute([gcb,lcb],'onSuccess',oRequest);var seq=0;if(oRequest.request.responseXML){var responseXML=oRequest.request.responseXML;if(responseXML.documentElement){oRequest.status.onProcessing();var child=responseXML.documentElement.firstChild;oRet=xt.xml.processFragment(child,seq,oRet,oRequest);}
}
var obj={};obj.fullName='Response Complete';obj.sequence=seq;obj.request=oRequest;obj.context=oRequest.context;obj.cmd='rcmplt';xt.queue.push(xx.response,obj);if(null==xx.response.timeout)
xt.queue.process(xx.response);}else if(xt.in_array(xx.responseRedirectCodes,oRequest.request.status)){xcb.execute([gcb,lcb],'onRedirect',oRequest);window.location=oRequest.request.getResponseHeader('location');xx.completeResponse(oRequest);}else if(xt.in_array(xx.responseErrorsForAlert,oRequest.request.status)){xcb.execute([gcb,lcb],'onFailure',oRequest);xx.completeResponse(oRequest);}
return oRet;}
xajax.js={}
xajax.js.includeScriptOnce=function(command){command.fullName='includeScriptOnce';var fileName=command.data;var oDoc=xajax.config.baseDocument;var loadedScripts=oDoc.getElementsByTagName('script');var iLen=loadedScripts.length;for(var i=0;i < iLen;++i){var script=loadedScripts[i];if(script.src){if(0 <=script.src.indexOf(fileName))
return true;}
}
return xajax.js.includeScript(command);}
xajax.js.includeScript=function(command){command.fullName='includeScript';var oDoc=xajax.config.baseDocument;var objHead=oDoc.getElementsByTagName('head');var objScript=oDoc.createElement('script');objScript.src=command.data;if('undefined'==typeof command.type)objScript.type='text/javascript';else objScript.type=command.type;if('undefined'!=typeof command.type)objScript.setAttribute('id',command.elm_id);objHead[0].appendChild(objScript);return true;}
xajax.js.removeScript=function(command){command.fullName='removeScript';var fileName=command.data;var unload=command.unld;var oDoc=xajax.config.baseDocument;var loadedScripts=oDoc.getElementsByTagName('script');var iLen=loadedScripts.length;for(var i=0;i < iLen;++i){var script=loadedScripts[i];if(script.src){if(0 <=script.src.indexOf(fileName)){if('undefined'!=typeof unload){var args={};args.data=unload;args.context=window;xajax.js.execute(args);}
var parent=script.parentNode;parent.removeChild(script);}
}
}
return true;}
xajax.js.sleep=function(command){command.fullName='sleep';if(xajax.tools.queue.retry(command,command.prop)){xajax.tools.queue.setWakeup(xajax.response,100);return false;}
return true;}
xajax.js.confirmCommands=function(command){command.fullName='confirmCommands';var msg=command.data;var numberOfCommands=command.id;if(false==confirm(msg)){while(0 < numberOfCommands){xajax.tools.queue.pop(xajax.response);--numberOfCommands;}
}
return true;}
xajax.js.execute=function(args){args.fullName='execute Javascript';var returnValue=true;args.context=args.context ? args.context:{};args.context.xajaxDelegateCall=function(){eval(args.data);};args.context.xajaxDelegateCall();return returnValue;}
xajax.js.waitFor=function(args){args.fullName='waitFor';var bResult=false;var cmdToEval='bResult = (';cmdToEval+=args.data;cmdToEval+=');';try{args.context.xajaxDelegateCall=function(){eval(cmdToEval);}
args.context.xajaxDelegateCall();}catch(e){}
if(false==bResult){if(xajax.tools.queue.retry(args,args.prop)){xajax.tools.queue.setWakeup(xajax.response,100);return false;}
}
return true;}
xajax.js.call=function(args){args.fullName='call js function';var parameters=args.data;var scr=new Array();scr.push(args.func);scr.push('(');if('undefined'!=typeof parameters){if('object'==typeof parameters){var iLen=parameters.length;if(0 < iLen){scr.push('parameters[0]');for(var i=1;i < iLen;++i)
scr.push(', parameters['+i+']');}
}
}
scr.push(');');args.context.xajaxDelegateCall=function(){eval(scr.join(''));}
args.context.xajaxDelegateCall();return true;}
xajax.js.setFunction=function(args){args.fullName='setFunction';var code=new Array();code.push(args.func);code.push(' = function(');if('object'==typeof args.prop){var separator='';for(var m in args.prop){code.push(separator);code.push(args.prop[m]);separator=',';}
}else code.push(args.prop);code.push(') { ');code.push(args.data);code.push(' }');args.context.xajaxDelegateCall=function(){eval(code.join(''));}
args.context.xajaxDelegateCall();return true;}
xajax.js.wrapFunction=function(args){args.fullName='wrapFunction';var code=new Array();code.push(args.func);code.push(' = xajax.js.makeWrapper(');code.push(args.func);code.push(', args.prop, args.data, args.type, args.context);');args.context.xajaxDelegateCall=function(){eval(code.join(''));}
args.context.xajaxDelegateCall();return true;}
xajax.js.makeWrapper=function(origFun,args,codeBlocks,returnVariable,context){var originalCall='';if(0 < returnVariable.length){originalCall+=returnVariable;originalCall+=' = ';}
var originalCall='origFun(';originalCall+=args;originalCall+='); ';var code='wrapper = function(';code+=args;code+=') { ';if(0 < returnVariable.length){code+=' var ';code+=returnVariable;code+=' = null;';}
var separator='';var bLen=codeBlocks.length;for(var b=0;b < bLen;++b){code+=separator;code+=codeBlocks[b];separator=originalCall;}
if(0 < returnVariable.length){code+=' return ';code+=returnVariable;code+=';';}
code+=' } ';var wrapper=null;context.xajaxDelegateCall=function(){eval(code);}
context.xajaxDelegateCall();return wrapper;}
xajax.dom={}
xajax.dom.assign=function(element,property,data){if('string'==typeof element)
element=xajax.$(element);switch(property){case 'innerHTML':
element.innerHTML=data;break;case 'outerHTML':
if('undefined'==typeof element.outerHTML){var r=xajax.config.baseDocument.createRange();r.setStartBefore(element);var df=r.createContextualFragment(data);element.parentNode.replaceChild(df,element);}else element.outerHTML=data;break;default:
if(xajax.tools.willChange(element,property,data))
eval('element.'+property+' = data;');break;}
return true;}
xajax.dom.append=function(element,property,data){if('string'==typeof element)
element=xajax.$(element);eval('element.'+property+' += data;');return true;}
xajax.dom.prepend=function(element,property,data){if('string'==typeof element)
element=xajax.$(element);eval('element.'+property+' = data + element.'+property);return true;}
xajax.dom.replace=function(element,sAttribute,aData){var sSearch=aData['s'];var sReplace=aData['r'];if(sAttribute=='innerHTML')
sSearch=xajax.tools.getBrowserHTML(sSearch);if('string'==typeof element)
element=xajax.$(element);eval('var txt = element.'+sAttribute);var bFunction=false;if('function'==typeof txt){txt=txt.join('');bFunction=true;}
var start=txt.indexOf(sSearch);if(start >-1){var newTxt=[];while(start >-1){var end=start+sSearch.length;newTxt.push(txt.substr(0,start));newTxt.push(sReplace);txt=txt.substr(end,txt.length-end);start=txt.indexOf(sSearch);}
newTxt.push(txt);newTxt=newTxt.join('');if(bFunction){eval('element.'+sAttribute+'=newTxt;');}else if(xajax.tools.willChange(element,sAttribute,newTxt)){eval('element.'+sAttribute+'=newTxt;');}
}
return true;}
xajax.dom.remove=function(element){if('string'==typeof element)
element=xajax.$(element);if(element&&element.parentNode&&element.parentNode.removeChild)
element.parentNode.removeChild(element);return true;}
xajax.dom.create=function(objParent,sTag,sId){if('string'==typeof objParent)
objParent=xajax.$(objParent);var target=xajax.config.baseDocument.createElement(sTag);target.setAttribute('id',sId);if(objParent)
objParent.appendChild(target);return true;}
xajax.dom.insert=function(objSibling,sTag,sId){if('string'==typeof objSibling)
objSibling=xajax.$(objSibling);var target=xajax.config.baseDocument.createElement(sTag);target.setAttribute('id',sId);objSibling.parentNode.insertBefore(target,objSibling);return true;}
xajax.dom.insertAfter=function(objSibling,sTag,sId){if('string'==typeof objSibling)
objSibling=xajax.$(objSibling);var target=xajax.config.baseDocument.createElement(sTag);target.setAttribute('id',sId);objSibling.parentNode.insertBefore(target,objSibling.nextSibling);return true;}
xajax.dom.contextAssign=function(args){args.fullName='context assign';var code=[];code.push('this.');code.push(args.prop);code.push(' = data;');code=code.join('');args.context.xajaxDelegateCall=function(data){eval(code);}
args.context.xajaxDelegateCall(args.data);return true;}
xajax.dom.contextAppend=function(args){args.fullName='context append';var code=[];code.push('this.');code.push(args.prop);code.push(' += data;');code=code.join('');args.context.xajaxDelegateCall=function(data){eval(code);}
args.context.xajaxDelegateCall(args.data);return true;}
xajax.dom.contextPrepend=function(args){args.fullName='context prepend';var code=[];code.push('this.');code.push(args.prop);code.push(' = data + this.');code.push(args.prop);code.push(';');code=code.join('');args.context.xajaxDelegateCall=function(data){eval(code);}
args.context.xajaxDelegateCall(args.data);return true;}
xajax.domResponse={}
xajax.domResponse.startResponse=function(args){xjxElm=[];}
xajax.domResponse.createElement=function(args){eval(
[ args.tgt,' = document.createElement(args.data)' ]
.join('')
);}
xajax.domResponse.setAttribute=function(args){args.context.xajaxDelegateCall=function(){eval(
[ args.tgt,'.setAttribute(args.key, args.data)' ]
.join('')
);}
args.context.xajaxDelegateCall();}
xajax.domResponse.appendChild=function(args){args.context.xajaxDelegateCall=function(){eval(
[ args.par,'.appendChild(',args.data,')' ]
.join('')
);}
args.context.xajaxDelegateCall();}
xajax.domResponse.insertBefore=function(args){args.context.xajaxDelegateCall=function(){eval(
[ args.tgt,'.parentNode.insertBefore(',args.data,', ',args.tgt,')' ]
.join('')
);}
args.context.xajaxDelegateCall();}
xajax.domResponse.insertAfter=function(args){args.context.xajaxDelegateCall=function(){eval(
[ args.tgt,'parentNode.insertBefore(',args.data,', ',args.tgt,'.nextSibling)' ]
.join('')
);}
args.context.xajaxDelegateCall();}
xajax.domResponse.appendText=function(args){args.context.xajaxDelegateCall=function(){eval(
[ args.par,'.appendChild(document.createTextNode(args.data))' ]
.join('')
);}
args.context.xajaxDelegateCall();}
xajax.domResponse.removeChildren=function(args){var skip=args.skip||0;var remove=args.remove||-1;var element=null;args.context.xajaxDelegateCall=function(){eval([ 'element = ',args.data ].join(''));}
args.context.xajaxDelegateCall();var children=element.childNodes;for(var i in children){if(isNaN(i)==false&&children[i].nodeType==1){if(skip > 0)skip=skip-1;else if(remove!=0){if(remove > 0)
remove=remove-1;element.removeChild(children[i]);}
}
}
}
xajax.domResponse.endResponse=function(args){xjxElm=[];}
xajax.css={}
xajax.css.add=function(fileName,media){var oDoc=xajax.config.baseDocument;var oHeads=oDoc.getElementsByTagName('head');var oHead=oHeads[0];var oLinks=oHead.getElementsByTagName('link');var found=false;var iLen=oLinks.length;for(var i=0;i < iLen&&false==found;++i)
if(0 <=oLinks[i].href.indexOf(fileName)&&oLinks[i].media==media)
found=true;if(false==found){var oCSS=oDoc.createElement('link');oCSS.rel='stylesheet';oCSS.type='text/css';oCSS.href=fileName;oCSS.media=media;oHead.appendChild(oCSS);}
return true;}
xajax.css.remove=function(fileName,media){var oDoc=xajax.config.baseDocument;var oHeads=oDoc.getElementsByTagName('head');var oHead=oHeads[0];var oLinks=oHead.getElementsByTagName('link');var i=0;while(i < oLinks.length)
if(0 <=oLinks[i].href.indexOf(fileName)&&oLinks[i].media==media)
oHead.removeChild(oLinks[i]);else++i;return true;}
xajax.css.waitForCSS=function(args){var oDocSS=xajax.config.baseDocument.styleSheets;var ssEnabled=[];var iLen=oDocSS.length;for(var i=0;i < iLen;++i){ssEnabled[i]=0;try{ssEnabled[i]=oDocSS[i].cssRules.length;}catch(e){try{ssEnabled[i]=oDocSS[i].rules.length;}catch(e){}
}
}
var ssLoaded=true;var iLen=ssEnabled.length;for(var i=0;i < iLen;++i)
if(0==ssEnabled[i])
ssLoaded=false;if(false==ssLoaded){if(xajax.tools.queue.retry(args,args.prop)){xajax.tools.queue.setWakeup(xajax.response,10);return false;}
}
return true;}
xajax.forms={}
xajax.forms.getInput=function(type,name,id){if('undefined'==typeof window.addEventListener){xajax.forms.getInput=function(type,name,id){return xajax.config.baseDocument.createElement('<input type="'+type+'" name="'+name+'" id="'+id+'">');}
}else{xajax.forms.getInput=function(type,name,id){var oDoc=xajax.config.baseDocument;var Obj=oDoc.createElement('input');Obj.setAttribute('type',type);Obj.setAttribute('name',name);Obj.setAttribute('id',id);return Obj;}
}
return xajax.forms.getInput(type,name,id);}
xajax.forms.createInput=function(command){command.fullName='createInput';var objParent=command.id;var sType=command.type;var sName=command.data;var sId=command.prop;if('string'==typeof objParent)
objParent=xajax.$(objParent);var target=xajax.forms.getInput(sType,sName,sId);if(objParent&&target){objParent.appendChild(target);}
return true;}
xajax.forms.insertInput=function(command){command.fullName='insertInput';var objSibling=command.id;var sType=command.type;var sName=command.data;var sId=command.prop;if('string'==typeof objSibling)
objSibling=xajax.$(objSibling);var target=xajax.forms.getInput(sType,sName,sId);if(target&&objSibling&&objSibling.parentNode)
objSibling.parentNode.insertBefore(target,objSibling);return true;}
xajax.forms.insertInputAfter=function(command){command.fullName='insertInputAfter';var objSibling=command.id;var sType=command.type;var sName=command.data;var sId=command.prop;if('string'==typeof objSibling)
objSibling=xajax.$(objSibling);var target=xajax.forms.getInput(sType,sName,sId);if(target&&objSibling&&objSibling.parentNode)
objSibling.parentNode.insertBefore(target,objSibling.nextSibling);return true;}
xajax.events={}
xajax.events.setEvent=function(command){command.fullName='addEvent';var element=command.id;var sEvent=command.prop;var code=command.data;if('string'==typeof element)
element=xajax.$(element);sEvent=xajax.tools.addOnPrefix(sEvent);code=xajax.tools.doubleQuotes(code);eval('element.'+sEvent+' = function() { '+code+'; }');return true;}
xajax.events.addHandler=function(element,sEvent,fun){if(window.addEventListener){xajax.events.addHandler=function(command){command.fullName='addHandler';var element=command.id;var sEvent=command.prop;var fun=command.data;if('string'==typeof element)
element=xajax.$(element);sEvent=xajax.tools.stripOnPrefix(sEvent);eval('element.addEventListener("'+sEvent+'", '+fun+', false);');return true;}
}else{xajax.events.addHandler=function(command){command.fullName='addHandler';var element=command.id;var sEvent=command.prop;var fun=command.data;if('string'==typeof element)
element=xajax.$(element);sEvent=xajax.tools.addOnPrefix(sEvent);eval('element.attachEvent("'+sEvent+'", '+fun+', false);');return true;}
}
return xajax.events.addHandler(element,sEvent,fun);}
xajax.events.removeHandler=function(element,sEvent,fun){if(window.removeEventListener){xajax.events.removeHandler=function(command){command.fullName='removeHandler';var element=command.id;var sEvent=command.prop;var fun=command.data;if('string'==typeof element)
element=xajax.$(element);sEvent=xajax.tools.stripOnPrefix(sEvent);eval('element.removeEventListener("'+sEvent+'", '+fun+', false);');return true;}
}else{xajax.events.removeHandler=function(command){command.fullName='removeHandler';var element=command.id;var sEvent=command.prop;var fun=command.data;if('string'==typeof element)
element=xajax.$(element);sEvent=xajax.tools.addOnPrefix(sEvent);eval('element.detachEvent("'+sEvent+'", '+fun+', false);');return true;}
}
return xajax.events.removeHandler(element,sEvent,fun);}
xajax.callback={}
xajax.callback.create=function(){var xx=xajax;var xc=xx.config;var xcb=xx.callback;var oCB={}
oCB.timers={};oCB.timers.onResponseDelay=xcb.setupTimer(
(arguments.length > 0)
? arguments[0]
:xc.defaultResponseDelayTime);oCB.timers.onExpiration=xcb.setupTimer(
(arguments.length > 1)
? arguments[1]
:xc.defaultExpirationTime);oCB.onRequest=null;oCB.onResponseDelay=null;oCB.onExpiration=null;oCB.beforeResponseProcessing=null;oCB.onFailure=null;oCB.onRedirect=null;oCB.onSuccess=null;oCB.onComplete=null;return oCB;}
xajax.callback.setupTimer=function(iDelay){return{timer:null,delay:iDelay};}
xajax.callback.clearTimer=function(oCallback,sFunction){if('undefined'!=typeof oCallback.timers){if('undefined'!=typeof oCallback.timers[sFunction]){clearTimeout(oCallback.timers[sFunction].timer);}
}else if('object'==typeof oCallback){var iLen=oCallback.length;for(var i=0;i < iLen;++i)
xajax.callback.clearTimer(oCallback[i],sFunction);}
}
xajax.callback.execute=function(oCallback,sFunction,args){if('undefined'!=typeof oCallback[sFunction]){var func=oCallback[sFunction];if('function'==typeof func){if('undefined'!=typeof oCallback.timers[sFunction]){oCallback.timers[sFunction].timer=setTimeout(function(){func(args);},oCallback.timers[sFunction].delay);}
else{func(args);}
}
}else if('object'==typeof oCallback){var iLen=oCallback.length;for(var i=0;i < iLen;++i)
xajax.callback.execute(oCallback[i],sFunction,args);}
}
xajax.callback.global=xajax.callback.create();xajax.response=xajax.tools.queue.create(xajax.config.responseQueueSize);xajax.responseSuccessCodes=['0','200'];xajax.responseErrorsForAlert=['400','401','402','403','404','500','501','502','503'];xajax.responseRedirectCodes=['301','302','307'];if('undefined'==typeof xajax.command)
xajax.command={};xajax.command.create=function(sequence,request,context){var newCmd={};newCmd.cmd='*';newCmd.fullName='* unknown command name *';newCmd.sequence=sequence;newCmd.request=request;newCmd.context=context;return newCmd;}
if('undefined'==typeof xajax.command.handler)
xajax.command.handler={};if('undefined'==typeof xajax.command.handler.handlers)
xajax.command.handler.handlers=[];xajax.command.handler.register=function(shortName,func){xajax.command.handler.handlers[shortName]=func;}
xajax.command.handler.unregister=function(shortName){var func=xajax.command.handler.handlers[shortName];delete xajax.command.handler.handlers[shortName];return func;}
xajax.command.handler.isRegistered=function(command){var shortName=command.cmd;if(xajax.command.handler.handlers[shortName])
return true;return false;}
xajax.command.handler.call=function(command){var shortName=command.cmd;return xajax.command.handler.handlers[shortName](command);}
xajax.command.handler.register('rcmplt',function(args){xajax.completeResponse(args.request);return true;});xajax.command.handler.register('css',function(args){args.fullName='includeCSS';if('undefined'==typeof args.media)
args.media='screen';return xajax.css.add(args.data,args.media);});xajax.command.handler.register('rcss',function(args){args.fullName='removeCSS';if('undefined'==typeof args.media)
args.media='screen';return xajax.css.remove(args.data,args.media);});xajax.command.handler.register('wcss',function(args){args.fullName='waitForCSS';return xajax.css.waitForCSS(args);});xajax.command.handler.register('as',function(args){args.fullName='assign/clear';try{return xajax.dom.assign(args.target,args.prop,args.data);}catch(e){}
return true;});xajax.command.handler.register('ap',function(args){args.fullName='append';return xajax.dom.append(args.target,args.prop,args.data);});xajax.command.handler.register('pp',function(args){args.fullName='prepend';return xajax.dom.prepend(args.target,args.prop,args.data);});xajax.command.handler.register('rp',function(args){args.fullName='replace';return xajax.dom.replace(args.id,args.prop,args.data);});xajax.command.handler.register('rm',function(args){args.fullName='remove';return xajax.dom.remove(args.id);});xajax.command.handler.register('ce',function(args){args.fullName='create';return xajax.dom.create(args.id,args.data,args.prop);});xajax.command.handler.register('ie',function(args){args.fullName='insert';return xajax.dom.insert(args.id,args.data,args.prop);});xajax.command.handler.register('ia',function(args){args.fullName='insertAfter';return xajax.dom.insertAfter(args.id,args.data,args.prop);});xajax.command.handler.register('DSR',xajax.domResponse.startResponse);xajax.command.handler.register('DCE',xajax.domResponse.createElement);xajax.command.handler.register('DSA',xajax.domResponse.setAttribute);xajax.command.handler.register('DAC',xajax.domResponse.appendChild);xajax.command.handler.register('DIB',xajax.domResponse.insertBefore);xajax.command.handler.register('DIA',xajax.domResponse.insertAfter);xajax.command.handler.register('DAT',xajax.domResponse.appendText);xajax.command.handler.register('DRC',xajax.domResponse.removeChildren);xajax.command.handler.register('DER',xajax.domResponse.endResponse);xajax.command.handler.register('c:as',xajax.dom.contextAssign);xajax.command.handler.register('c:ap',xajax.dom.contextAppend);xajax.command.handler.register('c:pp',xajax.dom.contextPrepend);xajax.command.handler.register('s',xajax.js.sleep);xajax.command.handler.register('ino',xajax.js.includeScriptOnce);xajax.command.handler.register('in',xajax.js.includeScript);xajax.command.handler.register('rjs',xajax.js.removeScript);xajax.command.handler.register('wf',xajax.js.waitFor);xajax.command.handler.register('js',xajax.js.execute);xajax.command.handler.register('jc',xajax.js.call);xajax.command.handler.register('sf',xajax.js.setFunction);xajax.command.handler.register('wpf',xajax.js.wrapFunction);xajax.command.handler.register('al',function(args){args.fullName='alert';alert(args.data);return true;});xajax.command.handler.register('cc',xajax.js.confirmCommands);xajax.command.handler.register('ci',xajax.forms.createInput);xajax.command.handler.register('ii',xajax.forms.insertInput);xajax.command.handler.register('iia',xajax.forms.insertInputAfter);xajax.command.handler.register('ev',xajax.events.setEvent);xajax.command.handler.register('ah',xajax.events.addHandler);xajax.command.handler.register('rh',xajax.events.removeHandler);xajax.command.handler.register('dbg',function(args){args.fullName='debug message';return true;});xajax.initializeRequest=function(oRequest){var xx=xajax;var xc=xx.config;oRequest.append=function(opt,def){if('undefined'!=typeof this[opt]){for(var itmName in def)
if('undefined'==typeof this[opt][itmName])
this[opt][itmName]=def[itmName];}else this[opt]=def;}
oRequest.append('commonHeaders',xc.commonHeaders);oRequest.append('postHeaders',xc.postHeaders);oRequest.append('getHeaders',xc.getHeaders);oRequest.set=function(option,defaultValue){if('undefined'==typeof this[option])
this[option]=defaultValue;}
oRequest.set('statusMessages',xc.statusMessages);oRequest.set('waitCursor',xc.waitCursor);oRequest.set('mode',xc.defaultMode);oRequest.set('method',xc.defaultMethod);oRequest.set('URI',xc.requestURI);oRequest.set('httpVersion',xc.defaultHttpVersion);oRequest.set('contentType',xc.defaultContentType);oRequest.set('retry',xc.defaultRetry);oRequest.set('returnValue',xc.defaultReturnValue);oRequest.set('maxObjectDepth',xc.maxObjectDepth);oRequest.set('maxObjectSize',xc.maxObjectSize);oRequest.set('context',window);var xcb=xx.callback;var gcb=xcb.global;var lcb=xcb.create();lcb.take=function(frm,opt){if('undefined'!=typeof frm[opt]){lcb[opt]=frm[opt];lcb.hasEvents=true;}
delete frm[opt];}
lcb.take(oRequest,'onRequest');lcb.take(oRequest,'onResponseDelay');lcb.take(oRequest,'onExpiration');lcb.take(oRequest,'beforeResponseProcessing');lcb.take(oRequest,'onFailure');lcb.take(oRequest,'onRedirect');lcb.take(oRequest,'onSuccess');lcb.take(oRequest,'onComplete');if('undefined'!=typeof oRequest.callback){if(lcb.hasEvents)
oRequest.callback=[oRequest.callback,lcb];}else
oRequest.callback=lcb;oRequest.status=(oRequest.statusMessages)
? xc.status.update()
:xc.status.dontUpdate();oRequest.cursor=(oRequest.waitCursor)
? xc.cursor.update()
:xc.cursor.dontUpdate();oRequest.method=oRequest.method.toUpperCase();if('GET'!=oRequest.method)
oRequest.method='POST';oRequest.requestRetry=oRequest.retry;oRequest.append('postHeaders',{'content-type':oRequest.contentType
});delete oRequest['append'];delete oRequest['set'];delete oRequest['take'];if('undefined'==typeof oRequest.URI)
throw{code:10005}
}
xajax.processParameters=function(oRequest){var xx=xajax;var xt=xx.tools;var rd=[];var separator='';for(var sCommand in oRequest.functionName){if('constructor'!=sCommand){rd.push(separator);rd.push(sCommand);rd.push('=');rd.push(encodeURIComponent(oRequest.functionName[sCommand]));separator='&';}
}
var dNow=new Date();rd.push('&xjxr=');rd.push(dNow.getTime());delete dNow;if(oRequest.parameters){var i=0;var iLen=oRequest.parameters.length;while(i < iLen){var oVal=oRequest.parameters[i];if('object'==typeof oVal&&null!=oVal){try{oVal=JSON.stringify(oVal);}catch(e){oVal='';}
rd.push('&xjxargs[]=');oVal=encodeURIComponent(oVal);rd.push(oVal);++i;}else{rd.push('&xjxargs[]=');if('undefined'==typeof oVal||null==oVal){rd.push('*');}else{var sType=typeof oVal;if('string'==sType)
rd.push('S');else if('boolean'==sType)
rd.push('B');else if('number'==sType)
rd.push('N');oVal=encodeURIComponent(oVal);rd.push(oVal);}
++i;}
}
}
oRequest.requestURI=oRequest.URI;if('GET'==oRequest.method){oRequest.requestURI+=oRequest.requestURI.indexOf('?')==-1 ? '?':'&';oRequest.requestURI+=rd.join('');rd=[];}
oRequest.requestData=rd.join('');}
xajax.prepareRequest=function(oRequest){var xx=xajax;var xt=xx.tools;oRequest.request=xt.getRequestObject();oRequest.setRequestHeaders=function(headers){if('object'==typeof headers){for(var optionName in headers)
this.request.setRequestHeader(optionName,headers[optionName]);}
}
oRequest.setCommonRequestHeaders=function(){this.setRequestHeaders(this.commonHeaders);if(this.challengeResponse)
this.request.setRequestHeader('challenge-response',this.challengeResponse);}
oRequest.setPostRequestHeaders=function(){this.setRequestHeaders(this.postHeaders);}
oRequest.setGetRequestHeaders=function(){this.setRequestHeaders(this.getHeaders);}
if('asynchronous'==oRequest.mode){oRequest.request.onreadystatechange=function(){if(oRequest.request.readyState!=4)
return;xajax.responseReceived(oRequest);}
oRequest.finishRequest=function(){return this.returnValue;}
}else{oRequest.finishRequest=function(){return xajax.responseReceived(oRequest);}
}
if('undefined'!=typeof oRequest.userName&&'undefined'!=typeof oRequest.password){oRequest.open=function(){this.request.open(
this.method,
this.requestURI,
'asynchronous'==this.mode,
oRequest.userName,
oRequest.password);}
}else{oRequest.open=function(){this.request.open(
this.method,
this.requestURI,
'asynchronous'==this.mode);}
}
if('POST'==oRequest.method){oRequest.applyRequestHeaders=function(){this.setCommonRequestHeaders();try{this.setPostRequestHeaders();}catch(e){this.method='GET';this.requestURI+=this.requestURI.indexOf('?')==-1 ? '?':'&';this.requestURI+=this.requestData;this.requestData='';if(0==this.requestRetry)this.requestRetry=1;throw e;}
}
}else{oRequest.applyRequestHeaders=function(){this.setCommonRequestHeaders();this.setGetRequestHeaders();}
}
}
xajax.request=function(){var numArgs=arguments.length;if(0==numArgs)
return false;var oRequest={}
if(1 < numArgs)
oRequest=arguments[1];oRequest.functionName=arguments[0];var xx=xajax;xx.initializeRequest(oRequest);xx.processParameters(oRequest);while(0 < oRequest.requestRetry){try{--oRequest.requestRetry;xx.prepareRequest(oRequest);return xx.submitRequest(oRequest);}catch(e){xajax.callback.execute(
[xajax.callback.global,oRequest.callback],
'onFailure',
oRequest
);if(0==oRequest.requestRetry)
throw e;}
}
}
xajax.submitRequest=function(oRequest){oRequest.status.onRequest();var xcb=xajax.callback;var gcb=xcb.global;var lcb=oRequest.callback;xcb.execute([gcb,lcb],'onResponseDelay',oRequest);xcb.execute([gcb,lcb],'onExpiration',oRequest);xcb.execute([gcb,lcb],'onRequest',oRequest);oRequest.open();oRequest.applyRequestHeaders();oRequest.cursor.onWaiting();oRequest.status.onWaiting();xajax._internalSend(oRequest);return oRequest.finishRequest();}
xajax._internalSend=function(oRequest){oRequest.request.send(oRequest.requestData);}
xajax.abortRequest=function(oRequest){oRequest.aborted=true;oRequest.request.abort();xajax.completeResponse(oRequest);}
xajax.responseReceived=function(oRequest){var xx=xajax;var xcb=xx.callback;var gcb=xcb.global;var lcb=oRequest.callback;if(oRequest.aborted)
return;xcb.clearTimer([gcb,lcb],'onExpiration');xcb.clearTimer([gcb,lcb],'onResponseDelay');xcb.execute([gcb,lcb],'beforeResponseProcessing',oRequest);var challenge=oRequest.request.getResponseHeader('challenge');if(challenge){oRequest.challengeResponse=challenge;xx.prepareRequest(oRequest);return xx.submitRequest(oRequest);}
var fProc=xx.getResponseProcessor(oRequest);if('undefined'==typeof fProc){xcb.execute([gcb,lcb],'onFailure',oRequest);xx.completeResponse(oRequest);return;}
return fProc(oRequest);}
xajax.getResponseProcessor=function(oRequest){var fProc;if('undefined'==typeof oRequest.responseProcessor){var cTyp=oRequest.request.getResponseHeader('content-type');if(cTyp){if(0 <=cTyp.indexOf('text/xml')){fProc=xajax.responseProcessor.xml;}else if(0 <=cTyp.indexOf('application/json')){fProc=xajax.responseProcessor.json;}
}
}else fProc=oRequest.responseProcessor;return fProc;}
xajax.executeCommand=function(command){if(xajax.command.handler.isRegistered(command)){if(command.id)
command.target=xajax.$(command.id);if(false==xajax.command.handler.call(command)){xajax.tools.queue.pushFront(xajax.response,command);return false;}
}
return true;}
xajax.completeResponse=function(oRequest){xajax.callback.execute(
[xajax.callback.global,oRequest.callback],
'onComplete',
oRequest
);oRequest.cursor.onComplete();oRequest.status.onComplete();delete oRequest['functionName'];delete oRequest['requestURI'];delete oRequest['requestData'];delete oRequest['requestRetry'];delete oRequest['request'];delete oRequest['set'];delete oRequest['open'];delete oRequest['setRequestHeaders'];delete oRequest['setCommonRequestHeaders'];delete oRequest['setPostRequestHeaders'];delete oRequest['setGetRequestHeaders'];delete oRequest['applyRequestHeaders'];delete oRequest['finishRequest'];delete oRequest['status'];delete oRequest['cursor'];delete oRequest['challengeResponse'];}
xajax.$=xajax.tools.$;xajax.getFormValues=xajax.tools.getFormValues;xajax.isLoaded=true;xjx={}
xjx.$=xajax.tools.$;xjx.getFormValues=xajax.tools.getFormValues;xjx.request=xajax.request;if('undefined'==typeof JSON)xajax.js.includeScript({data:xajax.config.JavaScriptURI+'xajax_js/JSON.js'});

View File

@@ -0,0 +1,883 @@
/*
File: xajax_debug.js
This optional file contains the debugging module for use with xajax. If
you include this module after the standard <xajax_core.js> module, you
will receive debugging messages, including errors, that occur during
the processing of your xajax requests.
Title: xajax debugging module
Please see <copyright.inc.php> for a detailed description, copyright
and license information.
*/
/*
@package xajax
@version $Id: xajax_debug_uncompressed.js 327 2007-02-28 16:55:26Z calltoconstruct $
@copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
@copyright Copyright (c) 2008-2010 by Joseph Woolley, Steffen Konerow, Jared White & J. Max Wilson
@license http://www.xajaxproject.org/bsd_license.txt BSD License
*/
try
{
/*
Class: xajax.debug
This object contains the variables and functions used to display process state
messages and to trap error conditions and report them to the user via
a secondary browser window or alert messages as necessary.
*/
if ('undefined' == typeof xajax)
throw { name: 'SequenceError', message: 'Error: xajax core was not detected, debug module disabled.' }
if ('undefined' == typeof xajax.debug)
xajax.debug = {}
/*
String: xajax.debug.workId
Stores a 'unique' identifier for this session so that an existing debugging
window can be detected, else one will be created.
*/
xajax.debug.workId = 'xajaxWork'+ new Date().getTime();
/*
String: xajax.debug.windowSource
The default URL that is given to the debugging window upon creation.
*/
xajax.debug.windowSource = 'about:blank';
/*
String: xajax.debug.windowID
A 'unique' name used to identify the debugging window that is attached
to this xajax session.
*/
xajax.debug.windowID = 'xajax_debug_'+xajax.debug.workId;
/*
String: windowStyle
The parameters that will be used to create the debugging window.
*/
if ('undefined' == typeof xajax.debug.windowStyle)
xajax.debug.windowStyle =
'width=800,' +
'height=600,' +
'scrollbars=yes,' +
'resizable=yes,' +
'status=yes';
/*
String: windowTemplate
The HTML template and CSS style information used to populate the
debugging window upon creation.
*/
if ('undefined' == typeof xajax.debug.windowTemplate)
xajax.debug.windowTemplate =
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' +
'<html><head>' +
'<title>xajax debug output</title>' +
'<style type="text/css">' +
'/* <![CDATA[ */' +
'.debugEntry { margin: 3px; padding: 3px; border-top: 1px solid #999999; } ' +
'.debugDate { font-weight: bold; margin: 2px; } ' +
'.debugText { margin: 2px; } ' +
'.warningText { margin: 2px; font-weight: bold; } ' +
'.errorText { margin: 2px; font-weight: bold; color: #ff7777; }' +
'/* ]]> */' +
'</style>' +
'</head><body>' +
'<h2>xajax debug output</h2>' +
'<div id="debugTag"></div>' +
'</body></html>';
/*
Object: window
A reference to the debugging window, once constructed, where messages will
be displayed throughout the request process. This is constructed internally
as needed.
*/
/*
Array: xajax.debug.text
*/
xajax.debug.text = [];
xajax.debug.text[100] = 'WARNING: ';
xajax.debug.text[101] = 'ERROR: ';
xajax.debug.text[102] = 'XAJAX DEBUG MESSAGE:\n';
xajax.debug.text[103] = '...\n[LONG RESPONSE]\n...';
xajax.debug.text[104] = 'SENDING REQUEST';
xajax.debug.text[105] = 'SENT [';
xajax.debug.text[106] = ' bytes]';
xajax.debug.text[107] = 'CALLING: ';
xajax.debug.text[108] = 'URI: ';
xajax.debug.text[109] = 'INITIALIZING REQUEST';
xajax.debug.text[110] = 'PROCESSING PARAMETERS [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'NO PARAMETERS TO PROCESS';
xajax.debug.text[113] = 'PREPARING REQUEST';
xajax.debug.text[114] = 'STARTING XAJAX CALL (deprecated: use xajax.request instead)';
xajax.debug.text[115] = 'STARTING XAJAX REQUEST';
xajax.debug.text[116] = 'No response processor is available to process the response from the server.\n';
xajax.debug.text[117] = '.\nCheck for error messages from the server.';
xajax.debug.text[118] = 'RECEIVED [status: ';
xajax.debug.text[119] = ', size: ';
xajax.debug.text[120] = ' bytes, time: ';
xajax.debug.text[121] = 'ms]:\n';
xajax.debug.text[122] = 'The server returned the following HTTP status: ';
xajax.debug.text[123] = '\nRECEIVED:\n';
xajax.debug.text[124] = 'The server returned a redirect to:<br />';
xajax.debug.text[125] = 'DONE [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'INITIALIZING REQUEST OBJECT';
/*
Array: xajax.debug.exceptions
*/
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Invalid response XML: The response contains an unknown tag: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: XMLHttpRequest is not available, xajax is disabled.';
xajax.debug.exceptions[10003] = 'Queue overflow: Cannot push object onto queue because it is full.';
xajax.debug.exceptions[10004] = 'Invalid response XML: The response contains an unexpected tag or text: {data}.';
xajax.debug.exceptions[10005] = 'Invalid request URI: Invalid or missing URI; autodetection failed; please specify a one explicitly.';
xajax.debug.exceptions[10006] = 'Invalid response command: Malformed response command received.';
xajax.debug.exceptions[10007] = 'Invalid response command: Command [{data}] is not a known command.';
xajax.debug.exceptions[10008] = 'Element with ID [{data}] not found in the document.';
xajax.debug.exceptions[10009] = 'Invalid request: Missing function name parameter.';
xajax.debug.exceptions[10010] = 'Invalid request: Missing function object parameter.';
/*
Function: xajax.debug.getExceptionText
Parameters:
e - (object): Exception
*/
xajax.debug.getExceptionText = function(e) {
if ('undefined' != typeof e.code) {
if ('undefined' != typeof xajax.debug.exceptions[e.code]) {
var msg = xajax.debug.exceptions[e.code];
if ('undefined' != typeof e.data) {
msg.replace('{data}', e.data);
}
return msg;
}
} else if ('undefined' != typeof e.name) {
var msg = e.name;
if ('undefined' != typeof e.message) {
msg += ': ';
msg += e.message;
}
return msg;
}
return 'An unknown error has occurred.';
}
/*
Function: xajax.debug.writeMessage
Output a debug message to the debug window if available or send to an
alert box. If the debug window has not been created, attempt to
create it.
Parameters:
text - (string): The text to output.
prefix - (string): The prefix to use; this is prepended onto the
message; it should indicate the type of message (warning, error)
cls - (stirng): The className that will be applied to the message;
invoking a style from the CSS provided in
<xajax.debug.windowTemplate>. Should be one of the following:
- warningText
- errorText
*/
xajax.debug.writeMessage = function(text, prefix, cls) {
try {
var xd = xajax.debug;
if ('undefined' == typeof xd.window || true == xd.window.closed) {
xd.window = window.open(xd.windowSource, xd.windowID, xd.windowStyle);
if ("about:blank" == xd.windowSource)
xd.window.document.write(xd.windowTemplate);
}
var xdw = xd.window;
var xdwd = xdw.document;
if ('undefined' == typeof prefix)
prefix = '';
if ('undefined' == typeof cls)
cls = 'debugText';
text = xajax.debug.prepareDebugText(text);
var debugTag = xdwd.getElementById('debugTag');
var debugEntry = xdwd.createElement('div');
var debugDate = xdwd.createElement('span');
var debugText = xdwd.createElement('pre');
debugDate.innerHTML = new Date().toString();
debugText.innerHTML = prefix + text;
debugEntry.appendChild(debugDate);
debugEntry.appendChild(debugText);
debugTag.insertBefore(debugEntry, debugTag.firstChild);
// don't allow 'style' issues to hinder the debug output
try {
debugEntry.className = 'debugEntry';
debugDate.className = 'debugDate';
debugText.className = cls;
} catch (e) {
}
} catch (e) {
if (text.length > 1000) text = text.substr(0,1000) + xajax.debug.text[102];
alert(xajax.debug.text[102] + text);
}
}
/*
Function: xajax.debug.prepareDebugText
Convert special characters to their HTML equivellents so they
will show up in the <xajax.debug.window>.
Parameters:
text - (string): Debug text
*/
xajax.debug.prepareDebugText = function(text) {
try {
text = text.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\n/g, '<br />');
return text;
} catch (e) {
xajax.debug.stringReplace = function(haystack, needle, newNeedle) {
var segments = haystack.split(needle);
haystack = '';
for (var i = 0; i < segments.length; ++i) {
if (0 != i)
haystack += newNeedle;
haystack += segments[i];
}
return haystack;
}
xajax.debug.prepareDebugText = function(text) {
text = xajax.debug.stringReplace(text, '&', '&amp;');
text = xajax.debug.stringReplace(text, '<', '&lt;');
text = xajax.debug.stringReplace(text, '>', '&gt;');
text = xajax.debug.stringReplace(text, '\n', '<br />');
return text;
}
xajax.debug.prepareDebugText(text);
}
}
/*
Function: xajax.debug.executeCommand
Catch any exceptions that are thrown by a response command handler
and display a message in the debugger.
This is a wrapper function which surrounds the standard
<xajax.executeCommand> function.
*/
xajax.debug.executeCommand = xajax.executeCommand;
xajax.executeCommand = function(args) {
try {
if ('undefined' == typeof args.cmd)
throw { code: 10006 };
if (false == xajax.command.handler.isRegistered(args))
throw { code: 10007, data: args.cmd };
return xajax.debug.executeCommand(args);
} catch(e) {
var msg = 'ExecuteCommand (';
if ('undefined' != typeof args.sequence) {
msg += '#';
msg += args.sequence;
msg += ', ';
}
if ('undefined' != typeof args.cmdFullName) {
msg += '"';
msg += args.cmdFullName;
msg += '"';
}
msg += '):\n';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return true;
}
/*
Function: xajax.parseAttributes
Catch any exception thrown during the parsing of response
command attributes and display an appropriate debug message.
This is a wrapper around the standard <xajax.parseAttributes>
function.
Parameters:
child - (object): Childnode
obj - (object): Object
*/
xajax.debug.parseAttributes = xajax.parseAttributes;
xajax.parseAttributes = function(child, obj) {
try {
xajax.debug.parseAttributes(child, obj);
} catch(e) {
var msg = 'ParseAttributes:\n';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
}
xajax.debug.commandHandler = xajax.command.handler.unregister('dbg');
xajax.command.handler.register('dbg', function(args) {
args.cmdFullName = 'debug message';
xajax.debug.writeMessage(args.data, xajax.debug.text[100], 'warningText');
return xajax.debug.commandHandler(args);
});
/*
Function: xajax.tools.$
Catch any exceptions thrown while attempting to locate an
HTML element by it's unique name.
This is a wrapper around the standard <xajax.tools.$> function.
Parameters:
sId - (string): Element ID or name
*/
xajax.debug.$ = xajax.tools.$;
xajax.tools.$ = function(sId) {
try {
var returnValue = xajax.debug.$(sId);
if ('object' != typeof returnValue)
throw { code: 10008 };
}
catch (e) {
var msg = '$:';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[100], 'warningText');
}
return returnValue;
}
/*
Function: xajax.tools._objectToXML
Generate a message indicating that a javascript object is
being converted to xml. Indicate the max depth and size. Then
display the size of the object upon completion. Catch any
exceptions thrown during the conversion process.
This is a wrapper around the standard <xajax.tools._objectToXML>
function.
Parameters:
obj - (object):
guard - (object):
*/
xajax.debug._objectToXML = xajax.tools._objectToXML;
xajax.tools._objectToXML = function(obj, guard) {
try {
if (0 == guard.size) {
var msg = 'OBJECT TO XML: maxDepth = ';
msg += guard.maxDepth;
msg += ', maxSize = ';
msg += guard.maxSize;
xajax.debug.writeMessage(msg);
}
var r = xajax.debug._objectToXML(obj, guard);
if (0 == guard.depth) {
var msg = 'OBJECT TO XML: size = ';
msg += guard.size;
xajax.debug.writeMessage(msg);
}
return r;
} catch(e) {
var msg = 'ObjectToXML: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return '';
}
/*
Function: xajax._internalSend
Generate a message indicating that the xajax request is
about the be sent to the server.
This is a wrapper around the standard <xajax._internalSend>
function.
*/
xajax.debug._internalSend = xajax._internalSend;
xajax._internalSend = function(oRequest) {
try {
xajax.debug.writeMessage(xajax.debug.text[104]);
xajax.debug.writeMessage(
xajax.debug.text[105] +
oRequest.requestData.length +
xajax.debug.text[106]
);
oRequest.beginDate = new Date();
xajax.debug._internalSend(oRequest);
} catch (e) {
var msg = 'InternalSend: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.submitRequest
Generate a message indicating that a request is ready to be
submitted; providing the URL and the function being invoked.
Catch any exceptions thrown and display a message.
This is a wrapper around the standard <xajax.submitRequest>
function.
*/
xajax.debug.submitRequest = xajax.submitRequest;
xajax.submitRequest = function(oRequest) {
var msg = oRequest.method;
msg += ': ';
text = decodeURIComponent(oRequest.requestData);
text = text.replace(new RegExp('&xjx', 'g'), '\n&xjx');
text = text.replace(new RegExp('<xjxobj>', 'g'), '\n<xjxobj>');
text = text.replace(new RegExp('<e>', 'g'), '\n<e>');
text = text.replace(new RegExp('</xjxobj>', 'g'), '\n</xjxobj>\n');
msg += text;
xajax.debug.writeMessage(msg);
msg = xajax.debug.text[107];
var separator = '\n';
for (var mbr in oRequest.functionName) {
msg += separator;
msg += mbr;
msg += ': ';
msg += oRequest.functionName[mbr];
separator = '\n';
}
msg += separator;
msg += xajax.debug.text[108];
msg += separator;
msg += oRequest.URI;
xajax.debug.writeMessage(msg);
try {
return xajax.debug.submitRequest(oRequest);
} catch (e) {
xajax.debug.writeMessage(e.message);
if (0 < oRequest.retry)
throw e;
}
}
/*
Function: xajax.initializeRequest
Generate a message indicating that the request object is
being initialized.
This is a wrapper around the standard <xajax.initializeRequest>
function.
*/
xajax.debug.initializeRequest = xajax.initializeRequest;
xajax.initializeRequest = function(oRequest) {
try {
var msg = xajax.debug.text[109];
xajax.debug.writeMessage(msg);
return xajax.debug.initializeRequest(oRequest);
} catch (e) {
var msg = 'InitializeRequest: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.processParameters
Generate a message indicating that the request object is
being populated with the parameters provided.
This is a wrapper around the standard <xajax.processParameters>
function.
*/
xajax.debug.processParameters = xajax.processParameters;
xajax.processParameters = function(oRequest) {
try {
if ('undefined' != typeof oRequest.parameters) {
var msg = xajax.debug.text[110];
msg += oRequest.parameters.length;
msg += xajax.debug.text[111];
xajax.debug.writeMessage(msg);
} else {
var msg = xajax.debug.text[112];
xajax.debug.writeMessage(msg);
}
return xajax.debug.processParameters(oRequest);
} catch (e) {
var msg = 'ProcessParameters: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.prepareRequest
Generate a message indicating that the request is being
prepared. This may occur more than once for a request
if it errors and a retry is attempted.
This is a wrapper around the standard <xajax.prepareRequest>
*/
xajax.debug.prepareRequest = xajax.prepareRequest;
xajax.prepareRequest = function(oRequest) {
try {
var msg = xajax.debug.text[113];
xajax.debug.writeMessage(msg);
return xajax.debug.prepareRequest(oRequest);
} catch (e) {
var msg = 'PrepareRequest: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.call
Validates that a function name was provided, generates a message
indicating that a xajax call is starting and sets a flag in the
request object indicating that debugging is enabled for this call.
This is a wrapper around the standard <xajax.call> function.
*/
xajax.debug.call = xajax.call;
xajax.call = function() {
try {
xajax.debug.writeMessage(xajax.debug.text[114]);
var numArgs = arguments.length;
if (0 == numArgs)
throw { code: 10009 };
var functionName = arguments[0];
var oOptions = {}
if (1 < numArgs)
oOptions = arguments[1];
oOptions.debugging = true;
return xajax.debug.call(functionName, oOptions);
} catch (e) {
var msg = 'Call: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.request
Validates that a function name was provided, generates a message
indicating that a xajax request is starting and sets a flag in the
request object indicating that debugging is enabled for this request.
This is a wrapper around the standard <xajax.request> function.
*/
xajax.debug.request = xajax.request;
xajax.request = function() {
try {
xajax.debug.writeMessage(xajax.debug.text[115]);
var numArgs = arguments.length;
if (0 == numArgs)
throw { code: 10010 };
var oFunction = arguments[0];
var oOptions = {}
if (1 < numArgs)
oOptions = arguments[1];
oOptions.debugging = true;
return xajax.debug.request(oFunction, oOptions);
} catch (e) {
var msg = 'Request: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.getResponseProcessor
Generate an error message when no reponse processor is available
to process the type of response returned from the server.
This is a wrapper around the standard <xajax.getResponseProcessor>
function.
*/
xajax.debug.getResponseProcessor = xajax.getResponseProcessor;
xajax.getResponseProcessor = function(oRequest) {
try {
var fProc = xajax.debug.getResponseProcessor(oRequest);
if ('undefined' == typeof fProc) {
var msg = xajax.debug.text[116];
try {
var contentType = oRequest.request.getResponseHeader('content-type');
msg += "Content-Type: ";
msg += contentType;
if ('text/html' == contentType) {
msg += xajax.debug.text[117];
}
} catch (e) {
}
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return fProc;
} catch (e) {
var msg = 'GetResponseProcessor: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.responseReceived
Generate a message indicating that a response has been received
from the server; provide some statistical data regarding the
response and the response time.
Catch any exceptions that are thrown during the processing of
the response and generate a message.
This is a wrapper around the standard <xajax.responseReceived>
function.
*/
xajax.debug.responseReceived = xajax.responseReceived;
xajax.responseReceived = function(oRequest) {
var xx = xajax;
var xt = xx.tools;
var xd = xx.debug;
var oRet;
try {
var status = oRequest.request.status;
if (xt.in_array(xx.responseSuccessCodes, status)) {
var packet = oRequest.request.responseText;
packet = packet.replace(new RegExp('<cmd', 'g'), '\n<cmd');
packet = packet.replace(new RegExp('<xjx>', 'g'), '\n<xjx>');
packet = packet.replace(new RegExp('<xjxobj>', 'g'), '\n<xjxobj>');
packet = packet.replace(new RegExp('<e>', 'g'), '\n<e>');
packet = packet.replace(new RegExp('</xjxobj>', 'g'), '\n</xjxobj>\n');
packet = packet.replace(new RegExp('</xjx>', 'g'), '\n</xjx>');
oRequest.midDate = new Date();
var msg = xajax.debug.text[118];
msg += oRequest.request.status;
msg += xajax.debug.text[119];
msg += packet.length;
msg += xajax.debug.text[120];
msg += (oRequest.midDate - oRequest.beginDate);
msg += xajax.debug.text[121];
msg += packet;
xd.writeMessage(msg);
} else if (xt.in_array(xx.responseErrorsForAlert, status)) {
var msg = xajax.debug.text[122];
msg += status;
msg += xajax.debug.text[123];
msg += oRequest.request.responseText;
xd.writeMessage(msg, xajax.debug.text[101], 'errorText');
} else if (xt.in_array(xx.responseRedirectCodes, status)) {
var msg = xajax.debug.text[124];
msg += oRequest.request.getResponseHeader('location');
xd.writeMessage(msg);
}
oRet = xd.responseReceived(oRequest);
} catch (e) {
var msg = 'ResponseReceived: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xd.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return oRet;
}
/*
Function: xajax.completeResponse
Generate a message indicating that the request has completed
and provide some statistics regarding the request and response.
This is a wrapper around the standard <xajax.completeResponse>
function.
*/
xajax.debug.completeResponse = xajax.completeResponse;
xajax.completeResponse = function(oRequest) {
try {
var returnValue = xajax.debug.completeResponse(oRequest);
oRequest.endDate = new Date();
var msg = xajax.debug.text[125];
msg += (oRequest.endDate - oRequest.beginDate);
msg += xajax.debug.text[126];
xajax.debug.writeMessage(msg);
return returnValue;
} catch (e) {
var msg = 'CompleteResponse: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.tools.getRequestObject
Generate a message indicating that the request object is
being initialized.
Catch any exceptions that are thrown during the process or
initializing a new request object.
This is a wrapper around the standard <xajax.getRequestObject>
function.
*/
xajax.debug.getRequestObject = xajax.tools.getRequestObject;
xajax.tools.getRequestObject = function() {
try {
xajax.debug.writeMessage(xajax.debug.text[127]);
return xajax.debug.getRequestObject();
} catch (e) {
var msg = 'GetRequestObject: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.dom.assign
Catch any exceptions thrown during the assignment and
display an error message.
This is a wrapper around the standard <xajax.dom.assign>
function.
*/
if (xajax.dom.assign) {
xajax.debug.assign = xajax.dom.assign;
xajax.dom.assign = function(element, property, data) {
try {
return xajax.debug.assign(element, property, data);
} catch (e) {
var msg = 'xajax.dom.assign: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
msg += 'Eval: element.';
msg += property;
msg += ' = data;\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return true;
}
}
/*
Function: xajax.tools.queue.retry
*/
if (xajax.tools) {
if (xajax.tools.queue) {
if (xajax.tools.queue.retry) {
if ('undefined' == typeof xajax.debug.tools)
xajax.debug.tools = {};
if ('undefined' == typeof xajax.debug.tools.queue)
xajax.debug.tools.queue = {};
xajax.debug.tools.queue.retry = xajax.tools.queue.retry;
xajax.tools.queue.retry = function(obj, count) {
if (xajax.debug.tools.queue.retry(obj, count))
return true;
// no 'exceeded' message for sleep command
if (obj.cmd && 's' == obj.cmd)
return false;
xajax.debug.writeMessage('Retry count exceeded.');
return false;
}
}
}
}
/*
Boolean: xajax.debug.isLoaded
true - indicates that the debugging module is loaded
*/
xajax.debug.isLoaded = true;
/*
Section: Redefine shortcuts.
Must redefine these shortcuts so they point to the new debug (wrapper) versions:
- <xjx.$>
- <xjx.getFormValues>
- <xjx.call>
Must redefine these shortcuts as well:
- <xajax.$>
- <xajax.getFormValues>
*/
xjx = {}
xjx.$ = xajax.tools.$;
xjx.getFormValues = xajax.tools.getFormValues;
xjx.call = xajax.call;
xjx.request = xajax.request;
xajax.$ = xajax.tools.$;
xajax.getFormValues = xajax.tools.getFormValues;
} catch (e) {
alert(e.name + ': ' + e.message);
}

View File

@@ -0,0 +1,883 @@
/*
File: xajax_debug.js
This optional file contains the debugging module for use with xajax. If
you include this module after the standard <xajax_core.js> module, you
will receive debugging messages, including errors, that occur during
the processing of your xajax requests.
Title: xajax debugging module
Please see <copyright.inc.php> for a detailed description, copyright
and license information.
*/
/*
@package xajax
@version $Id: xajax_debug_uncompressed.js 327 2007-02-28 16:55:26Z calltoconstruct $
@copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
@copyright Copyright (c) 2008-2009 by Joseph Woolley, Steffen Konerow, Jared White & J. Max Wilson
@license http://www.xajaxproject.org/bsd_license.txt BSD License
*/
try
{
/*
Class: xajax.debug
This object contains the variables and functions used to display process state
messages and to trap error conditions and report them to the user via
a secondary browser window or alert messages as necessary.
*/
if ('undefined' == typeof xajax)
throw { name: 'SequenceError', message: 'Error: xajax core was not detected, debug module disabled.' }
if ('undefined' == typeof xajax.debug)
xajax.debug = {}
/*
String: xajax.debug.workId
Stores a 'unique' identifier for this session so that an existing debugging
window can be detected, else one will be created.
*/
xajax.debug.workId = 'xajaxWork'+ new Date().getTime();
/*
String: xajax.debug.windowSource
The default URL that is given to the debugging window upon creation.
*/
xajax.debug.windowSource = 'about:blank';
/*
String: xajax.debug.windowID
A 'unique' name used to identify the debugging window that is attached
to this xajax session.
*/
xajax.debug.windowID = 'xajax_debug_'+xajax.debug.workId;
/*
String: windowStyle
The parameters that will be used to create the debugging window.
*/
if ('undefined' == typeof xajax.debug.windowStyle)
xajax.debug.windowStyle =
'width=800,' +
'height=600,' +
'scrollbars=yes,' +
'resizable=yes,' +
'status=yes';
/*
String: windowTemplate
The HTML template and CSS style information used to populate the
debugging window upon creation.
*/
if ('undefined' == typeof xajax.debug.windowTemplate)
xajax.debug.windowTemplate =
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' +
'<html><head>' +
'<title>xajax debug output</title>' +
'<style type="text/css">' +
'/* <![CDATA[ */' +
'.debugEntry { margin: 3px; padding: 3px; border-top: 1px solid #999999; } ' +
'.debugDate { font-weight: bold; margin: 2px; } ' +
'.debugText { margin: 2px; } ' +
'.warningText { margin: 2px; font-weight: bold; } ' +
'.errorText { margin: 2px; font-weight: bold; color: #ff7777; }' +
'/* ]]> */' +
'</style>' +
'</head><body>' +
'<h2>xajax debug output</h2>' +
'<div id="debugTag"></div>' +
'</body></html>';
/*
Object: window
A reference to the debugging window, once constructed, where messages will
be displayed throughout the request process. This is constructed internally
as needed.
*/
/*
Array: xajax.debug.text
*/
xajax.debug.text = [];
xajax.debug.text[100] = 'WARNING: ';
xajax.debug.text[101] = 'ERROR: ';
xajax.debug.text[102] = 'XAJAX DEBUG MESSAGE:\n';
xajax.debug.text[103] = '...\n[LONG RESPONSE]\n...';
xajax.debug.text[104] = 'SENDING REQUEST';
xajax.debug.text[105] = 'SENT [';
xajax.debug.text[106] = ' bytes]';
xajax.debug.text[107] = 'CALLING: ';
xajax.debug.text[108] = 'URI: ';
xajax.debug.text[109] = 'INITIALIZING REQUEST';
xajax.debug.text[110] = 'PROCESSING PARAMETERS [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'NO PARAMETERS TO PROCESS';
xajax.debug.text[113] = 'PREPARING REQUEST';
xajax.debug.text[114] = 'STARTING XAJAX CALL (deprecated: use xajax.request instead)';
xajax.debug.text[115] = 'STARTING XAJAX REQUEST';
xajax.debug.text[116] = 'No response processor is available to process the response from the server.\n';
xajax.debug.text[117] = '.\nCheck for error messages from the server.';
xajax.debug.text[118] = 'RECEIVED [status: ';
xajax.debug.text[119] = ', size: ';
xajax.debug.text[120] = ' bytes, time: ';
xajax.debug.text[121] = 'ms]:\n';
xajax.debug.text[122] = 'The server returned the following HTTP status: ';
xajax.debug.text[123] = '\nRECEIVED:\n';
xajax.debug.text[124] = 'The server returned a redirect to:<br />';
xajax.debug.text[125] = 'DONE [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'INITIALIZING REQUEST OBJECT';
/*
Array: xajax.debug.exceptions
*/
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Invalid response XML: The response contains an unknown tag: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: XMLHttpRequest is not available, xajax is disabled.';
xajax.debug.exceptions[10003] = 'Queue overflow: Cannot push object onto queue because it is full.';
xajax.debug.exceptions[10004] = 'Invalid response XML: The response contains an unexpected tag or text: {data}.';
xajax.debug.exceptions[10005] = 'Invalid request URI: Invalid or missing URI; autodetection failed; please specify a one explicitly.';
xajax.debug.exceptions[10006] = 'Invalid response command: Malformed response command received.';
xajax.debug.exceptions[10007] = 'Invalid response command: Command [{data}] is not a known command.';
xajax.debug.exceptions[10008] = 'Element with ID [{data}] not found in the document.';
xajax.debug.exceptions[10009] = 'Invalid request: Missing function name parameter.';
xajax.debug.exceptions[10010] = 'Invalid request: Missing function object parameter.';
/*
Function: xajax.debug.getExceptionText
Parameters:
e - (object): Exception
*/
xajax.debug.getExceptionText = function(e) {
if ('undefined' != typeof e.code) {
if ('undefined' != typeof xajax.debug.exceptions[e.code]) {
var msg = xajax.debug.exceptions[e.code];
if ('undefined' != typeof e.data) {
msg.replace('{data}', e.data);
}
return msg;
}
} else if ('undefined' != typeof e.name) {
var msg = e.name;
if ('undefined' != typeof e.message) {
msg += ': ';
msg += e.message;
}
return msg;
}
return 'An unknown error has occurred.';
}
/*
Function: xajax.debug.writeMessage
Output a debug message to the debug window if available or send to an
alert box. If the debug window has not been created, attempt to
create it.
Parameters:
text - (string): The text to output.
prefix - (string): The prefix to use; this is prepended onto the
message; it should indicate the type of message (warning, error)
cls - (stirng): The className that will be applied to the message;
invoking a style from the CSS provided in
<xajax.debug.windowTemplate>. Should be one of the following:
- warningText
- errorText
*/
xajax.debug.writeMessage = function(text, prefix, cls) {
try {
var xd = xajax.debug;
if ('undefined' == typeof xd.window || true == xd.window.closed) {
xd.window = window.open(xd.windowSource, xd.windowID, xd.windowStyle);
if ("about:blank" == xd.windowSource)
xd.window.document.write(xd.windowTemplate);
}
var xdw = xd.window;
var xdwd = xdw.document;
if ('undefined' == typeof prefix)
prefix = '';
if ('undefined' == typeof cls)
cls = 'debugText';
text = xajax.debug.prepareDebugText(text);
var debugTag = xdwd.getElementById('debugTag');
var debugEntry = xdwd.createElement('div');
var debugDate = xdwd.createElement('span');
var debugText = xdwd.createElement('pre');
debugDate.innerHTML = new Date().toString();
debugText.innerHTML = prefix + text;
debugEntry.appendChild(debugDate);
debugEntry.appendChild(debugText);
debugTag.insertBefore(debugEntry, debugTag.firstChild);
// don't allow 'style' issues to hinder the debug output
try {
debugEntry.className = 'debugEntry';
debugDate.className = 'debugDate';
debugText.className = cls;
} catch (e) {
}
} catch (e) {
if (text.length > 1000) text = text.substr(0,1000) + xajax.debug.text[102];
alert(xajax.debug.text[102] + text);
}
}
/*
Function: xajax.debug.prepareDebugText
Convert special characters to their HTML equivellents so they
will show up in the <xajax.debug.window>.
Parameters:
text - (string): Debug text
*/
xajax.debug.prepareDebugText = function(text) {
try {
text = text.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\n/g, '<br />');
return text;
} catch (e) {
xajax.debug.stringReplace = function(haystack, needle, newNeedle) {
var segments = haystack.split(needle);
haystack = '';
for (var i = 0; i < segments.length; ++i) {
if (0 != i)
haystack += newNeedle;
haystack += segments[i];
}
return haystack;
}
xajax.debug.prepareDebugText = function(text) {
text = xajax.debug.stringReplace(text, '&', '&amp;');
text = xajax.debug.stringReplace(text, '<', '&lt;');
text = xajax.debug.stringReplace(text, '>', '&gt;');
text = xajax.debug.stringReplace(text, '\n', '<br />');
return text;
}
xajax.debug.prepareDebugText(text);
}
}
/*
Function: xajax.debug.executeCommand
Catch any exceptions that are thrown by a response command handler
and display a message in the debugger.
This is a wrapper function which surrounds the standard
<xajax.executeCommand> function.
*/
xajax.debug.executeCommand = xajax.executeCommand;
xajax.executeCommand = function(args) {
try {
if ('undefined' == typeof args.cmd)
throw { code: 10006 };
if (false == xajax.command.handler.isRegistered(args))
throw { code: 10007, data: args.cmd };
return xajax.debug.executeCommand(args);
} catch(e) {
var msg = 'ExecuteCommand (';
if ('undefined' != typeof args.sequence) {
msg += '#';
msg += args.sequence;
msg += ', ';
}
if ('undefined' != typeof args.cmdFullName) {
msg += '"';
msg += args.cmdFullName;
msg += '"';
}
msg += '):\n';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return true;
}
/*
Function: xajax.parseAttributes
Catch any exception thrown during the parsing of response
command attributes and display an appropriate debug message.
This is a wrapper around the standard <xajax.parseAttributes>
function.
Parameters:
child - (object): Childnode
obj - (object): Object
*/
xajax.debug.parseAttributes = xajax.parseAttributes;
xajax.parseAttributes = function(child, obj) {
try {
xajax.debug.parseAttributes(child, obj);
} catch(e) {
var msg = 'ParseAttributes:\n';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
}
xajax.debug.commandHandler = xajax.command.handler.unregister('dbg');
xajax.command.handler.register('dbg', function(args) {
args.cmdFullName = 'debug message';
xajax.debug.writeMessage(args.data, xajax.debug.text[100], 'warningText');
return xajax.debug.commandHandler(args);
});
/*
Function: xajax.tools.$
Catch any exceptions thrown while attempting to locate an
HTML element by it's unique name.
This is a wrapper around the standard <xajax.tools.$> function.
Parameters:
sId - (string): Element ID or name
*/
xajax.debug.$ = xajax.tools.$;
xajax.tools.$ = function(sId) {
try {
var returnValue = xajax.debug.$(sId);
if ('object' != typeof returnValue)
throw { code: 10008 };
}
catch (e) {
var msg = '$:';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[100], 'warningText');
}
return returnValue;
}
/*
Function: xajax.tools._objectToXML
Generate a message indicating that a javascript object is
being converted to xml. Indicate the max depth and size. Then
display the size of the object upon completion. Catch any
exceptions thrown during the conversion process.
This is a wrapper around the standard <xajax.tools._objectToXML>
function.
Parameters:
obj - (object):
guard - (object):
*/
xajax.debug._objectToXML = xajax.tools._objectToXML;
xajax.tools._objectToXML = function(obj, guard) {
try {
if (0 == guard.size) {
var msg = 'OBJECT TO XML: maxDepth = ';
msg += guard.maxDepth;
msg += ', maxSize = ';
msg += guard.maxSize;
xajax.debug.writeMessage(msg);
}
var r = xajax.debug._objectToXML(obj, guard);
if (0 == guard.depth) {
var msg = 'OBJECT TO XML: size = ';
msg += guard.size;
xajax.debug.writeMessage(msg);
}
return r;
} catch(e) {
var msg = 'ObjectToXML: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return '';
}
/*
Function: xajax._internalSend
Generate a message indicating that the xajax request is
about the be sent to the server.
This is a wrapper around the standard <xajax._internalSend>
function.
*/
xajax.debug._internalSend = xajax._internalSend;
xajax._internalSend = function(oRequest) {
try {
xajax.debug.writeMessage(xajax.debug.text[104]);
xajax.debug.writeMessage(
xajax.debug.text[105] +
oRequest.requestData.length +
xajax.debug.text[106]
);
oRequest.beginDate = new Date();
xajax.debug._internalSend(oRequest);
} catch (e) {
var msg = 'InternalSend: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.submitRequest
Generate a message indicating that a request is ready to be
submitted; providing the URL and the function being invoked.
Catch any exceptions thrown and display a message.
This is a wrapper around the standard <xajax.submitRequest>
function.
*/
xajax.debug.submitRequest = xajax.submitRequest;
xajax.submitRequest = function(oRequest) {
var msg = oRequest.method;
msg += ': ';
text = decodeURIComponent(oRequest.requestData);
text = text.replace(new RegExp('&xjx', 'g'), '\n&xjx');
text = text.replace(new RegExp('<xjxobj>', 'g'), '\n<xjxobj>');
text = text.replace(new RegExp('<e>', 'g'), '\n<e>');
text = text.replace(new RegExp('</xjxobj>', 'g'), '\n</xjxobj>\n');
msg += text;
xajax.debug.writeMessage(msg);
msg = xajax.debug.text[107];
var separator = '\n';
for (var mbr in oRequest.functionName) {
msg += separator;
msg += mbr;
msg += ': ';
msg += oRequest.functionName[mbr];
separator = '\n';
}
msg += separator;
msg += xajax.debug.text[108];
msg += separator;
msg += oRequest.URI;
xajax.debug.writeMessage(msg);
try {
return xajax.debug.submitRequest(oRequest);
} catch (e) {
xajax.debug.writeMessage(e.message);
if (0 < oRequest.retry)
throw e;
}
}
/*
Function: xajax.initializeRequest
Generate a message indicating that the request object is
being initialized.
This is a wrapper around the standard <xajax.initializeRequest>
function.
*/
xajax.debug.initializeRequest = xajax.initializeRequest;
xajax.initializeRequest = function(oRequest) {
try {
var msg = xajax.debug.text[109];
xajax.debug.writeMessage(msg);
return xajax.debug.initializeRequest(oRequest);
} catch (e) {
var msg = 'InitializeRequest: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.processParameters
Generate a message indicating that the request object is
being populated with the parameters provided.
This is a wrapper around the standard <xajax.processParameters>
function.
*/
xajax.debug.processParameters = xajax.processParameters;
xajax.processParameters = function(oRequest) {
try {
if ('undefined' != typeof oRequest.parameters) {
var msg = xajax.debug.text[110];
msg += oRequest.parameters.length;
msg += xajax.debug.text[111];
xajax.debug.writeMessage(msg);
} else {
var msg = xajax.debug.text[112];
xajax.debug.writeMessage(msg);
}
return xajax.debug.processParameters(oRequest);
} catch (e) {
var msg = 'ProcessParameters: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.prepareRequest
Generate a message indicating that the request is being
prepared. This may occur more than once for a request
if it errors and a retry is attempted.
This is a wrapper around the standard <xajax.prepareRequest>
*/
xajax.debug.prepareRequest = xajax.prepareRequest;
xajax.prepareRequest = function(oRequest) {
try {
var msg = xajax.debug.text[113];
xajax.debug.writeMessage(msg);
return xajax.debug.prepareRequest(oRequest);
} catch (e) {
var msg = 'PrepareRequest: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.call
Validates that a function name was provided, generates a message
indicating that a xajax call is starting and sets a flag in the
request object indicating that debugging is enabled for this call.
This is a wrapper around the standard <xajax.call> function.
*/
xajax.debug.call = xajax.call;
xajax.call = function() {
try {
xajax.debug.writeMessage(xajax.debug.text[114]);
var numArgs = arguments.length;
if (0 == numArgs)
throw { code: 10009 };
var functionName = arguments[0];
var oOptions = {}
if (1 < numArgs)
oOptions = arguments[1];
oOptions.debugging = true;
return xajax.debug.call(functionName, oOptions);
} catch (e) {
var msg = 'Call: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.request
Validates that a function name was provided, generates a message
indicating that a xajax request is starting and sets a flag in the
request object indicating that debugging is enabled for this request.
This is a wrapper around the standard <xajax.request> function.
*/
xajax.debug.request = xajax.request;
xajax.request = function() {
try {
xajax.debug.writeMessage(xajax.debug.text[115]);
var numArgs = arguments.length;
if (0 == numArgs)
throw { code: 10010 };
var oFunction = arguments[0];
var oOptions = {}
if (1 < numArgs)
oOptions = arguments[1];
oOptions.debugging = true;
return xajax.debug.request(oFunction, oOptions);
} catch (e) {
var msg = 'Request: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.getResponseProcessor
Generate an error message when no reponse processor is available
to process the type of response returned from the server.
This is a wrapper around the standard <xajax.getResponseProcessor>
function.
*/
xajax.debug.getResponseProcessor = xajax.getResponseProcessor;
xajax.getResponseProcessor = function(oRequest) {
try {
var fProc = xajax.debug.getResponseProcessor(oRequest);
if ('undefined' == typeof fProc) {
var msg = xajax.debug.text[116];
try {
var contentType = oRequest.request.getResponseHeader('content-type');
msg += "Content-Type: ";
msg += contentType;
if ('text/html' == contentType) {
msg += xajax.debug.text[117];
}
} catch (e) {
}
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return fProc;
} catch (e) {
var msg = 'GetResponseProcessor: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.responseReceived
Generate a message indicating that a response has been received
from the server; provide some statistical data regarding the
response and the response time.
Catch any exceptions that are thrown during the processing of
the response and generate a message.
This is a wrapper around the standard <xajax.responseReceived>
function.
*/
xajax.debug.responseReceived = xajax.responseReceived;
xajax.responseReceived = function(oRequest) {
var xx = xajax;
var xt = xx.tools;
var xd = xx.debug;
var oRet;
try {
var status = oRequest.request.status;
if (xt.in_array(xx.responseSuccessCodes, status)) {
var packet = oRequest.request.responseText;
packet = packet.replace(new RegExp('<cmd', 'g'), '\n<cmd');
packet = packet.replace(new RegExp('<xjx>', 'g'), '\n<xjx>');
packet = packet.replace(new RegExp('<xjxobj>', 'g'), '\n<xjxobj>');
packet = packet.replace(new RegExp('<e>', 'g'), '\n<e>');
packet = packet.replace(new RegExp('</xjxobj>', 'g'), '\n</xjxobj>\n');
packet = packet.replace(new RegExp('</xjx>', 'g'), '\n</xjx>');
oRequest.midDate = new Date();
var msg = xajax.debug.text[118];
msg += oRequest.request.status;
msg += xajax.debug.text[119];
msg += packet.length;
msg += xajax.debug.text[120];
msg += (oRequest.midDate - oRequest.beginDate);
msg += xajax.debug.text[121];
msg += packet;
xd.writeMessage(msg);
} else if (xt.in_array(xx.responseErrorsForAlert, status)) {
var msg = xajax.debug.text[122];
msg += status;
msg += xajax.debug.text[123];
msg += oRequest.request.responseText;
xd.writeMessage(msg, xajax.debug.text[101], 'errorText');
} else if (xt.in_array(xx.responseRedirectCodes, status)) {
var msg = xajax.debug.text[124];
msg += oRequest.request.getResponseHeader('location');
xd.writeMessage(msg);
}
oRet = xd.responseReceived(oRequest);
} catch (e) {
var msg = 'ResponseReceived: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xd.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return oRet;
}
/*
Function: xajax.completeResponse
Generate a message indicating that the request has completed
and provide some statistics regarding the request and response.
This is a wrapper around the standard <xajax.completeResponse>
function.
*/
xajax.debug.completeResponse = xajax.completeResponse;
xajax.completeResponse = function(oRequest) {
try {
var returnValue = xajax.debug.completeResponse(oRequest);
oRequest.endDate = new Date();
var msg = xajax.debug.text[125];
msg += (oRequest.endDate - oRequest.beginDate);
msg += xajax.debug.text[126];
xajax.debug.writeMessage(msg);
return returnValue;
} catch (e) {
var msg = 'CompleteResponse: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.tools.getRequestObject
Generate a message indicating that the request object is
being initialized.
Catch any exceptions that are thrown during the process or
initializing a new request object.
This is a wrapper around the standard <xajax.getRequestObject>
function.
*/
xajax.debug.getRequestObject = xajax.tools.getRequestObject;
xajax.tools.getRequestObject = function() {
try {
xajax.debug.writeMessage(xajax.debug.text[127]);
return xajax.debug.getRequestObject();
} catch (e) {
var msg = 'GetRequestObject: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
throw e;
}
}
/*
Function: xajax.dom.assign
Catch any exceptions thrown during the assignment and
display an error message.
This is a wrapper around the standard <xajax.dom.assign>
function.
*/
if (xajax.dom.assign) {
xajax.debug.assign = xajax.dom.assign;
xajax.dom.assign = function(element, property, data) {
try {
return xajax.debug.assign(element, property, data);
} catch (e) {
var msg = 'xajax.dom.assign: ';
msg += xajax.debug.getExceptionText(e);
msg += '\n';
msg += 'Eval: element.';
msg += property;
msg += ' = data;\n';
xajax.debug.writeMessage(msg, xajax.debug.text[101], 'errorText');
}
return true;
}
}
/*
Function: xajax.tools.queue.retry
*/
if (xajax.tools) {
if (xajax.tools.queue) {
if (xajax.tools.queue.retry) {
if ('undefined' == typeof xajax.debug.tools)
xajax.debug.tools = {};
if ('undefined' == typeof xajax.debug.tools.queue)
xajax.debug.tools.queue = {};
xajax.debug.tools.queue.retry = xajax.tools.queue.retry;
xajax.tools.queue.retry = function(obj, count) {
if (xajax.debug.tools.queue.retry(obj, count))
return true;
// no 'exceeded' message for sleep command
if (obj.cmd && 's' == obj.cmd)
return false;
xajax.debug.writeMessage('Retry count exceeded.');
return false;
}
}
}
}
/*
Boolean: xajax.debug.isLoaded
true - indicates that the debugging module is loaded
*/
xajax.debug.isLoaded = true;
/*
Section: Redefine shortcuts.
Must redefine these shortcuts so they point to the new debug (wrapper) versions:
- <xjx.$>
- <xjx.getFormValues>
- <xjx.call>
Must redefine these shortcuts as well:
- <xajax.$>
- <xajax.getFormValues>
*/
xjx = {}
xjx.$ = xajax.tools.$;
xjx.getFormValues = xajax.tools.getFormValues;
xjx.call = xajax.call;
xjx.request = xajax.request;
xajax.$ = xajax.tools.$;
xajax.getFormValues = xajax.tools.getFormValues;
} catch (e) {
alert(e.name + ': ' + e.message);
}

View File

@@ -0,0 +1,10 @@
if('undefined'!=typeof xajax.debug){xajax.debug.text=[];xajax.debug.text[100]='ПРЕДУПРЕЖДЕНИЕ: ';xajax.debug.text[101]='ГРЕШКА: ';xajax.debug.text[102]='XAJAX ДЕБЪГ СЪОБЩЕНИЕ:\n';xajax.debug.text[103]='...\n[ДЪЛЪГ ОТГОВОР]\n...';xajax.debug.text[104]='ИЗПРАЩАНЕ НА ЗАЯВКИ';xajax.debug.text[105]='ИЗПРАТЕНИ [';xajax.debug.text[106]=' байта]';xajax.debug.text[107]='ИЗВИКВАНЕ: ';xajax.debug.text[108]='Адрес: ';xajax.debug.text[109]='ИНИЦИАЛИЗИРАНЕ НА ЗАЯВКАТА';xajax.debug.text[110]='ОБРАБОТВАНЕ НА ПАРАМЕТРИТЕ [';xajax.debug.text[111]=']';xajax.debug.text[112]='НЯМА ПАРАМЕТРИ ЗА ОБРАБОТВАНЕ';xajax.debug.text[113]='ПОДГОТВЯВАНЕ НА ЗАЯВКАТА';xajax.debug.text[114]='СТАРТИРАНЕ НА XAJAX ПОВИКВАНЕТО (остаряло: вместо това използвай xajax.request)';xajax.debug.text[115]='СТАРТИРАНЕ НА XAJAX ЗАЯВКАТА';xajax.debug.text[116]='Няма регистрирани функции, които да обработят заявката ви на сървъра!\n';xajax.debug.text[117]='.\nПровери за съобщения за грешки на сървъра.';xajax.debug.text[118]='ПОЛУЧЕНИ [статус: ';xajax.debug.text[119]=', размер: ';xajax.debug.text[120]=' байта, време: ';xajax.debug.text[121]='мсек]:\n';xajax.debug.text[122]='Сървъра върна следния HTTP статус: ';xajax.debug.text[123]='\nПОЛУЧЕНИ:\n';xajax.debug.text[124]='Сървъра върна пренасочване към:<br />';xajax.debug.text[125]='ГОТОВО [';xajax.debug.text[126]='мсек]';xajax.debug.text[127]='ИНИЦИАЛИЗИРАНЕ НА ОБЕКТА НА ЗАЯВКАТА';xajax.debug.exceptions=[];xajax.debug.exceptions[10001]='Невалиден XML отговор: Отговора съдържа непознат таг: {data}.';xajax.debug.exceptions[10002]='GetRequestObject: Няма XMLHttpRequest, xajax е изключен.';xajax.debug.exceptions[10003]='Препълване на опашката: Обекта не може да бъде сложен на опашката, защото тя е пълна.';xajax.debug.exceptions[10004]='Невалиден XML отговор: Отговора съдържа неочакван таг или текст: {data}.';xajax.debug.exceptions[10005]='Невалиден адрес: Невалиден или липсващ адрес; автоматичното откриване неуспешнп; please specify a one explicitly.';xajax.debug.exceptions[10006]='Невалидна команда в отговора: Получена беше невалидна команда като отговор.';xajax.debug.exceptions[10007]='Невалидна команда в отговора: Командата [{data}] е непозната.';xajax.debug.exceptions[10008]='Елемент с ID [{data}] не беше намерен в документа.';xajax.debug.exceptions[10009]='Невалидна заявка: Параметъра с името на функцията липсва.';xajax.debug.exceptions[10010]='Невалидна заявка: Липсва обекта на функцията.';}
if('undefined'!=typeof xajax.config){if('undefined'!=typeof xajax.config.status){xajax.config.status.update=function(){return{onRequest:function(){window.status='Изпращане на заявка...';},
onWaiting:function(){window.status='Изчакване на отговор...';},
onProcessing:function(){window.status='Изпълнение...';},
onComplete:function(){window.status='Готово.';}
}
}
}
}

View File

@@ -0,0 +1,81 @@
/**
* translation for: xajax v.x.x
* @version: 1.0.0
* @author: mic <info@joomx.com>
* @copyright xajax project
* @license GNU/GPL
* @package xajax x.x.x
* @since v.x.x.x
* save as UTF-8
*/
if ('undefined' != typeof xajax.debug) {
/*
Array: text
*/
xajax.debug.text = [];
xajax.debug.text[100] = 'ПРЕДУПРЕЖДЕНИЕ: ';
xajax.debug.text[101] = 'ГРЕШКА: ';
xajax.debug.text[102] = 'XAJAX ДЕБЪГ СЪОБЩЕНИЕ:\n';
xajax.debug.text[103] = '...\n[ДЪЛЪГ ОТГОВОР]\n...';
xajax.debug.text[104] = 'ИЗПРАЩАНЕ НА ЗАЯВКИ';
xajax.debug.text[105] = 'ИЗПРАТЕНИ [';
xajax.debug.text[106] = ' байта]';
xajax.debug.text[107] = 'ИЗВИКВАНЕ: ';
xajax.debug.text[108] = 'Адрес: ';
xajax.debug.text[109] = 'ИНИЦИАЛИЗИРАНЕ НА ЗАЯВКАТА';
xajax.debug.text[110] = 'ОБРАБОТВАНЕ НА ПАРАМЕТРИТЕ [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'НЯМА ПАРАМЕТРИ ЗА ОБРАБОТВАНЕ';
xajax.debug.text[113] = 'ПОДГОТВЯВАНЕ НА ЗАЯВКАТА';
xajax.debug.text[114] = 'СТАРТИРАНЕ НА XAJAX ПОВИКВАНЕТО (остаряло: вместо това използвай xajax.request)';
xajax.debug.text[115] = 'СТАРТИРАНЕ НА XAJAX ЗАЯВКАТА';
xajax.debug.text[116] = 'Няма регистрирани функции, които да обработят заявката ви на сървъра!\n';
xajax.debug.text[117] = '.\nПровери за съобщения за грешки на сървъра.';
xajax.debug.text[118] = 'ПОЛУЧЕНИ [статус: ';
xajax.debug.text[119] = ', размер: ';
xajax.debug.text[120] = ' байта, време: ';
xajax.debug.text[121] = 'мсек]:\n';
xajax.debug.text[122] = 'Сървъра върна следния HTTP статус: ';
xajax.debug.text[123] = '\nПОЛУЧЕНИ:\n';
xajax.debug.text[124] = 'Сървъра върна пренасочване към:<br />';
xajax.debug.text[125] = 'ГОТОВО [';
xajax.debug.text[126] = 'мсек]';
xajax.debug.text[127] = 'ИНИЦИАЛИЗИРАНЕ НА ОБЕКТА НА ЗАЯВКАТА';
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Невалиден XML отговор: Отговора съдържа непознат таг: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: Няма XMLHttpRequest, xajax е изключен.';
xajax.debug.exceptions[10003] = 'Препълване на опашката: Обекта не може да бъде сложен на опашката, защото тя е пълна.';
xajax.debug.exceptions[10004] = 'Невалиден XML отговор: Отговора съдържа неочакван таг или текст: {data}.';
xajax.debug.exceptions[10005] = 'Невалиден адрес: Невалиден или липсващ адрес; автоматичното откриване неуспешнп; please specify a one explicitly.';
xajax.debug.exceptions[10006] = 'Невалидна команда в отговора: Получена беше невалидна команда като отговор.';
xajax.debug.exceptions[10007] = 'Невалидна команда в отговора: Командата [{data}] е непозната.';
xajax.debug.exceptions[10008] = 'Елемент с ID [{data}] не беше намерен в документа.';
xajax.debug.exceptions[10009] = 'Невалидна заявка: Параметъра с името на функцията липсва.';
xajax.debug.exceptions[10010] = 'Невалидна заявка: Липсва обекта на функцията.';
}
if ('undefined' != typeof xajax.config) {
if ('undefined' != typeof xajax.config.status) {
/*
Object: update
*/
xajax.config.status.update = function() {
return {
onRequest: function() {
window.status = 'Изпращане на заявка...';
},
onWaiting: function() {
window.status = 'Изчакване на отговор...';
},
onProcessing: function() {
window.status = 'Изпълнение...';
},
onComplete: function() {
window.status = 'Готово.';
}
}
}
}
}

View File

@@ -0,0 +1,9 @@
if('undefined'!=typeof xajax.debug){xajax.debug.text=[];xajax.debug.text[100]='WARNUNG: ';xajax.debug.text[101]='FEHLER: ';xajax.debug.text[102]='XAJAX FEHLERSUCHE NACHRICHT:\n';xajax.debug.text[103]='...\n[UMGFANGREICHE ANTWORT]\n...';xajax.debug.text[104]='SENDE ANFRAGE';xajax.debug.text[105]='GESENDET [';xajax.debug.text[106]=' bytes]';xajax.debug.text[107]='STARTE AUFRUF: ';xajax.debug.text[108]='URI: ';xajax.debug.text[109]='BEGINNE ANFRAGE';xajax.debug.text[110]='PARAMETER IN BEARBEITUNG [';xajax.debug.text[111]=']';xajax.debug.text[112]='KEINE PARAMETER ZU VERARBEITEN';xajax.debug.text[113]='BEREITE REQUEST VOR';xajax.debug.text[114]='BEGINNE XAJAX CALL (veraltet: verwendet stattdessen xajax.request)';xajax.debug.text[115]='BEGINNE XAJAX ANFRAGE';xajax.debug.text[116]='Die vom Server erhaltenen Daten konnten nicht verarbeitet werden.\n';xajax.debug.text[117]='.\nPrüfe auf Fehlermeldungen des Servers.';xajax.debug.text[118]='ERHALTEN [status: ';xajax.debug.text[119]=', Größe: ';xajax.debug.text[120]=' bytes, Zeit: ';xajax.debug.text[121]='ms]:\n';xajax.debug.text[122]='Der Server hat folgenden HTTP-Status zurück gesendet: ';xajax.debug.text[123]='\nERHALTEN:\n';xajax.debug.text[124]='Der Server lieferte einen Redirect nach:<br />';xajax.debug.text[125]='ABGESCHLOSSEN [';xajax.debug.text[126]='ms]';xajax.debug.text[127]='INITIALISIERE REQUEST OBJEKT';xajax.debug.exceptions=[];xajax.debug.exceptions[10001]='Ungültige XML-Antwort: die Antwort enthält ein ungültiges Tag: {data}.';xajax.debug.exceptions[10002]='GetRequestObject: XMLHttpRequest ist nicht verfügbar, XajaX ist nicht verfügbar.';xajax.debug.exceptions[10003]='Warteschleife-Überlauf: kann Objekt nicht an Warteschleife übergeben da diese voll ist.';xajax.debug.exceptions[10004]='Ungültige XML-Antwort: die Antwort enthält einen unerwarteten Tag oder Text: {data}.';xajax.debug.exceptions[10005]='Ungültige Request-URI: Ungültige oder Fehlende URI; Autoerkennung fehlgeschlagen; bitte nur eine einzige URI angeben.';xajax.debug.exceptions[10006]='Ungültiges Antwort-Befehl: Unvollständiges Objekt zurück erhalten.';xajax.debug.exceptions[10007]='Ungültiges Antwort-Befehl: Befehl [{data}] ist nicht bekannt.';xajax.debug.exceptions[10008]='Es konnte kein Element mit der ID [{data}] konnte im Dokument gefunden werden.';xajax.debug.exceptions[10009]='Ungültige Anfrage: Fehlender Funktionsparameter - name.';xajax.debug.exceptions[10010]='Ungültige Anfrage: Fehlender Funktionsparameter - object.';}
if('undefined'!=typeof xajax.config){if('undefined'!=typeof xajax.config.status){xajax.config.status.update=function(){return{onRequest:function(){window.status='Sende Anfrage...';},
onWaiting:function(){window.status='Warten auf Antwort...';},
onProcessing:function(){window.status='Verarbeitung...';},
onComplete:function(){window.status='Fertig.';}
}
}
}
}

View File

@@ -0,0 +1,84 @@
/**
* translation for: xajax v.x.x
* @version: 1.0.0
* @author: mic <info@joomx.com>
* @copyright xajax project
* @license GNU/GPL
* @package xajax x.x.x
* @since v.x.x.x
* save as UTF-8
*/
if ('undefined' != typeof xajax.debug) {
/*
Array: text
*/
xajax.debug.text = [];
xajax.debug.text[100] = 'WARNUNG: ';
xajax.debug.text[101] = 'FEHLER: ';
xajax.debug.text[102] = 'XAJAX FEHLERSUCHE NACHRICHT:\n';
xajax.debug.text[103] = '...\n[UMGFANGREICHE ANTWORT]\n...';
xajax.debug.text[104] = 'SENDE ANFRAGE';
xajax.debug.text[105] = 'GESENDET [';
xajax.debug.text[106] = ' bytes]';
xajax.debug.text[107] = 'STARTE AUFRUF: ';
xajax.debug.text[108] = 'URI: ';
xajax.debug.text[109] = 'BEGINNE ANFRAGE';
xajax.debug.text[110] = 'PARAMETER IN BEARBEITUNG [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'KEINE PARAMETER ZU VERARBEITEN';
xajax.debug.text[113] = 'BEREITE REQUEST VOR';
xajax.debug.text[114] = 'BEGINNE XAJAX CALL (veraltet: verwendet stattdessen xajax.request)';
xajax.debug.text[115] = 'BEGINNE XAJAX ANFRAGE';
xajax.debug.text[116] = 'Die vom Server erhaltenen Daten konnten nicht verarbeitet werden.\n';
xajax.debug.text[117] = '.\nPrüfe auf Fehlermeldungen des Servers.';
xajax.debug.text[118] = 'ERHALTEN [status: ';
xajax.debug.text[119] = ', Größe: ';
xajax.debug.text[120] = ' bytes, Zeit: ';
xajax.debug.text[121] = 'ms]:\n';
xajax.debug.text[122] = 'Der Server hat folgenden HTTP-Status zurück gesendet: ';
xajax.debug.text[123] = '\nERHALTEN:\n';
xajax.debug.text[124] = 'Der Server lieferte einen Redirect nach:<br />';
xajax.debug.text[125] = 'ABGESCHLOSSEN [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'INITIALISIERE REQUEST OBJEKT';
/*
Array: exceptions
*/
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Ungültige XML-Antwort: die Antwort enthält ein ungültiges Tag: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: XMLHttpRequest ist nicht verfügbar, XajaX ist nicht verfügbar.';
xajax.debug.exceptions[10003] = 'Warteschleife-Überlauf: kann Objekt nicht an Warteschleife übergeben da diese voll ist.';
xajax.debug.exceptions[10004] = 'Ungültige XML-Antwort: die Antwort enthält einen unerwarteten Tag oder Text: {data}.';
xajax.debug.exceptions[10005] = 'Ungültige Request-URI: Ungültige oder Fehlende URI; Autoerkennung fehlgeschlagen; bitte nur eine einzige URI angeben.';
xajax.debug.exceptions[10006] = 'Ungültiges Antwort-Befehl: Unvollständiges Objekt zurück erhalten.';
xajax.debug.exceptions[10007] = 'Ungültiges Antwort-Befehl: Befehl [{data}] ist nicht bekannt.';
xajax.debug.exceptions[10008] = 'Es konnte kein Element mit der ID [{data}] konnte im Dokument gefunden werden.';
xajax.debug.exceptions[10009] = 'Ungültige Anfrage: Fehlender Funktionsparameter - name.';
xajax.debug.exceptions[10010] = 'Ungültige Anfrage: Fehlender Funktionsparameter - object.';
}
if ('undefined' != typeof xajax.config) {
if ('undefined' != typeof xajax.config.status) {
/*
Object: update
*/
xajax.config.status.update = function() {
return {
onRequest: function() {
window.status = 'Sende Anfrage...';
},
onWaiting: function() {
window.status = 'Warten auf Antwort...';
},
onProcessing: function() {
window.status = 'Verarbeitung...';
},
onComplete: function() {
window.status = 'Fertig.';
}
}
}
}
}

View File

@@ -0,0 +1,10 @@
if('undefined'!=typeof xajax.debug){xajax.debug.text=[];xajax.debug.text[100]='ALERTA: ';xajax.debug.text[101]='ERROR: ';xajax.debug.text[102]='MENSAJE XAJAX DEBUG:\n';xajax.debug.text[103]='...\n[RESPUESTA LARGA]\n...';xajax.debug.text[104]='ENVIANDO PETICION';xajax.debug.text[105]='ENVIADO [';xajax.debug.text[106]=' bytes]';xajax.debug.text[107]='LLAMADA: ';xajax.debug.text[108]='URI: ';xajax.debug.text[109]='INICIALIZANDO PETICION';xajax.debug.text[110]='PROCESANDO PARAMETROS [';xajax.debug.text[111]=']';xajax.debug.text[112]='NO HAY PARAMETROS A PROCESAR';xajax.debug.text[113]='PREPARANDO PETICION';xajax.debug.text[114]='INICIANDO XAJAX CALL (En desuso: use xajax.request)';xajax.debug.text[115]='INICIANDO XAJAX REQUEST';xajax.debug.text[116]='Ningún procesador de respuesta esta disponible para tratar la respuesta del servidor.\n';xajax.debug.text[117]='.\nRevisa mensajes de error del servidor.';xajax.debug.text[118]='RECIBIDO [status: ';xajax.debug.text[119]=', size: ';xajax.debug.text[120]=' bytes, time: ';xajax.debug.text[121]='ms]:\n';xajax.debug.text[122]='El servidor retorno el siguiente estado HTTP: ';xajax.debug.text[123]='\nRECIBIDO:\n';xajax.debug.text[124]='El servidor retorno una redireccion a:<br />';xajax.debug.text[125]='HECHO [';xajax.debug.text[126]='ms]';xajax.debug.text[127]='INICIALIZANDO PETICION OBJETO';xajax.debug.exceptions=[];xajax.debug.exceptions[10001]='Invalid response XML: La respuesta contiene una etiqueta desconocida: {data}.';xajax.debug.exceptions[10002]='GetRequestObject: XMLHttpRequest no disponible, xajax esta deshabilitado.';xajax.debug.exceptions[10003]='Queue overflow: No se puede colocar objeto en cola porque esta llena.';xajax.debug.exceptions[10004]='Invalid response XML: La respuesta contiene una etiqueta o texto inesperado: {data}.';xajax.debug.exceptions[10005]='Invalid request URI: URI invalida o perdida; autodeteccion fallida; por favor especifica una explicitamente.';xajax.debug.exceptions[10006]='Invalid response command: Orden de respuesta mal formado recibido.';xajax.debug.exceptions[10007]='Invalid response command: Comando [{data}] no es un comando conocido.';xajax.debug.exceptions[10008]='Elemento con ID [{data}] no encontrado en el documento.';xajax.debug.exceptions[10009]='Invalid request: Nombre parametro de funcion perdido.';xajax.debug.exceptions[10010]='Invalid request: Objeto parametro de funcion perdido.';}
if('undefined'!=typeof xajax.config){if('undefined'!=typeof xajax.config.status){xajax.config.status.update=function(){return{onRequest:function(){window.status='Enviando Peticion...';},
onWaiting:function(){window.status='Esperando Respuesta...';},
onProcessing:function(){window.status='Procesando...';},
onComplete:function(){window.status='Hecho.';}
}
}
}
}

View File

@@ -0,0 +1,81 @@
/**
* translation for: xajax v.x.x
* @version: 1.0.0
* @author: mic <info@joomx.com>
* @copyright xajax project
* @license GNU/GPL
* @package xajax x.x.x
* @since v.x.x.x
* save as UTF-8
*/
if ('undefined' != typeof xajax.debug) {
/*
Array: text
*/
xajax.debug.text = [];
xajax.debug.text[100] = 'ALERTA: ';
xajax.debug.text[101] = 'ERROR: ';
xajax.debug.text[102] = 'MENSAJE XAJAX DEBUG:\n';
xajax.debug.text[103] = '...\n[RESPUESTA LARGA]\n...';
xajax.debug.text[104] = 'ENVIANDO PETICION';
xajax.debug.text[105] = 'ENVIADO [';
xajax.debug.text[106] = ' bytes]';
xajax.debug.text[107] = 'LLAMADA: ';
xajax.debug.text[108] = 'URI: ';
xajax.debug.text[109] = 'INICIALIZANDO PETICION';
xajax.debug.text[110] = 'PROCESANDO PARAMETROS [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'NO HAY PARAMETROS A PROCESAR';
xajax.debug.text[113] = 'PREPARANDO PETICION';
xajax.debug.text[114] = 'INICIANDO XAJAX CALL (En desuso: use xajax.request)';
xajax.debug.text[115] = 'INICIANDO XAJAX REQUEST';
xajax.debug.text[116] = 'Ning<6E>n procesador de respuesta esta disponible para tratar la respuesta del servidor.\n';
xajax.debug.text[117] = '.\nRevisa mensajes de error del servidor.';
xajax.debug.text[118] = 'RECIBIDO [status: ';
xajax.debug.text[119] = ', size: ';
xajax.debug.text[120] = ' bytes, time: ';
xajax.debug.text[121] = 'ms]:\n';
xajax.debug.text[122] = 'El servidor retorno el siguiente estado HTTP: ';
xajax.debug.text[123] = '\nRECIBIDO:\n';
xajax.debug.text[124] = 'El servidor retorno una redireccion a:<br />';
xajax.debug.text[125] = 'HECHO [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'INICIALIZANDO PETICION OBJETO';
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Invalid response XML: La respuesta contiene una etiqueta desconocida: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: XMLHttpRequest no disponible, xajax esta deshabilitado.';
xajax.debug.exceptions[10003] = 'Queue overflow: No se puede colocar objeto en cola porque esta llena.';
xajax.debug.exceptions[10004] = 'Invalid response XML: La respuesta contiene una etiqueta o texto inesperado: {data}.';
xajax.debug.exceptions[10005] = 'Invalid request URI: URI invalida o perdida; autodeteccion fallida; por favor especifica una explicitamente.';
xajax.debug.exceptions[10006] = 'Invalid response command: Orden de respuesta mal formado recibido.';
xajax.debug.exceptions[10007] = 'Invalid response command: Comando [{data}] no es un comando conocido.';
xajax.debug.exceptions[10008] = 'Elemento con ID [{data}] no encontrado en el documento.';
xajax.debug.exceptions[10009] = 'Invalid request: Nombre parametro de funcion perdido.';
xajax.debug.exceptions[10010] = 'Invalid request: Objeto parametro de funcion perdido.';
}
if ('undefined' != typeof xajax.config) {
if ('undefined' != typeof xajax.config.status) {
/*
Object: update
*/
xajax.config.status.update = function() {
return {
onRequest: function() {
window.status = 'Enviando Peticion...';
},
onWaiting: function() {
window.status = 'Esperando Respuesta...';
},
onProcessing: function() {
window.status = 'Procesando...';
},
onComplete: function() {
window.status = 'Hecho.';
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
xajax.debug.text=[];xajax.debug.text[100]='ATTENTION : ';xajax.debug.text[101]='ERREUR : ';xajax.debug.text[102]='MESSAGE DE DEBUG XAJAX :\n';xajax.debug.text[103]='...\n[RÉPONSE LONGUE]\n...';xajax.debug.text[104]='ENVOI DE LA REQUÊTE';xajax.debug.text[105]='ENVOYÉ [';xajax.debug.text[106]=' octets]';xajax.debug.text[107]='APPEL : ';xajax.debug.text[108]='URI : ';xajax.debug.text[109]='INITIALISATION DE LA REQUÊTE';xajax.debug.text[110]='TRAITEMENT DES PARAMÈTRES [';xajax.debug.text[111]=']';xajax.debug.text[112]='AUCUN PARAMÈTRE À TRAITER';xajax.debug.text[113]='PRÉPARATION DE LA REQUÊTE';xajax.debug.text[114]='DÉBUT DE L\'APPEL XAJAX (déprécié: utilisez plutôt xajax.request)';xajax.debug.text[115]='DÉBUT DE LA REQUÊTE';xajax.debug.text[116]='Aucun traitement disponible pour traiter la réponse du serveur.\n';xajax.debug.text[117]='.\nVérifie s\'il existe des messages d\'erreur du serveur.';xajax.debug.text[118]='REÇUS [statut : ';xajax.debug.text[119]=', taille: ';xajax.debug.text[120]=' octets, temps: ';xajax.debug.text[121]='ms] :\n';xajax.debug.text[122]='Le serveur a retourné la statut HTTP suivant : ';xajax.debug.text[123]='\nREÇUS :\n';xajax.debug.text[124]='Le serveur a indiqué une redirection vers :<br />';xajax.debug.text[125]='FAIT [';xajax.debug.text[126]='ms]';xajax.debug.text[127]='INITIALISATION DE L\'OBJET REQUÊTE';xajax.debug.exceptions=[];xajax.debug.exceptions[10001]='Réponse XML non valide : La réponse contient une balise inconnue : {data}.';xajax.debug.exceptions[10002]='GetRequestObject : XMLHttpRequest n\'est pas disponible, xajax est désactivé.';xajax.debug.exceptions[10003]='File pleine : Ne peut ajouter un objet à la file car elle est pleine.';xajax.debug.exceptions[10004]='Réponse XML non valide : La réponse contient une balise ou un texte inattendu : {data}.';xajax.debug.exceptions[10005]='URI de la requête non valide : URI non valide ou manquante; auto-détection échouée; veuillez en spécifier une explicitement.';xajax.debug.exceptions[10006]='Réponse de commande invalide : Commande de réponse reçue mal formée.';xajax.debug.exceptions[10007]='Réponse de commande invalide : Commande [{data}] est inconnue.';xajax.debug.exceptions[10008]='L\'élément d\'ID [{data}] est introuvable dans le document.';xajax.debug.exceptions[10009]='Requête invalide : Aucun nom de fonction indiqué en paramètre.';xajax.debug.exceptions[10010]='Requête invalide : Aucun objet indiqué en paramètre pour la fonction.';if('undefined'!=typeof xajax.config){if('undefined'!=typeof xajax.config.status){xajax.config.status.update=function(){return{onRequest:function(){window.status='Envoi de la requête...';},
onWaiting:function(){window.status='Attente de la réponse...';},
onProcessing:function(){window.status='En cours de traitement...';},
onComplete:function(){window.status='Fait.';}
}
}
}
}

View File

@@ -0,0 +1,65 @@
xajax.debug.text = [];
xajax.debug.text[100] = 'ATTENTION : ';
xajax.debug.text[101] = 'ERREUR : ';
xajax.debug.text[102] = 'MESSAGE DE DEBUG XAJAX :\n';
xajax.debug.text[103] = '...\n[R<>PONSE LONGUE]\n...';
xajax.debug.text[104] = 'ENVOI DE LA REQU<51>TE';
xajax.debug.text[105] = 'ENVOY<4F> [';
xajax.debug.text[106] = ' octets]';
xajax.debug.text[107] = 'APPEL : ';
xajax.debug.text[108] = 'URI : ';
xajax.debug.text[109] = 'INITIALISATION DE LA REQU<51>TE';
xajax.debug.text[110] = 'TRAITEMENT DES PARAM<41>TRES [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'AUCUN PARAM<41>TRE <20> TRAITER';
xajax.debug.text[113] = 'PR<50>PARATION DE LA REQU<51>TE';
xajax.debug.text[114] = 'D<>BUT DE L\'APPEL XAJAX (d<>pr<70>ci<63>: utilisez plut<75>t xajax.request)';
xajax.debug.text[115] = 'D<>BUT DE LA REQU<51>TE';
xajax.debug.text[116] = 'Aucun traitement disponible pour traiter la r<>ponse du serveur.\n';
xajax.debug.text[117] = '.\nV<6E>rifie s\'il existe des messages d\'erreur du serveur.';
xajax.debug.text[118] = 'RE<52>US [statut : ';
xajax.debug.text[119] = ', taille: ';
xajax.debug.text[120] = ' octets, temps: ';
xajax.debug.text[121] = 'ms] :\n';
xajax.debug.text[122] = 'Le serveur a retourn<72> la statut HTTP suivant : ';
xajax.debug.text[123] = '\nRE<52>US :\n';
xajax.debug.text[124] = 'Le serveur a indiqu<71> une redirection vers :<br />';
xajax.debug.text[125] = 'FAIT [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'INITIALISATION DE L\'OBJET REQU<51>TE';
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'R<>ponse XML non valide : La r<>ponse contient une balise inconnue : {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject : XMLHttpRequest n\'est pas disponible, xajax est d<>sactiv<69>.';
xajax.debug.exceptions[10003] = 'File pleine : Ne peut ajouter un objet <20> la file car elle est pleine.';
xajax.debug.exceptions[10004] = 'R<>ponse XML non valide : La r<>ponse contient une balise ou un texte inattendu : {data}.';
xajax.debug.exceptions[10005] = 'URI de la requ<71>te non valide : URI non valide ou manquante; auto-d<>tection <20>chou<6F>e; veuillez en sp<73>cifier une explicitement.';
xajax.debug.exceptions[10006] = 'R<>ponse de commande invalide : Commande de r<>ponse re<72>ue mal form<72>e.';
xajax.debug.exceptions[10007] = 'R<>ponse de commande invalide : Commande [{data}] est inconnue.';
xajax.debug.exceptions[10008] = 'L\'<27>l<EFBFBD>ment d\'ID [{data}] est introuvable dans le document.';
xajax.debug.exceptions[10009] = 'Requ<71>te invalide : Aucun nom de fonction indiqu<71> en param<61>tre.';
xajax.debug.exceptions[10010] = 'Requ<71>te invalide : Aucun objet indiqu<71> en param<61>tre pour la fonction.';
if ('undefined' != typeof xajax.config) {
if ('undefined' != typeof xajax.config.status) {
/*
Object: mise <20> jour
*/
xajax.config.status.update = function() {
return {
onRequest: function() {
window.status = 'Envoi de la requ<71>te...';
},
onWaiting: function() {
window.status = 'Attente de la r<>ponse...';
},
onProcessing: function() {
window.status = 'En cours de traitement...';
},
onComplete: function() {
window.status = 'Fait.';
}
}
}
}
}

View File

@@ -0,0 +1,9 @@
if('undefined'!=typeof xajax.debug){xajax.debug.text=[];xajax.debug.text[100]='FOUTMELDING: ';xajax.debug.text[101]='FOUT: ';xajax.debug.text[102]='XAJAX FOUTMELDINGS BERICHT:\n';xajax.debug.text[103]='...\n[LANG ANTWOORD]\n...';xajax.debug.text[104]='VERZENDING AANVRAAG';xajax.debug.text[105]='VERZONDEN [';xajax.debug.text[106]=' bytes]';xajax.debug.text[107]='AANROEPING: ';xajax.debug.text[108]='URI: ';xajax.debug.text[109]='INITIALISATIE AANVRAAG';xajax.debug.text[110]='VERWERKING PARAMETERS [';xajax.debug.text[111]=']';xajax.debug.text[112]='GEEN PARAMETERS OM TE VERWERKEN';xajax.debug.text[113]='VOORBEREIDING AANVRAAG';xajax.debug.text[114]='BEGIN XAJAX AANVRAAG (verouderd: gebruik xajax.request)';xajax.debug.text[115]='BEGIN XAJAX AANVRAAG';xajax.debug.text[116]='Er is geen verwerkingsbestand gespecificeerd om de aanvraag te verwerken.\n';xajax.debug.text[117]='.\nBekijk foutmeldingen van de server.';xajax.debug.text[118]='ONTVANGEN [status: ';xajax.debug.text[119]=', omvang: ';xajax.debug.text[120]=' bytes, Zeit: ';xajax.debug.text[121]='ms]:\n';xajax.debug.text[122]='De server retourneert de volgende HTTP-status: ';xajax.debug.text[123]='\nONTVANGEN:\n';xajax.debug.text[124]='De server retourneert een doorverwijzing naar:<br />';xajax.debug.text[125]='KLAAR [';xajax.debug.text[126]='ms]';xajax.debug.text[127]='INITIALISATIE OBJECT AANVRAAG';xajax.debug.exceptions=[];xajax.debug.exceptions[10001]='Ongeldig XML-antwoord: het antwoord bevat een onbekende tag: {data}.';xajax.debug.exceptions[10002]='GetRequestObject: XMLHttpRequest is niet beschikbaar, XajaX is uitgeschakeld.';xajax.debug.exceptions[10003]='Wachtrij limiet overschreden: kan het object niet in de wachtrij plaatsen, omdat die vol is.';xajax.debug.exceptions[10004]='Ongeldig XML-antwoord: het antwoord bevat een onverwachte tag of tekst: {data}.';xajax.debug.exceptions[10005]='Ongeldige Request-URI: Ongeldige of ontbrekende URI; automatische detectie faalt; specificeer een URI expliciet.';xajax.debug.exceptions[10006]='Ongeldig antwoord bevel: misvormd antwoord bevel ontvangen.';xajax.debug.exceptions[10007]='Ongeldig antwoord bevel: Bevel [{data}] is niet bekend.';xajax.debug.exceptions[10008]='Element met het ID [{data}] kon niet in het document worden gevonden.';xajax.debug.exceptions[10009]='Ongeldige aanvraag: Missende functie parameter - naam.';xajax.debug.exceptions[10010]='Ongeldige aanvraag: Missende functie parameter - object.';}
if('undefined'!=typeof xajax.config){if('undefined'!=typeof xajax.config.status){xajax.config.status.update=function(){return{onRequest:function(){window.status="Verzenden aanvraag...";},
onWaiting:function(){window.status="Wachten op antwoord...";},
onProcessing:function(){window.status="Verwerking...";},
onComplete:function(){window.status="Afgesloten.";}
}
}
}
}

View File

@@ -0,0 +1,84 @@
/**
* translation for: xajax v.x.x
* @version: 1.0.0
* @author: jeffrey <walkingsoul@gmail.com>
* @copyright xajax project
* @license GNU/GPL
* @package xajax x.x.x
* @since v.x.x.x
* save as UTF-8
*/
if ('undefined' != typeof xajax.debug) {
/*
Array: text
*/
xajax.debug.text = [];
xajax.debug.text[100] = 'FOUTMELDING: ';
xajax.debug.text[101] = 'FOUT: ';
xajax.debug.text[102] = 'XAJAX FOUTMELDINGS BERICHT:\n';
xajax.debug.text[103] = '...\n[LANG ANTWOORD]\n...';
xajax.debug.text[104] = 'VERZENDING AANVRAAG';
xajax.debug.text[105] = 'VERZONDEN [';
xajax.debug.text[106] = ' bytes]';
xajax.debug.text[107] = 'AANROEPING: ';
xajax.debug.text[108] = 'URI: ';
xajax.debug.text[109] = 'INITIALISATIE AANVRAAG';
xajax.debug.text[110] = 'VERWERKING PARAMETERS [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'GEEN PARAMETERS OM TE VERWERKEN';
xajax.debug.text[113] = 'VOORBEREIDING AANVRAAG';
xajax.debug.text[114] = 'BEGIN XAJAX AANVRAAG (verouderd: gebruik xajax.request)';
xajax.debug.text[115] = 'BEGIN XAJAX AANVRAAG';
xajax.debug.text[116] = 'Er is geen verwerkingsbestand gespecificeerd om de aanvraag te verwerken.\n';
xajax.debug.text[117] = '.\nBekijk foutmeldingen van de server.';
xajax.debug.text[118] = 'ONTVANGEN [status: ';
xajax.debug.text[119] = ', omvang: ';
xajax.debug.text[120] = ' bytes, Zeit: ';
xajax.debug.text[121] = 'ms]:\n';
xajax.debug.text[122] = 'De server retourneert de volgende HTTP-status: ';
xajax.debug.text[123] = '\nONTVANGEN:\n';
xajax.debug.text[124] = 'De server retourneert een doorverwijzing naar:<br />';
xajax.debug.text[125] = 'KLAAR [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'INITIALISATIE OBJECT AANVRAAG';
/*
Array: exceptions
*/
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Ongeldig XML-antwoord: het antwoord bevat een onbekende tag: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: XMLHttpRequest is niet beschikbaar, XajaX is uitgeschakeld.';
xajax.debug.exceptions[10003] = 'Wachtrij limiet overschreden: kan het object niet in de wachtrij plaatsen, omdat die vol is.';
xajax.debug.exceptions[10004] = 'Ongeldig XML-antwoord: het antwoord bevat een onverwachte tag of tekst: {data}.';
xajax.debug.exceptions[10005] = 'Ongeldige Request-URI: Ongeldige of ontbrekende URI; automatische detectie faalt; specificeer een URI expliciet.';
xajax.debug.exceptions[10006] = 'Ongeldig antwoord bevel: misvormd antwoord bevel ontvangen.';
xajax.debug.exceptions[10007] = 'Ongeldig antwoord bevel: Bevel [{data}] is niet bekend.';
xajax.debug.exceptions[10008] = 'Element met het ID [{data}] kon niet in het document worden gevonden.';
xajax.debug.exceptions[10009] = 'Ongeldige aanvraag: Missende functie parameter - naam.';
xajax.debug.exceptions[10010] = 'Ongeldige aanvraag: Missende functie parameter - object.';
}
if ('undefined' != typeof xajax.config) {
if ('undefined' != typeof xajax.config.status) {
/*
Object: update
*/
xajax.config.status.update = function() {
return {
onRequest: function() {
window.status = "Verzenden aanvraag...";
},
onWaiting: function() {
window.status = "Wachten op antwoord...";
},
onProcessing: function() {
window.status = "Verwerking...";
},
onComplete: function() {
window.status = "Afgesloten.";
}
}
}
}
}

View File

@@ -0,0 +1,10 @@
if('undefined'!=typeof xajax.debug){xajax.debug.text=[];xajax.debug.text[100]='IKAZ: ';xajax.debug.text[101]='HATA: ';xajax.debug.text[102]='XAJAX DEBUG (HATA AYIKLAMASI) MESAJI:\n';xajax.debug.text[103]='...\n[UZUN YANIT]\n...';xajax.debug.text[104]='ISTEK GÖNDERILIYOR';xajax.debug.text[105]='GÖNDERILDI [';xajax.debug.text[106]=' byte]';xajax.debug.text[107]='ÇAGIRILIYOR: ';xajax.debug.text[108]='URI: ';xajax.debug.text[109]='ISTEK BASLATILIYOR';xajax.debug.text[110]='PARAMETRELER ISLENIYOR [';xajax.debug.text[111]=']';xajax.debug.text[112]='ISLENECEK PARAMETRE YOK';xajax.debug.text[113]='ISTEK HAZIRLANIYOR';xajax.debug.text[114]='XAJAX ÇAGRISI BASLATILIYOR (kullanimi tavsiye edilmiyor: yerine xajax.request kullanin)';xajax.debug.text[115]='XAJAX ISTEGI BASLATILIYOR';xajax.debug.text[116]='Sunucudan gelen cevabi isleyecek cevap islemcisi yok.\n';xajax.debug.text[117]='.\nSunucudan gelen hata mesajlarini kontrol edin.';xajax.debug.text[118]='ALINDI [durum: ';xajax.debug.text[119]=', boyut: ';xajax.debug.text[120]=' byte, süre: ';xajax.debug.text[121]='ms]:\n';xajax.debug.text[122]='Sunucu asagidaki HTTP durumunu gönderdi: ';xajax.debug.text[123]='\nALINDI:\n';xajax.debug.text[124]='Sunucu su adrese yönlendirme istegi gönderdi :<br />';xajax.debug.text[125]='TAMAMLANDI [';xajax.debug.text[126]='ms]';xajax.debug.text[127]='ISTEK NESNESI BASLATILIYOR';xajax.debug.exceptions=[];xajax.debug.exceptions[10001]='Geçersiz XML cevabi: Cevap bilinmeyen bir etiket tasiyor: {data}.';xajax.debug.exceptions[10002]='GetRequestObject: XMLHttpRequest hazir degil, xajax nesnesi etkisizlestirildi.';xajax.debug.exceptions[10003]='Islem kuyrugu fazla yüklendi: Kuyruk dolu oldugu için nesne kuyruga eklenemiyor.';xajax.debug.exceptions[10004]='Geçersiz XML cevabi: Cevap bilinmeyen bir etiket veya metin tasiyor: {data}.';xajax.debug.exceptions[10005]='Geçersiz istek URI: Geçersiz veya kayip URI; otomatik tespit yapilamadi; lütfen açikça bir tane belirleyiniz.';xajax.debug.exceptions[10006]='Geçersiz cevap komutu: Bozulmus cevap komutu alindi.';xajax.debug.exceptions[10007]='Geçersiz cevap komutu: [{data}] komutu bilinmiyor.';xajax.debug.exceptions[10008]='[{data}] ID li element dosya içinde bulunamadi.';xajax.debug.exceptions[10009]='Geçersiz istek: Fonksiyon isim parametresi eksik.';xajax.debug.exceptions[10010]='Geçersiz istek: Fonksiyon nesne parametresi eksik.';}
if('undefined'!=typeof xajax.config){if('undefined'!=typeof xajax.config.status){xajax.config.status.update=function(){return{onRequest:function(){window.status='İstek Gönderiliyor...';},
onWaiting:function(){window.status='Cevap Bekleniyor...';},
onProcessing:function(){window.status='İşlem Devam Ediyor...';},
onComplete:function(){window.status='Tamamlandı.';}
}
}
}
}

View File

@@ -0,0 +1,82 @@
/**
* translation for: xajax v.x.x
* @version: 1.0.0
* @author: mic <info@joomx.com>
* @copyright xajax project
* @license GNU/GPL
* @package xajax x.x.x
* @since v.x.x.x
* save as UTF-8
*/
if ('undefined' != typeof xajax.debug) {
xajax.debug.text = [];
xajax.debug.text[100] = 'IKAZ: ';
xajax.debug.text[101] = 'HATA: ';
xajax.debug.text[102] = 'XAJAX DEBUG (HATA AYIKLAMASI) MESAJI:\n';
xajax.debug.text[103] = '...\n[UZUN YANIT]\n...';
xajax.debug.text[104] = 'ISTEK GÖNDERILIYOR';
xajax.debug.text[105] = 'GÖNDERILDI [';
xajax.debug.text[106] = ' byte]';
xajax.debug.text[107] = 'ÇAGIRILIYOR: ';
xajax.debug.text[108] = 'URI: ';
xajax.debug.text[109] = 'ISTEK BASLATILIYOR';
xajax.debug.text[110] = 'PARAMETRELER ISLENIYOR [';
xajax.debug.text[111] = ']';
xajax.debug.text[112] = 'ISLENECEK PARAMETRE YOK';
xajax.debug.text[113] = 'ISTEK HAZIRLANIYOR';
xajax.debug.text[114] = 'XAJAX ÇAGRISI BASLATILIYOR (kullanimi tavsiye edilmiyor: yerine xajax.request kullanin)';
xajax.debug.text[115] = 'XAJAX ISTEGI BASLATILIYOR';
xajax.debug.text[116] = 'Sunucudan gelen cevabi isleyecek cevap islemcisi yok.\n';
xajax.debug.text[117] = '.\nSunucudan gelen hata mesajlarini kontrol edin.';
xajax.debug.text[118] = 'ALINDI [durum: ';
xajax.debug.text[119] = ', boyut: ';
xajax.debug.text[120] = ' byte, süre: ';
xajax.debug.text[121] = 'ms]:\n';
xajax.debug.text[122] = 'Sunucu asagidaki HTTP durumunu gönderdi: ';
xajax.debug.text[123] = '\nALINDI:\n';
xajax.debug.text[124] = 'Sunucu su adrese yönlendirme istegi gönderdi :<br />';
xajax.debug.text[125] = 'TAMAMLANDI [';
xajax.debug.text[126] = 'ms]';
xajax.debug.text[127] = 'ISTEK NESNESI BASLATILIYOR';
/*
Array: exceptions
*/
xajax.debug.exceptions = [];
xajax.debug.exceptions[10001] = 'Geçersiz XML cevabi: Cevap bilinmeyen bir etiket tasiyor: {data}.';
xajax.debug.exceptions[10002] = 'GetRequestObject: XMLHttpRequest hazir degil, xajax nesnesi etkisizlestirildi.';
xajax.debug.exceptions[10003] = 'Islem kuyrugu fazla yüklendi: Kuyruk dolu oldugu için nesne kuyruga eklenemiyor.';
xajax.debug.exceptions[10004] = 'Geçersiz XML cevabi: Cevap bilinmeyen bir etiket veya metin tasiyor: {data}.';
xajax.debug.exceptions[10005] = 'Geçersiz istek URI: Geçersiz veya kayip URI; otomatik tespit yapilamadi; lütfen açikça bir tane belirleyiniz.';
xajax.debug.exceptions[10006] = 'Geçersiz cevap komutu: Bozulmus cevap komutu alindi.';
xajax.debug.exceptions[10007] = 'Geçersiz cevap komutu: [{data}] komutu bilinmiyor.';
xajax.debug.exceptions[10008] = '[{data}] ID li element dosya içinde bulunamadi.';
xajax.debug.exceptions[10009] = 'Geçersiz istek: Fonksiyon isim parametresi eksik.';
xajax.debug.exceptions[10010] = 'Geçersiz istek: Fonksiyon nesne parametresi eksik.';
}
if ('undefined' != typeof xajax.config) {
if ('undefined' != typeof xajax.config.status) {
/*
Object: update
*/
xajax.config.status.update = function() {
return {
onRequest: function() {
window.status = 'İstek Gönderiliyor...';
},
onWaiting: function() {
window.status = 'Cevap Bekleniyor...';
},
onProcessing: function() {
window.status = 'İşlem Devam Ediyor...';
},
onComplete: function() {
window.status = 'Tamamlandı.';
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
try{if('undefined'==typeof xajax)
throw{name:'SequenceError',message:'Error: xajax core was not detected, verbose module disabled.'}
if('undefined'==typeof xajax.debug)
throw{name:'SequenceError',message:'Error: xajax debugger was not detected, verbose module disabled.'}
xajax.debug.verbose={}
xajax.debug.verbose.expandObject=function(obj){var rec=true;if(1 < arguments.length)
rec=arguments[1];if('function'==typeof(obj)){return '[Function]';}else if('object'==typeof(obj)){if(true==rec){var t=' { ';var separator='';for(var m in obj){t+=separator;t+=m;t+=': ';try{t+=xajax.debug.verbose.expandObject(obj[m],false);}catch(e){t+='[n/a]';}
separator=', ';}
t+=' } ';return t;}else return '[Object]';}else return '"'+obj+'"';}
xajax.debug.verbose.makeFunction=function(obj,name){return function(){var fun=name;fun+='(';var separator='';var pLen=arguments.length;for(var p=0;p < pLen;++p){fun+=separator;fun+=xajax.debug.verbose.expandObject(arguments[p]);separator=',';}
fun+=');';var msg='--> ';msg+=fun;xajax.debug.writeMessage(msg);var returnValue=true;var code='returnValue = obj(';separator='';for(var p=0;p < pLen;++p){code+=separator;code+='arguments['+p+']';separator=',';}
code+=');';eval(code);msg='<-- ';msg+=fun;msg+=' returns ';msg+=xajax.debug.verbose.expandObject(returnValue);xajax.debug.writeMessage(msg);return returnValue;}
}
xajax.debug.verbose.hook=function(x,base){for(var m in x){if('function'==typeof(x[m])){x[m]=xajax.debug.verbose.makeFunction(x[m],base+m);}
}
}
xajax.debug.verbose.hook(xajax,'xajax.');xajax.debug.verbose.hook(xajax.callback,'xajax.callback.');xajax.debug.verbose.hook(xajax.css,'xajax.css.');xajax.debug.verbose.hook(xajax.dom,'xajax.dom.');xajax.debug.verbose.hook(xajax.events,'xajax.events.');xajax.debug.verbose.hook(xajax.forms,'xajax.forms.');xajax.debug.verbose.hook(xajax.js,'xajax.js.');xajax.debug.verbose.hook(xajax.tools,'xajax.tools.');xajax.debug.verbose.hook(xajax.tools.queue,'xajax.tools.queue.');xajax.debug.verbose.hook(xajax.command,'xajax.command.');xajax.debug.verbose.hook(xajax.command.handler,'xajax.command.handler.');xajax.debug.verbose.isLoaded=true;}catch(e){alert(e.name+': '+e.message);}

View File

@@ -0,0 +1,176 @@
/*
File: xajax_verbose.js
The xajax verbose debugging module. This is an optional module, include in
your project with care. :)
Title: xajax verbose debugging module
Please see <copyright.inc.php> for a detailed description, copyright
and license information.
*/
/*
@package xajax
@version $Id: xajax_verbose_uncompressed 327 2007-02-28 16:55:26Z calltoconstruct $
@copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
@copyright Copyright (c) 2008-2009 by Joseph Woolley, Steffen Konerow, Jared White & J. Max Wilson
@license http://www.xajaxproject.org/bsd_license.txt BSD License
*/
try {
if ('undefined' == typeof xajax)
throw { name: 'SequenceError', message: 'Error: xajax core was not detected, verbose module disabled.' }
if ('undefined' == typeof xajax.debug)
throw { name: 'SequenceError', message: 'Error: xajax debugger was not detected, verbose module disabled.' }
/*
Class: xajax.debug.verbose
Provide a high level of detail which can be used to debug hard to find
problems.
*/
xajax.debug.verbose = {}
/*
Function: xajax.debug.verbose.expandObject
Generate a debug message expanding all the first level
members found therein.
Parameters:
obj - (object): The object to be enumerated.
Returns:
string - The textual representation of all the first
level members.
*/
xajax.debug.verbose.expandObject = function(obj) {
var rec = true;
if (1 < arguments.length)
rec = arguments[1];
if ('function' == typeof (obj)) {
return '[Function]';
} else if ('object' == typeof (obj)) {
if (true == rec) {
var t = ' { ';
var separator = '';
for (var m in obj) {
t += separator;
t += m;
t += ': ';
try {
t += xajax.debug.verbose.expandObject(obj[m], false);
} catch (e) {
t += '[n/a]';
}
separator = ', ';
}
t += ' } ';
return t;
} else return '[Object]';
} else return '"' + obj + '"';
}
/*
Function: xajax.debug.verbose.makeFunction
Generate a wrapper function around the specified function.
Parameters:
obj - (object): The object that contains the function to be
wrapped.
name - (string): The name of the function to be wrapped.
Returns:
function - The wrapper function.
*/
xajax.debug.verbose.makeFunction = function(obj, name) {
return function() {
var fun = name;
fun += '(';
var separator = '';
var pLen = arguments.length;
for (var p = 0; p < pLen; ++p) {
fun += separator;
fun += xajax.debug.verbose.expandObject(arguments[p]);
separator = ',';
}
fun += ');';
var msg = '--> ';
msg += fun;
xajax.debug.writeMessage(msg);
var returnValue = true;
var code = 'returnValue = obj(';
separator = '';
for (var p = 0; p < pLen; ++p) {
code += separator;
code += 'arguments[' + p + ']';
separator = ',';
}
code += ');';
eval(code);
msg = '<-- ';
msg += fun;
msg += ' returns ';
msg += xajax.debug.verbose.expandObject(returnValue);
xajax.debug.writeMessage(msg);
return returnValue;
}
}
/*
Function: xajax.debug.verbose.hook
Generate a wrapper function around each of the functions
contained within the specified object.
Parameters:
x - (object): The object to be scanned.
base - (string): The base reference to be prepended to the
generated wrapper functions.
*/
xajax.debug.verbose.hook = function(x, base) {
for (var m in x) {
if ('function' == typeof (x[m])) {
x[m] = xajax.debug.verbose.makeFunction(x[m], base + m);
}
}
}
xajax.debug.verbose.hook(xajax, 'xajax.');
xajax.debug.verbose.hook(xajax.callback, 'xajax.callback.');
xajax.debug.verbose.hook(xajax.css, 'xajax.css.');
xajax.debug.verbose.hook(xajax.dom, 'xajax.dom.');
xajax.debug.verbose.hook(xajax.events, 'xajax.events.');
xajax.debug.verbose.hook(xajax.forms, 'xajax.forms.');
xajax.debug.verbose.hook(xajax.js, 'xajax.js.');
xajax.debug.verbose.hook(xajax.tools, 'xajax.tools.');
xajax.debug.verbose.hook(xajax.tools.queue, 'xajax.tools.queue.');
xajax.debug.verbose.hook(xajax.command, 'xajax.command.');
xajax.debug.verbose.hook(xajax.command.handler, 'xajax.command.handler.');
/*
Boolean: isLoaded
true - indicates that the verbose debugging module is loaded.
*/
xajax.debug.verbose.isLoaded = true;
} catch (e) {
alert(e.name + ': ' + e.message);
}