Last change
on this file since 532 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
998 bytes
|
Line | |
---|
1 | define([ |
---|
2 | "dojo/_base/lang", |
---|
3 | "./_base", |
---|
4 | "dijit/_WidgetBase", |
---|
5 | "dojo/query" // dojo.query |
---|
6 | ], function(lang,dd,Widget,Query){ |
---|
7 | |
---|
8 | return dd.Inline = lang.extend(function(args, node){ |
---|
9 | this.create(args, node); |
---|
10 | }, |
---|
11 | Widget.prototype, |
---|
12 | { |
---|
13 | context: null, |
---|
14 | render: function(/*Object|dojox/dtl/Context?*/ context){ |
---|
15 | this.context = context || this.context; |
---|
16 | this.postMixInProperties(); |
---|
17 | Query("*", this.domNode).orphan(); |
---|
18 | this.domNode.innerHTML = this.template.render(this.context); |
---|
19 | }, |
---|
20 | declaredClass: "dojox.dtl.Inline", |
---|
21 | buildRendering: function(){ |
---|
22 | var div = this.domNode = document.createElement("div"); |
---|
23 | var node = this.srcNodeRef; |
---|
24 | if(node.parentNode){ |
---|
25 | node.parentNode.replaceChild(div, node); |
---|
26 | } |
---|
27 | |
---|
28 | this.template = new dd.Template(lang.trim(node.text), true); |
---|
29 | this.render(); |
---|
30 | }, |
---|
31 | postMixInProperties: function(){ |
---|
32 | this.context = (this.context.get === dd._Context.prototype.get) ? this.context : new dd._Context(this.context); |
---|
33 | } |
---|
34 | }); |
---|
35 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.