!(function () { var ToDoListHeader = BI.inherit(BI.Widget, { props: { baseCls: "my-todolist-header" }, render: function () { var self = this, o = this.options; return { type: "bi.horizontal_auto", items: [ { el: { type: "bi.left_right_vertical_adapt", width: 600, height: o.height, items: { left: [ { el: { type: "bi.label", cls: "my-todolist-title", text: "FineUI ToDoList", height: o.height } } ], right: [ { el: { type: "bi.editor", allowBlank: true, cls: "my-todolist-header-editor", watermark: "添加ToDo", width: 300, height: 24, listeners: [ { eventName: "EVENT_ENTER", action: function () { self.fireEvent(ToDoListHeader.EVENT_ADD, this.getValue()); this.setValue(""); } } ] } } ] } } } ] }; } }); ToDoListHeader.EVENT_ADD = "EVENT_ADD"; BI.shortcut("my.todolist.header", ToDoListHeader); })();