diff --git a/demo/js/base/editor/demo.rich_editor.js b/demo/js/base/editor/demo.rich_editor.js index eef20d09b1..72dbfdbd11 100644 --- a/demo/js/base/editor/demo.rich_editor.js +++ b/demo/js/base/editor/demo.rich_editor.js @@ -3,6 +3,7 @@ Demo.RichEditor = BI.inherit(BI.Widget, { baseCls: "demo-rich-editor" }, render: function () { + var self = this; this.editor = BI.createWidget({ type: "bi.rich_editor", cls: "mvc-border", @@ -14,7 +15,13 @@ Demo.RichEditor = BI.inherit(BI.Widget, { element: this, hgap: 30, vgap: 50, - items: [this.editor] + items: [this.editor, { + type: "bi.button", + text: "focus", + handler: function () { + self.editor.focus(); + } + }] }); }, diff --git a/dist/_fineui.min.js b/dist/_fineui.min.js index 5483ac23a2..bf149bfe95 100644 --- a/dist/_fineui.min.js +++ b/dist/_fineui.min.js @@ -34,19 +34,19 @@ var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j} BI.Farbtastic.superclass._init.apply(this,arguments)},mounted:function(){var a=this;this.farbtastic=$.farbtastic(this.element,function(b){a.fireEvent(BI.Farbtastic.EVENT_CHANGE,a.getValue(),a)})},setValue:function(a){this.farbtastic.setColor(a)},getValue:function(){return this.farbtastic.color}}),BI.Farbtastic.EVENT_CHANGE="Farbtastic.EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),jQuery.fn.farbtastic=function(a){return $.farbtastic(this,a),this},jQuery.farbtastic=function(a,b){var a=$(a).get(0);return a.farbtastic||(a.farbtastic=new jQuery._farbtastic(a,b))},jQuery._farbtastic=function(a,b){var c=this;$(a).html('