examples/bootstrap/Editor.js
[roojs1] / examples / bootstrap / Editor.js
1
2
3 Roo.example = Roo.example || {};
4
5 Roo.example.Editor = new Roo.XComponent({
6     part     :  ["layout","viewpanel"],
7     order    : '001-viewpanel',
8     region   : '',
9     parent   : '#bootstrap',
10     name     : "unnamed module",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15         
16         this.parent = {
17             el : new Roo.bootstrap.Body()
18         }
19         this.parent.el.layout = false;
20         this.parent.el.render(document.body);
21         
22         var _this = this;
23         var MODULE = this;
24         var baseURL = '/web.campaign/index.local.php';
25         
26         return {
27             xtype: 'Body',
28             xns: Roo.bootstrap,
29             items : [
30                  {
31                     xtype : 'Container',
32                     cls : 'content',
33                     xns : Roo.bootstrap,
34                     style : 'margin-top:100px',
35                     items : [
36                         {
37                             xtype : 'Container',
38                             cls : 'pad-wrapper',
39                             xns : Roo.bootstrap,
40                             items : [
41                                 {
42                                     xtype : 'Container',
43                                     cls : 'container alpha',
44                                     xns : Roo.bootstrap,
45                                     items : [
46                                         {
47                                             level : 4,
48                                             xtype : 'Header',
49                                             html : 'Inline Editor',
50                                             xns : Roo.bootstrap
51                                         },
52                                         {
53                                             xtype : 'Panel',
54                                             xns : Roo.bootstrap.editor,
55                                             width : 1000,
56                                             height : 1000,
57                                             name : 'email-inline-editor',
58                                             stylesheets : (function(){
59                                                 var css = [];
60                                                 
61                                                 css.push(rootURL + '/roojs1/css-bootstrap/bootstrap.css');
62                                                 
63                                                 return css;
64                                             })(),
65                                             items : [
66                                                 {
67                                                     xtype : 'Block',
68                                                     xns : Roo.bootstrap.editor,
69                                                     items : [
70                                                         {
71                                                             xtype : 'Text',
72                                                             xns : Roo.bootstrap.editor.block,
73                                                             cols : 50
74                                                         }
75                                                     ]
76                                                 }
77                                             ]
78                                         }
79                                         
80                                     ]
81
82                                 }
83                             ]
84
85                         }
86                     ]
87
88                 }
89             ]
90         };
91     }
92 });