7314c787cde277636ce6976af33f253adc45e2fc
[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         this.parent = {
16             el : new Roo.bootstrap.Body()
17         }
18         this.parent.el.layout = false;
19         this.parent.el.render(document.body);
20         
21         var _this = this;
22         var MODULE = this;
23         var baseURL = '/web.campaign/index.local.php';
24         
25         return {
26             xtype: 'Body',
27             xns: Roo.bootstrap,
28             items : [
29                  {
30                     xtype : 'Container',
31                     cls : 'content',
32                     xns : Roo.bootstrap,
33                     style : 'margin-top:100px',
34                     items : [
35                         {
36                             xtype : 'Container',
37                             cls : 'pad-wrapper',
38                             xns : Roo.bootstrap,
39                             items : [
40                                 {
41                                     xtype : 'Container',
42                                     cls : 'container alpha',
43                                     xns : Roo.bootstrap,
44                                     items : [
45                                         {
46                                             level : 4,
47                                             xtype : 'Header',
48                                             html : 'Inline Editor',
49                                             xns : Roo.bootstrap
50                                         },
51                                         {
52                                             xtype : 'Panel',
53                                             xns : Roo.bootstrap.editor,
54                                             name : 'thanks-email',
55                                             width : 1000,
56                                             height : 1500,
57                                             stylesheets : (function(){
58                                                 var css = [];
59                                                 
60                                                 css.push(rootURL + '/roojs1/css-bootstrap/bootstrap.css');
61                                                 css.push(rootURL + '/roojs1/css-bootstrap/font-awesome.css');
62                                                 css.push(rootURL + '/Campaign/editor/editor.css');
63                                                 
64                                                 return css;
65                                             })(),
66                                             listeners : {
67                                                 render : function (_self)
68                                                 {
69                                                     _this.previewPanel = _self;
70                                                 }
71                                             }
72                                         }
73                                         
74                                     ]
75
76                                 }
77                             ]
78
79                         }
80                     ]
81
82                 }
83             ]
84         };
85     }
86 });