Lively Kernel canvas
* MIT license
*
* Includes enhancements by Scott Trenda
* and Kris Kowal
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.]]> 99 ? Math.round(L / 10) : L),
]]> 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs]]> 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
};
return mask.replace(token, function ($0) {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
};
}();
// Some common format strings
dateFormat.masks = {
"default": ]]>
Draft-OData40true
savefalsenulltruenull
Wikicontroltruetrue
createLayer('Microsoft2LKLayer');layerClass(Microsoft2LKLayer,Sys.Net.XMLHttpExecutor,{executeRequest:function(proceed){/***somehoworiginalcodefollowing*/if(arguments.length!==1)throwError.parameterCount();varrequest=this.get_webRequest();this._webRequest=request;if(this._started){throwError.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted,'executeRequest'));}if(!this._webRequest){throwError.invalidOperation(Sys.Res.nullWebRequest);}varbody=request.get_body();varheaders=request.get_headers();//varxhr=newXMLHttpRequest();//this._xmlHttpRequest=xhr;//xhr.onreadystatechange=this._onReadyStateChange;varverb=request.get_httpVerb();//xhr.open(verb,request.getResolvedUrl(),true/*async*/);varreq=newWebResource(newURL(request.getResolvedUrl()));//.beAsync();//xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");if(headers){//for(varheaderinheaders){//varval=headers[header];//if(typeof(val)!=="function")//xhr.setRequestHeader(header,val);//}req.setRequestHeaders(headers);}if(verb.toLowerCase()==="post"){if((headers===null)||!headers['Content-Type']){//xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded;charset=utf-8');req.setRequestHeaders({'Content-Type':'application/x-www-form-urlencoded;charset=utf-8'});}if(!body){body="";}}vartimeout=request.get_timeout();if(timeout>0){this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),timeout);}//xhr.send(body);if(verb.toLowerCase()==="post"||verb.toLowerCase()==="put")req[verb.toLowerCase()](body);elsereq[verb.toLowerCase()]();this._started=true;/***donewithoriginalcode*///fakeXMLHttpRequestobjectthis._xmlHttpRequest={readyState:4,status:200,getResponseHeader:function(header){returnreq.responseHeaders[header];},responseText:req.content,responseXML:req.contentDocument};this._onReadyStateChange();},}); 0) {\n this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout);\n }\n // xhr.send(body);\n\t\tif (verb.toLowerCase() === \"post\" || verb.toLowerCase() === \"put\")\n\t\t\treq[verb.toLowerCase()](body);\n\t\telse\n\t\t\treq[verb.toLowerCase()]();\n\n this._started = true;\n\n\t\t/*\n\t\t** done with original code\n\t\t*/\n\n\t\t// fake XMLHttpRequest object\n\t\tthis._xmlHttpRequest = { readyState: 4, status: 200, getResponseHeader: function(header) { return req.responseHeaders[header]; }, responseText: req.content, responseXML: req.contentDocument };\n\n\t\tthis._onReadyStateChange();\n\t},\n});"]]> 0) {\n this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout);\n }\n // xhr.send(body);\n\t\tif (verb.toLowerCase() === \"post\" || verb.toLowerCase() === \"put\")\n\t\t\treq[verb.toLowerCase()](body);\n\t\telse\n\t\t\treq[verb.toLowerCase()]();\n\n this._started = true;\n\n\t\t/*\n\t\t** done with original code\n\t\t*/\n\n\t\t// fake XMLHttpRequest object\n\t\tthis._xmlHttpRequest = { readyState: 4, status: 200, getResponseHeader: function(header) { return req.responseHeaders[header]; }, responseText: req.content, responseXML: req.contentDocument };\n\n\t\tthis._onReadyStateChange();\n\t},\n});\n\n/*\nwithLayers([Microsoft2LKLayer, NetRequestWithHeadersLayer], function() {\n//\texampleService.query(\"/Categories(1)\", cbSuccess, cbFailure);\n\texampleService.query(\"/\", cbSuccess, cbFailure);\n});\n*/"]]>72truetruefalse
truetrue
false10.11
true
false
true
nullfalsetruenull
MicrosoftLibLayeringfalsenulltruefalse
Xfalsenulltrue
false
false
–falsenulltrue
false
falsenullfalsefalsenullnullnullnullfalse
//hastobeexecutedtogetthingsstarted:Sys.loader.basePath=URL.codeBase.withFilename('odata').toString()Sys.require([Sys.components.dataView,Sys.components.openDataContext,Sys.components.openDataServiceProxy]);queryObj={};errorObj={};cbSuccess=function(result,context,operation){console.log('Success:'+result);queryObj=result;}cbFailure=function(error,context,operation){console.log('Error:'+error);errorObj=error;}exampleService=newSys.Data.OpenDataServiceProxy('http://services.odata.org/Northwind/Northwind.svc');/*withLayers([Microsoft2LKLayer],function(){//exampleService.query("/Categories(1)",cbSuccess,cbFailure);exampleService.query("/",cbSuccess,cbFailure);});*/truetruefalse
truetrue
false00.11
true
falsenull
true
nullfalsetruenull
ODataexperimentsfalsenulltruefalse
Xfalsenulltrue
false
false
–falsenulltrue
false
falsenullfalsefalsenullnullnullnullfalse
null231