X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/pkgs/state.js diff --git a/pkgs/state.js b/pkgs/state.js new file mode 100644 index 00000000..f50e9ed5 --- /dev/null +++ b/pkgs/state.js @@ -0,0 +1,7 @@ +/* + * Ext JS Library 3.0.0 + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ +Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(a){var k=/^(a|n|d|b|s|o)\:(.*)$/;var c=k.exec(unescape(a));if(!c||!c[1]){return}var f=c[1];var h=c[2];switch(f){case"n":return parseFloat(h);case"d":return new Date(Date.parse(h));case"b":return(h=="1");case"a":var g=[];var j=h.split("^");for(var b=0,d=j.length;b