daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // DataGrid
  2. //$this->view->headScript()->appendFile('/js/venice/state/SessionProvider.js');
  3. $this->view->headScript()->appendScript('
  4.     Ext.state.SessionProvider = Ext.extend(Ext.state.CookieProvider, {
  5.         readCookies : function(){
  6.             if(this.state){
  7.                 for(var k in this.state){
  8.                     if(typeof this.state[k] == "string"){
  9.                         this.state[k] = this.decodeValue(this.state[k]);
  10.                     }
  11.                 }
  12.             }
  13.             return Ext.apply(this.state || {}, Ext.state.SessionProvider.superclass.readCookies.call(this));
  14.         },
  15.        
  16.         setCookie : function(name, value){
  17.             document.cookie = "ys-"+ name + "=" + this.encodeValue(value) +
  18.                ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) +
  19.                "; path='.$this->_request->getRequestUri().'" +
  20.                ((this.domain == null) ? "" : ("; domain=" + this.domain)) +
  21.                ((this.secure == true) ? "; secure" : "");
  22.         }
  23.     });
  24. ');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top