roojs-doc.js
authorAlan Knowles <alan@roojs.com>
Tue, 25 Oct 2016 09:31:16 +0000 (17:31 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 25 Oct 2016 09:31:16 +0000 (17:31 +0800)
roojs-doc-debug.js

roojs-doc-debug.js
roojs-doc.js

index 6642098..a7458a1 100644 (file)
@@ -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
                                     },
                                     '(',
                                     {
index 30ab3cf..4e3254d 100644 (file)
@@ -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();}});