Skip to content

Instantly share code, notes, and snippets.

@aghuddleston
Last active December 16, 2015 01:49
Show Gist options
  • Save aghuddleston/5357657 to your computer and use it in GitHub Desktop.
Save aghuddleston/5357657 to your computer and use it in GitHub Desktop.
Ext.ux.state.SessVarProvider is an Ext JS 4 state provider for Thomas Frank's JavaScript session variables storage.
/**
* @class Ext.ux.state.SessVarsProvider
* @extends Ext.state.Provider
* Session state provider that stores state information on the client side
* for the length of the session. Important - sessvars.js must be included
* in the page. http://www.thomasfrank.se/sessionvars.html
* @depends sessvars.js
*/
Ext.define('Ext.ux.state.SessVarsProvider', {
extend: 'Ext.state.Provider',
constructor : function(config){
var me = this;
Ext.apply(me, config);
me.callParent(arguments);
me.state = sessvars;
},
/**
* Clear out all the remembered state values
*/
clearAll : function(){
sessvars.$.clearMem();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment