root / trunk / web / dojo / dojox / layout / ContentPane.js @ 12
History | View | Annotate | Download (1.43 KB)
1 | 9 | andrej.cim | /*
|
---|---|---|---|
2 | Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
||
3 | Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||
4 | see: http://dojotoolkit.org/license for details
|
||
5 | */
|
||
6 | |||
7 | |||
8 | if(!dojo._hasResource["dojox.layout.ContentPane"]){ |
||
9 | dojo._hasResource["dojox.layout.ContentPane"]=true; |
||
10 | dojo.provide("dojox.layout.ContentPane");
|
||
11 | dojo.require("dijit.layout.ContentPane");
|
||
12 | dojo.require("dojox.html._base");
|
||
13 | dojo.declare("dojox.layout.ContentPane",dijit.layout.ContentPane,{adjustPaths:false,cleanContent:false,renderStyles:false,executeScripts:true,scriptHasHooks:false,constructor:function(){ |
||
14 | this.ioArgs={};
|
||
15 | this.ioMethod=dojo.xhrGet;
|
||
16 | },onExecError:function(e){ |
||
17 | },_setContent:function(_1){ |
||
18 | var _2=this._contentSetter; |
||
19 | if(!(_2&&_2 instanceof dojox.html._ContentSetter)){ |
||
20 | _2=this._contentSetter=new dojox.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){ |
||
21 | var _3=this.onContentError(e); |
||
22 | try{
|
||
23 | this.containerNode.innerHTML=_3;
|
||
24 | } |
||
25 | catch(e){
|
||
26 | console.error("Fatal "+this.id+" could not change content due to "+e.message,e); |
||
27 | } |
||
28 | })}); |
||
29 | } |
||
30 | this._contentSetterParams={adjustPaths:Boolean(this.adjustPaths&&(this.href||this.referencePath)),referencePath:this.href||this.referencePath,renderStyles:this.renderStyles,executeScripts:this.executeScripts,scriptHasHooks:this.scriptHasHooks,scriptHookReplacement:"dijit.byId('"+this.id+"')"}; |
||
31 | this.inherited("_setContent",arguments); |
||
32 | }}); |
||
33 | } |