Roo/doc/Section.js
authorAlan Knowles <alan@roojs.com>
Thu, 8 Sep 2016 09:06:20 +0000 (17:06 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 8 Sep 2016 09:06:20 +0000 (17:06 +0800)
Roo/doc/Section.js [new file with mode: 0644]

diff --git a/Roo/doc/Section.js b/Roo/doc/Section.js
new file mode 100644 (file)
index 0000000..5e8063e
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * - LGPL
+ *
+ */
+
+/**
+ * @class Roo.doc.Section
+ * @extends Roo.bootstrap.Component
+ * SectionElement class
+ * @cfg {String} stype (desc|parameter|return|note|example) section type.
+ * 
+ * @constructor
+ * Create a new Synopsis
+ * @param {Object} config The config object
+ */
+
+Roo.mailer.Section = function(config){
+    Roo.mailer.Section.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.mailer.Section, Roo.bootstrap.Component,  {
+    
+    
+    stype:   '',
+     
+    getAutoCreate : function(){
+        
+        var cfg ={
+            
+            cls : 'refsection',
+            // id... ?
+            cn : [
+                {
+                    tag: 'h1',
+                    cls : 'title',
+                    html : this.stype.charAt(0).toUpperCase() + this.stype.slice(1) //ucfirst
+                }
+            ]
+        }
+        if (this.stype == 'parameter') {
+            
+            // db package uses variable list here... - it results in dd/dl but the layout is messed up..
+            cfg.cn.push({
+                tag: 'ul',
+                cls: 'itemizedlist roo-params'
+            })
+        }
+        
+       
+        return cfg;
+    },
+    getChildContainer : function(build_call)
+    {
+         
+        if (this.stype == 'parameter') {
+            return this.el.select('.roo-params',true).first();
+        }
+        return this.el;
+    }
+    
+    
+   
+});
+
+
\ No newline at end of file