From 5078936c0e0408f7ee2bf03b59737afb7e0a1d01 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 25 Oct 2016 17:31:16 +0800 Subject: [PATCH] roojs-doc.js roojs-doc-debug.js --- roojs-doc-debug.js | 14 +++++++++++--- roojs-doc.js | 6 +++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index 6642098167..a7458a1800 100644 --- a/roojs-doc-debug.js +++ b/roojs-doc-debug.js @@ -491,6 +491,7 @@ Roo.doc.Section.map = { * @cfg {String} stype (function|constant) * @cfg {String} memberof class name * @cfg {bool} is_static is a static member + * @cfg {bool} is_constructor is a static member * * @constructor * Create a new Synopsis @@ -509,7 +510,8 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component, { returndesc : '', name: '', stype: 'function', - + is_constructor : false, + getAutoCreate : function(){ var syn = this.items[0]; // hopefully... @@ -520,9 +522,15 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component, { this.memberof + (this.is_static ? '::' : '->'); - + var nm = this.name; // this should probably do the params....?? then we need to disable the rendering.. + if (this.is_constructor) { + + nm = this.memberof; + nmp = 'new '; + } + var cfg ={ tag: 'h5', @@ -541,7 +549,7 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component, { { tag: 'strong', cls : this.stype, - html : this.name + html : nm }, '(', { diff --git a/roojs-doc.js b/roojs-doc.js index 30ab3cf66b..4e3254d7f4 100644 --- a/roojs-doc.js +++ b/roojs-doc.js @@ -18,9 +18,9 @@ Roo.doc.Section=function(A){Roo.doc.Section.superclass.constructor.call(this,A); ,A.returndesc]});}return B;},getChildContainer:function(A){if(this.stype=='parameter'){return this.el.select('.roo-params',true).first();}return this.el;}});Roo.doc.Section.map={'desc':'Description','parameter':'Parameters','return':'Return Value','note':'Notes','example':'Examples'}; // Roo/doc/Synopsis.js -Roo.doc.Synopsis=function(A){Roo.doc.Synopsis.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Synopsis,Roo.bootstrap.Component,{memberof:'',is_static:false,returntype:'',returndesc:'',name:'',stype:'function',getAutoCreate:function(){var A=this.items[0]; -var B=(this.is_static?'':'$')+this.memberof+(this.is_static?'::':'->');var C={tag:'h5',cls:'refsynopsisdiv',cn:[{cls:'funcsynopsis',cn:[{tag:'p',cn:{tag:'code',cls:'funcprototype',cn:[this.returntype+' '+B,{tag:'strong',cls:this.stype,html:this.name},'(',{tag:'span',cls:'roo-params'} -,')']}}]}]};return C;},getChildContainer:function(A){return this.el.select('.roo-params',true).first();}}); +Roo.doc.Synopsis=function(A){Roo.doc.Synopsis.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Synopsis,Roo.bootstrap.Component,{memberof:'',is_static:false,returntype:'',returndesc:'',name:'',stype:'function',is_constructor:false,getAutoCreate:function(){var A=this.items[0]; +var B=(this.is_static?'':'$')+this.memberof+(this.is_static?'::':'->');var nm=this.name;if(this.is_constructor){nm=this.memberof;B='new ';}var C={tag:'h5',cls:'refsynopsisdiv',cn:[{cls:'funcsynopsis',cn:[{tag:'p',cn:{tag:'code',cls:'funcprototype',cn:[this.returntype+' '+B,{tag:'strong',cls:this.stype,html:nm} +,'(',{tag:'span',cls:'roo-params'},')']}}]}]};return C;},getChildContainer:function(A){return this.el.select('.roo-params',true).first();}}); // Roo/doc/NavCategory.js Roo.doc.NavCategory=function(A){Roo.doc.Para.superclass.constructor.call(this,A);Roo.doc.NavCategory.registry[this.name]=this;};Roo.doc.NavCategory.registry={};Roo.extend(Roo.doc.NavCategory,Roo.bootstrap.Component,{title:'',name:'',getAutoCreate:function(){var A={cn:[{tag:'a',cls:'roo-nav-category',href:'#'+this.name,html:this.title} ,{cls:'container roo-child-ctr'}]};return A;},getChildContainer:function(){return this.el.select('.roo-child-ctr',true).first();}}); -- 2.39.2