From 6a440ac275b620b206ea888eb7568c67cacb79e2 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 14 Oct 2016 10:07:34 +0800 Subject: [PATCH] roojs-doc.js roojs-doc-debug.js --- roojs-doc-debug.js | 66 ++++++++++++++++++++++++++++++++++++++++++++++ roojs-doc.js | 3 +++ 2 files changed, 69 insertions(+) diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index cef952b3a1..cdcac0f380 100644 --- a/roojs-doc-debug.js +++ b/roojs-doc-debug.js @@ -569,6 +569,72 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component, { +}); + + + + /* + * - LGPL + * + */ + +/** + * @class Roo.doc.NavCategory + * @extends Roo.bootstrap.Component + * Navigation Category class + * @cfg {string} title + * @cfg {string} name + * + * Represent's an category on the left menu. + * - phpdoc @category elements map the pages to the categories + * this should be on the left side of the menu, when the + * contents are loaded, then it can expand this out, and add links + * for each of the methods. + * + * + * + * @constructor + * Create a new Navigation Category + * @param {Object} config The config object + */ + +Roo.doc.NavCategory = function(config){ + Roo.doc.Para.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.doc.NavCategory, Roo.bootstrap.Component, { + + title : '', + name : '', + getAutoCreate : function(){ + + //?? this is the synopsis type.... + + // this is not very fancy... + + var cfg ={ + + cn : [ + { + tag : 'a', + href : '#' + this.name, + html : this.title + }, + { + cls : 'container roo-child-ctr' + } + ] + }; + + return cfg; + }, + getChildContainer : function() + { + return this.el.select('roo-child-ctr').first(); + } + + + }); diff --git a/roojs-doc.js b/roojs-doc.js index 9d2efb55ef..2ddd567eb6 100644 --- a/roojs-doc.js +++ b/roojs-doc.js @@ -21,3 +21,6 @@ Roo.doc.Section=function(A){Roo.doc.Section.superclass.constructor.call(this,A); 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/NavCategory.js +Roo.doc.NavCategory=function(A){Roo.doc.Para.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.NavCategory,Roo.bootstrap.Component,{title:'',name:'',getAutoCreate:function(){var A={cn:[{tag:'a',href:'#'+this.name,html:this.title},{cls:'container roo-child-ctr'} +]};return A;},getChildContainer:function(){return this.el.select('roo-child-ctr').first();}}); -- 2.39.2