* @extends Roo.bootstrap.Component
* Example Element class
* @cfg {String} title short title describing example
- * @cfg {String} lang (phpcode|programlisting) section type.
+ * @cfg {String} lang (php|txt|sql) section type.
* @cfg {String} code example code
* @cfg {String} output The expected output from the code
*
cn : [
{
tag: 'pre',
- cls : this.lang,
+ cls : 'lang-' + this.lang,
html : String.format('{0}',this.code).replace(/\n/g, '<br/>')
}
]
);
// Roo/doc/Example.js
Roo.doc.Example=function(A){Roo.doc.Example.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Example,Roo.bootstrap.Component,{title:'',lang:'php',code:'',output:'',getAutoCreate:function(){var A={cls:'panel panel-info',cn:[{cls:'panel-heading',html:this.title}
-,{cls:'panel-body',cn:[{tag:'pre',cls:this.lang,html:String.format('{0}',this.code).replace(/\n/g,'<br/>')}]}]};if(this.output){A.cn.push({cls:'panel-footer',cn:{tag:'code',html:String.format('{0}',this.output).replace(/\n/g,'<br/>')}});}return A;}});
+,{cls:'panel-body',cn:[{tag:'pre',cls:'lang-'+this.lang,html:String.format('{0}',this.code).replace(/\n/g,'<br/>')}]}]};if(this.output){A.cn.push({cls:'panel-footer',cn:{tag:'code',html:String.format('{0}',this.output).replace(/\n/g,'<br/>')}});}return A;
+}});
// Roo/doc/Para.js
Roo.doc.Para=function(A){Roo.doc.Para.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Para,Roo.bootstrap.Component,{html:'',getAutoCreate:function(){var A={tag:'p',cls:'para',html:this.html};if(this.parent().is_list){return {tag:'li',cls:listitme,cn:[A]}
;}return A;}});