summaryrefslogtreecommitdiff
path: root/js/dojo/dojox/dtl/Inline.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo/dojox/dtl/Inline.js')
-rw-r--r--js/dojo/dojox/dtl/Inline.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/js/dojo/dojox/dtl/Inline.js b/js/dojo/dojox/dtl/Inline.js
new file mode 100644
index 0000000..56b1d05
--- /dev/null
+++ b/js/dojo/dojox/dtl/Inline.js
@@ -0,0 +1,41 @@
+//>>built
+define("dojox/dtl/Inline", [
+ "dojo/_base/lang",
+ "./_base",
+ "dijit/_WidgetBase",
+ "dojo/query" // dojo.query
+], function(lang,dd,Widget,Query){
+ /*=====
+ Widget = dijit._WidgetBase;
+ Query = dojo.query;
+ dd = dojox.dtl;
+ =====*/
+ dd.Inline = lang.extend(function(args, node){
+ this.create(args, node);
+ },
+ Widget.prototype,
+ {
+ context: null,
+ render: function(/*Object|dojox.dtl.Context?*/ context){
+ this.context = context || this.context;
+ this.postMixInProperties();
+ Query("*", this.domNode).orphan();
+ this.domNode.innerHTML = this.template.render(this.context);
+ },
+ declaredClass: "dojox.dtl.Inline",
+ buildRendering: function(){
+ var div = this.domNode = document.createElement("div");
+ var node = this.srcNodeRef;
+ if(node.parentNode){
+ node.parentNode.replaceChild(div, node);
+ }
+
+ this.template = new dd.Template(lang.trim(node.text), true);
+ this.render();
+ },
+ postMixInProperties: function(){
+ this.context = (this.context.get === dd._Context.prototype.get) ? this.context : new dd._Context(this.context);
+ }
+ });
+ return dojox.dtl.Inline;
+}); \ No newline at end of file