From 8f135c02914ed1eccbd82f8721dbb6fbc8860406 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 9 Sep 2016 14:37:44 +0800 Subject: [PATCH] roojs-doc.js roojs-doc-debug.js --- roojs-doc-debug.js | 4 ++-- roojs-doc.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index 736f7a23c2..ec7f748568 100644 --- a/roojs-doc-debug.js +++ b/roojs-doc-debug.js @@ -102,7 +102,7 @@ Roo.extend(Roo.doc.Entry, Roo.bootstrap.Component, { * @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 * @@ -139,7 +139,7 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component, { cn : [ { tag: 'pre', - cls : this.lang, + cls : 'lang-' + this.lang, html : String.format('{0}',this.code).replace(/\n/g, '
') } ] diff --git a/roojs-doc.js b/roojs-doc.js index 36b55d6c41..da72697385 100644 --- a/roojs-doc.js +++ b/roojs-doc.js @@ -4,7 +4,8 @@ Roo.doc=Roo.doc||{};Roo.doc.Entry=function(A){Roo.doc.Entry.superclass.construct ); // 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,'
')}]}]};if(this.output){A.cn.push({cls:'panel-footer',cn:{tag:'code',html:String.format('{0}',this.output).replace(/\n/g,'
')}});}return A;}}); +,{cls:'panel-body',cn:[{tag:'pre',cls:'lang-'+this.lang,html:String.format('{0}',this.code).replace(/\n/g,'
')}]}]};if(this.output){A.cn.push({cls:'panel-footer',cn:{tag:'code',html:String.format('{0}',this.output).replace(/\n/g,'
')}});}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;}}); -- 2.39.2