examples/bootstrap/htmleditor.js
[roojs1] / examples / bootstrap / htmleditor.js
index 3fc833b..76a4c7a 100644 (file)
@@ -1,4 +1,4 @@
-
+var htmleditor;
 
 Roo.example = Roo.example || {};
 
@@ -38,70 +38,30 @@ Roo.example.calendar = new Roo.XComponent({
                             style :  'margin-top:50px',
                             items : [
                                 { 
-                                    xtype: 'Calendar',
+                                    xtype: 'Form',
                                     xns: Roo.bootstrap,
-                                    cls : 'col-md-6 col-sm-12',
-                                    listeners : {
-                                        render : function() {
-                                            _this.cal = this;
-                                        },
-                                        evententer : function(e,el,data) {
-                                            _this.popover.show(el)
-                                        },
-                                        eventleave : function(e,el,data) {
-                                            _this.popover.hide();
-                                        },
-                                        monthchange : function(e,data) {
-                                            
-                                        }
-                                    },
-                                    store : {
-                                        xtype: 'Store',
-                                        xns: Roo.data,
-                                        listeners : {
-                                            beforeload : function (_self, o){
-                                                o.params = o.params || {};
-                                                var d = new Date().format('Y-m-d');
-                                                if(_this.cal){
-                                                    d = typeof(_this.cal.activeDate) == 'string' ? _this.cal.activeDate : _this.cal.activeDate.format("Y-m-d");
+                                    style :  'margin-top:50px',
+                                    items : [
+                                        {
+                                            xtype: 'HtmlEditor',
+                                            xns: Roo.bootstrap,
+                                            fieldLabel : "Editor",
+                                            labelAlign: 'top',
+                                            name : "editor",
+                                            listeners : {
+                                                render : function() {
+                                                    htmleditor = this;
                                                 }
-                                                o.params._activeDate = d
                                             }
-                                        },
-                                        remoteSort : true,
-                                        sortInfo : { direction : 'ASC', field: 'start_dt' },
-                                        proxy : {
-                                            xtype: 'HttpProxy',
-                                            xns: Roo.data,
-                                            method : 'GET',
-                                            url : baseURL + '/Roo/Cal_event.php'
-                                        },
-                                        reader : {
-                                            xtype: 'JsonReader',
-                                            xns: Roo.data,
-                                            id : 'id',
-                                            root : 'data',
-                                            totalProperty : 'total',
-                                            fields : [{"name":"id","type":"int"},{"name":"title","type":"string"}]
+                                            
                                         }
-                                    }
-                                 }
+                                    ]
+                                }
                             ]
                         }
                     ]
                  },
-                  {
-                    xtype: 'Popover',
-                    xns: Roo.bootstrap,
-                    title : "test popover",
-                    html : "test content",
-                    trigger : false,
-                    listeners : {
-                        render : function(args) {
-                            _this.popover = this;
-                        }
-                    }
-                }
+                  
             ]
         };
     }