From 2f01fe57a8d37767827d6db42850aef86a767c53 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Nov 2010 10:39:52 +0300 Subject: add dijit/dojo stuff; initial ui mockup --- lib/dojo/cache.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 lib/dojo/cache.js (limited to 'lib/dojo/cache.js') diff --git a/lib/dojo/cache.js b/lib/dojo/cache.js new file mode 100644 index 000000000..4c2d233da --- /dev/null +++ b/lib/dojo/cache.js @@ -0,0 +1,54 @@ +/* + Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dojo.cache"]){ +dojo._hasResource["dojo.cache"]=true; +dojo.provide("dojo.cache"); +(function(){ +var _1={}; +dojo.cache=function(_2,_3,_4){ +if(typeof _2=="string"){ +var _5=dojo.moduleUrl(_2,_3); +}else{ +_5=_2; +_4=_3; +} +var _6=_5.toString(); +var _7=_4; +if(_4!=undefined&&!dojo.isString(_4)){ +_7=("value" in _4?_4.value:undefined); +} +var _8=_4&&_4.sanitize?true:false; +if(typeof _7=="string"){ +_7=_1[_6]=_8?dojo.cache._sanitize(_7):_7; +}else{ +if(_7===null){ +delete _1[_6]; +}else{ +if(!(_6 in _1)){ +_7=dojo._getText(_6); +_1[_6]=_8?dojo.cache._sanitize(_7):_7; +} +_7=_1[_6]; +} +} +return _7; +}; +dojo.cache._sanitize=function(_9){ +if(_9){ +_9=_9.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""); +var _a=_9.match(/]*>\s*([\s\S]+)\s*<\/body>/im); +if(_a){ +_9=_a[1]; +} +}else{ +_9=""; +} +return _9; +}; +})(); +} -- cgit v1.2.3