annotate inkscape/firefox/content/jqSOAPClient.pack.js @ 601:8863d23cea4b openvg

Load images with Imlib2. Image loader, now, use Imlib2 to load images into ARGB 32bits pixels. It can load png, jpg, bmp, tiff, ...., etc.
author Thinker K.F. Li <thinker@branda.to>
date Fri, 02 Jul 2010 11:59:17 +0800
parents 63aaf96209cd
children
rev   line source
272
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
1 /*
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
2 This program is free software: you can redistribute it and/or modify
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
3 it under the terms of the GNU General Public License as published by
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
4 the Free Software Foundation, either version 3 of the License, or
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
5 (at your option) any later version.
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
6
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
7 This program is distributed in the hope that it will be useful,
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
10 GNU General Public License for more details.
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
11
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
12 You should have received a copy of the GNU General Public License
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
14 */
01439f28d0bd Check-in primitive integrated madbuilder code.
wycc
parents:
diff changeset
15 var SOAPClient={Proxy:"",SOAPServer:"",ContentType:"text/xml",CharSet:"utf-8",ResponseXML:null,ResponseText:"",Status:0,ContentLength:0,Namespace:function(a,b){return{"name":a,"uri":b}},SendRequest:function(c,d){if(!!SOAPClient.Proxy){SOAPClient.ResponseText="";SOAPClient.ResponseXML=null;SOAPClient.Status=0;var e=c.toString();SOAPClient.ContentLength=e.length;function getResponse(a){if(!!d){SOAPClient.Status=a.status;SOAPClient.ResponseText=a.responseText;SOAPClient.ResponseXML=a.responseXML;var b=$.xmlToJSON(a.responseXML);d(b)}}$.ajax({type:"POST",url:SOAPClient.Proxy,dataType:"xml",processData:false,data:e,complete:getResponse,contentType:SOAPClient.ContentType+"; charset=\""+SOAPClient.CharSet+"\"",beforeSend:function(a){a.setRequestHeader("Method","POST");a.setRequestHeader("Content-Length",SOAPClient.ContentLength);a.setRequestHeader("SOAPServer",SOAPClient.SOAPServer);a.setRequestHeader("SOAPAction",c.Action)}})}},ToXML:function(a){var b=[];var c=false;try{if(!!a&&typeof(a)==="object"&&a.typeOf==="SOAPObject"){if(!!a.ns){if(typeof(a.ns)==="object"){c=true;b.push("<"+a.ns.name+":"+a.name);b.push(" xmlns:"+a.ns.name+"=\""+a.ns.uri+"\"")}else{b.push("<"+a.name);b.push(" xmlns=\""+a.ns+"\"")}}else{b.push("<"+a.name)}if(a.attributes.length>0){var d;var f=a.attributes.length-1;do{d=a.attributes[f];if(c){b.push(" "+a.ns.name+":"+d.name+"=\""+d.value+"\"")}else{b.push(" "+d.name+"=\""+d.value+"\"")}}while(f--)}b.push(">");if(a.hasChildren()){var g,cObj;for(g in a.children){cObj=a.children[g];if(typeof(cObj)==="object"){b.push(SOAPClient.ToXML(cObj))}}}if(!!a.value){b.push(a.value)}if(c){b.push("</"+a.ns.name+":"+a.name+">")}else{b.push("</"+a.name+">")}return b.join("")}}catch(e){alert("Unable to process SOAPObject! Object must be an instance of SOAPObject")}}};var SOAPRequest=function(g,h){this.Action=g;var i=[];var j=[];var k=(!!h)?[h]:[];this.addNamespace=function(a,b){i.push(new SOAPClient.Namespace(a,b))};this.addHeader=function(a){j.push(a)};this.addBody=function(a){k.push(a)};this.toString=function(){var a=new SOAPObject("soapenv:Envelope");a.attr("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");if(i.length>0){var b,tNo;for(b in i){if(!i.hasOwnProperty||i.hasOwnProperty(b)){tNo=i[b];if(typeof(tNo)==="object"){a.attr("xmlns:"+tNo.name,tNo.uri)}}}}if(j.length>0){var c=a.appendChild(new SOAPObject("soapenv:Header"));var d;for(d in j){if(!j.hasOwnProperty||j.hasOwnProperty(d)){c.appendChild(j[d])}}}if(k.length>0){var e=a.appendChild(new SOAPObject("soapenv:Body"));var f;for(f in k){if(!k.hasOwnProperty||k.hasOwnProperty(f)){e.appendChild(k[f])}}}return a.toString()}};var SOAPObject=function(c){this.typeOf="SOAPObject";this.ns=null;this.name=c;this.attributes=[];this.children=[];this.value=null;this.attr=function(a,b){this.attributes.push({"name":a,"value":b});return this};this.appendChild=function(a){this.children.push(a);return a};this.hasChildren=function(){return(this.children.length>0)?true:false};this.val=function(v){if(!v){return this.value}else{this.value=v;return this}};this.toString=function(){return SOAPClient.ToXML(this)}};