~cdparra/gelee/trunk

« back to all changes in this revision

Viewing changes to webui/ecosystem/extjs/build/state/CookieProvider-min.js

  • Committer: parra
  • Date: 2010-03-15 02:39:02 UTC
  • Revision ID: svn-v4:ac5bba68-f036-4e09-846e-8f32731cc928:trunk/gelee:1433
merged gelee at svn

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Ext JS Library 3.0 RC2
 
3
 * Copyright(c) 2006-2009, Ext JS, LLC.
 
4
 * licensing@extjs.com
 
5
 * 
 
6
 * http://extjs.com/license
 
7
 */
 
8
 
 
9
 
 
10
Ext.state.CookieProvider=function(config){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Ext.apply(this,config);this.state=this.readCookies();};Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(name,value){if(typeof value=="undefined"||value===null){this.clear(name);return;}
 
11
this.setCookie(name,value);Ext.state.CookieProvider.superclass.set.call(this,name,value);},clear:function(name){this.clearCookie(name);Ext.state.CookieProvider.superclass.clear.call(this,name);},readCookies:function(){var cookies={};var c=document.cookie+";";var re=/\s?(.*?)=(.*?);/g;var matches;while((matches=re.exec(c))!=null){var name=matches[1];var value=matches[2];if(name&&name.substring(0,3)=="ys-"){cookies[name.substr(3)]=this.decodeValue(value);}}
 
12
return cookies;},setCookie:function(name,value){document.cookie="ys-"+name+"="+this.encodeValue(value)+
 
13
((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+
 
14
((this.path==null)?"":("; path="+this.path))+
 
15
((this.domain==null)?"":("; domain="+this.domain))+
 
16
((this.secure==true)?"; secure":"");},clearCookie:function(name){document.cookie="ys-"+name+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+
 
17
((this.path==null)?"":("; path="+this.path))+
 
18
((this.domain==null)?"":("; domain="+this.domain))+
 
19
((this.secure==true)?"; secure":"");}});
 
 
b'\\ No newline at end of file'