marginheight : 0,
offset : 0
});
- Roo.doc.Entry._calls++;
- if (Roo.doc.Entry._calls > 1) {
- throw "test";
- }
+
+
// call onRender once... and block next call...?
this.onRender(body);
- this.onRender = function() { };
+ this.el = body;
+ //this.onRender = function() { };
};
addxtype : function (tree, cntr)
{
return this.addxtypeChild(tree,cntr);
- }
-
+ },
+ onRender : function(ct, position)
+ {
+
+ Roo.doc.Entry._calls++;
+ if (Roo.doc.Entry._calls > 1 || !ct) {
+ return;
+ }
+
+ // call onRender once... and block next call...?
+ Roo.bootstrap.Component.prototype.onRender.call(this, ct, position);
+ }
});
var cfg ={
tag: 'span',
cn : [
- is_optional ? '[' : '',
+ this.is_optional ? '[' : '',
this.type,
' ',
- this.name,
+ {
+ tag : 'b',
+ html : this.name
+ },
this.defaultvalue == '' ? '' : ' = ',
this.defaultvalue,
+ this.is_optional ? ']' : '',
',' // not really.. but let's do it anyway...
]
};
return cfg;
+ },
+ getAutoCreateParamSection : function()
+ {
+ return {
+ tag : 'li',
+ cn : [
+ {
+ tag : 'p',
+ cls: 'para',
+ cn : [
+ {
+ tag: 'code',
+ html : this.type + ' ' + this.name
+ },
+ this.desc
+ ]
+ }
+ ]
+ };
+
+
}
+
getAutoCreate : function(){
+
+
+
var cfg ={
cls : 'refsection',
{
tag: 'h1',
cls : 'title',
- html : this.stype.charAt(0).toUpperCase() + this.stype.slice(1) //ucfirst
+ html : Roo.doc.Section.map[this.stype]
}
]
};
if (this.stype == 'parameter') {
// db package uses variable list here... - it results in dd/dl but the layout is messed up..
- cfg.cn.push({
+
+ var ul = {
tag: 'ul',
- cls: 'itemizedlist roo-params'
- });
+ cls: 'itemizedlist roo-params',
+ cn : []
+ };
+ // might not have any..
+ var params = this.parent().items[0].items;
+ for (var i =0; i < params.length;i++) {
+ ul.cn.push( Roo.factory(params[i]).getAutoCreateParamSection() )
+ }
+
+
+ cfg.cn.push(ul);
}
});
-
- /*
+Roo.doc.Section.map = {
+ 'desc' : 'Description',
+ 'parameter' : 'Parameters',
+ 'return' : 'Return Value',
+ 'note' : 'Notes',
+ 'example' : 'Examples'
+}
+/*
* - LGPL
*
*/
{
tag: 'span',
cls : 'roo-params'
- }
+ },
+ ')'
]
}