root / trunk / web / dojo / dojox / dtl / Inline.js
History | View | Annotate | Download (1.07 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.dtl.Inline"]){ |
||
9 | dojo._hasResource["dojox.dtl.Inline"]=true; |
||
10 | dojo.provide("dojox.dtl.Inline");
|
||
11 | dojo.require("dojox.dtl._base");
|
||
12 | dojo.require("dijit._Widget");
|
||
13 | dojox.dtl.Inline=dojo.extend(function(_1,_2){
|
||
14 | this.create(_1,_2);
|
||
15 | },dijit._Widget.prototype,{context:null,render:function(_3){ |
||
16 | this.context=_3||this.context; |
||
17 | this.postMixInProperties();
|
||
18 | dojo.query("*",this.domNode).orphan(); |
||
19 | this.domNode.innerHTML=this.template.render(this.context); |
||
20 | },declaredClass:"dojox.dtl.Inline",buildRendering:function(){ |
||
21 | var _4=this.domNode=document.createElement("div"); |
||
22 | var _5=this.srcNodeRef; |
||
23 | if(_5.parentNode){
|
||
24 | _5.parentNode.replaceChild(_4,_5); |
||
25 | } |
||
26 | this.template=new dojox.dtl.Template(dojo.trim(_5.text),true); |
||
27 | this.render();
|
||
28 | },postMixInProperties:function(){ |
||
29 | this.context=(this.context.get===dojox.dtl._Context.prototype.get)?this.context:new dojox.dtl._Context(this.context); |
||
30 | }}); |
||
31 | } |