pjax-min.js revision 84ae7c9d0c9d7a559d93a52393255678b6ac4e55
YUI.add("pjax",function(c){var b="error",a="load";c.Pjax=c.Base.create("pjax",c.Controller,[c.PjaxBase],{routes:[{path:"*",callback:"_defaultRoute"}],initializer:function(){this.publish(b,{defaultFn:this._defCompleteFn});this.publish(a,{defaultFn:this._defCompleteFn});},_defaultRoute:function(d){this._request&&this._request.abort();this._request=c.io(d.url,{context:this,headers:{"X-PJAX":"true"},timeout:this.get("timeout"),on:{end:this._onPjaxIOEnd,failure:this._onPjaxIOFailure,success:this._onPjaxIOSuccess}});},_defCompleteFn:function(g){var d=this.get("container"),f=g.content;if(d&&f.node){d.setContent(f.node);}if(f.title&&c.config.doc){c.config.doc.title=f.title;}},_onPjaxIOEnd:function(){this._request=null;},_onPjaxIOFailure:function(f,d){var e=this.getContent(d.responseText);this.fire(b,{content:e,responseText:d.responseText,status:d.status});},_onPjaxIOSuccess:function(g,e,d){var f=this.getContent(e.responseText);this.fire(a,{content:f,responseText:e.responseText,status:e.status});}},{ATTRS:{container:{value:null,setter:function(d){return d?c.one(d):null;}},timeout:{value:30000}}});},"@VERSION@",{requires:["pjax-base","io-base"]});