try and get ctrl-enter to add a clear all
[roojs1] / Roo / doc / Book.js
1 /*
2  * - LGPL
3  *
4  */
5
6 /**
7  * @class Roo.doc.Book
8  * @extends Roo.bootstrap.Component
9  * Book Element class - Represents the outer book
10  * @cfg {String} title   Title of the book
11  * @cfg {String} abstract Abstract (or just add para's to the book, and it will get added to the abstract)
12  * 
13  * 
14  * @constructor
15  * Create a new Book
16  * @param {Object} config The config object
17  */
18
19 Roo.doc.Book = function(config){
20     Roo.doc.Book.superclass.constructor.call(this, config);
21 };
22
23 Roo.extend(Roo.doc.Book, Roo.bootstrap.Component,  {
24     
25     title : '',
26     abstract : '',
27     getAutoCreate : function(){
28         
29         //?? this is the synopsis type....
30         
31         // this is not very fancy...
32         
33         var cfg ={
34             cls: 'book',
35             cn : [
36                 {
37                     cls : 'info',
38                     cn: [
39                         {
40                             tag: 'h1',
41                             html : this.title
42                         }
43                     ]
44                 }
45             ]
46         };
47          
48         if (this.abstract.length) {
49             cfg.cn[0].cn.push({
50                 cls : 'abstract',
51                 cn : {
52                     tag : 'p',
53                     cls : 'para',
54                     html : String.format('{0}', this.abstract)
55                 }
56                 
57             });
58             
59         }
60         
61         return cfg;
62     }
63      
64     
65     
66     
67     
68    
69 });
70
71  
72
73