Roo.doc.Entry = function(config){
Roo.doc.Entry.superclass.constructor.call(this, config);
//this.el = Roo.get(document.body);
+ /*
var body = Roo.get(document.body);
body.attr({
leftmargin : 0,
this.onRender(body);
this.el = body;
//this.onRender = function() { };
+ */
};
-Roo.doc.Entry._calls = 0;
+//Roo.doc.Entry._calls = 0;
Roo.extend(Roo.doc.Entry, Roo.bootstrap.Component, {
]
};
-
-
return cfg;
},
addxtype : function (tree, cntr)
{
return this.addxtypeChild(tree,cntr);
- },
-
+ }
+ /*
onRender : function(ct, position)
{
Roo.bootstrap.Component.prototype.onRender.call(this, ct, position);
}
+ */
});
lang: 'php',
code : '',
output : '',
+ outputlang : 'txt',
getAutoCreate : function(){
// no colour highlighting in here....
- var code = hljs ? hljs.highlight(this.lang.toUpperCase(),this.code) : String.format('{0}',this.code).replace(/\n/g, '<br/>');
+ var code = hljs ? hljs.highlight(this.lang,this.code).value :
+ String.format('{0}',this.code).replace(/\n/g, '<br/>');
var cfg ={
};
if (this.output) {
+
+ var out = hljs ? hljs.highlight(this.outputlang,this.output).value :
+ String.format('{0}',this.output).replace(/\n/g, '<br/>');
cfg.cn.push(
{
cls : 'panel-footer',
cn : {
- tag: 'code',
- html : String.format('{0}',this.output).replace(/\n/g, '<br/>')
+ tag: 'pre',
+ html : out
}
}
- );
+ );
}
getAutoCreate : function(){
-
+ var syn = Roo.factory(this.parent().items[0]);
var cfg ={
cn : []
};
// might not have any..
- var params = this.parent().items[0].items;
+ var params = syn.items;
for (var i =0; i < params.length;i++) {
ul.cn.push( Roo.factory(params[i]).getAutoCreateParamSection() )
}
cfg.cn.push(ul);
}
-
+ if (this.stype == 'return' && syn.returndesc.length) {
+
+ cfg.cn.push({
+ tag: 'p',
+ cls : 'para',
+ cn : [
+
+ {
+ tag: 'code',
+ cls: 'parameter',
+ html : syn.returntype
+ },
+ syn.returndesc
+ ]
+
+ });
+ }
return cfg;
},
if (this.stype == 'parameter') {
return this.el.select('.roo-params',true).first();
}
+
return this.el;
}
* @extends Roo.bootstrap.Component
* Synopsis Element class
* @cfg {String} returntype return value
+ * @cfg {String} returndesc description of return value. (used in the return section if set..)
* @cfg {String} name title really..
* @cfg {String} stype (function|constant)
* @cfg {String} memberof class name
memberof : '',
is_static : false,
returntype : '',
+ returndesc : '',
name: '',
stype: 'function',
getAutoCreate : function(){
var syn = this.items[0]; // hopefully...
- Roo.log(this.items);
+
+
+
+ var nmp = (this.is_static ? '' : '$') +
+ this.memberof +
+ (this.is_static ? '::' : '->');
+
+
+ // this should probably do the params....?? then we need to disable the rendering..
var cfg ={
tag:'code',
cls : 'funcprototype',
cn: [
- this.returntype + ' ',
+ this.returntype + ' ' + nmp,
{
tag: 'strong',
cls : this.stype,