|
|
@ -28,15 +28,14 @@ BI.TextEditor = BI.inherit(BI.Widget, { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
var border = o.simple ? 1 : 2; |
|
|
|
var border = o.simple ? 1 : 2; |
|
|
|
if (BI.isNumber(o.height)) { |
|
|
|
if (BI.isNumber(o.height)) { |
|
|
|
this.element.css({height: o.height - border}); |
|
|
|
this.element.css({ height: o.height - border }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNumber(o.width)) { |
|
|
|
if (BI.isNumber(o.width)) { |
|
|
|
this.element.css({width: o.width - border}); |
|
|
|
this.element.css({ width: o.width - border }); |
|
|
|
} |
|
|
|
} |
|
|
|
this.editor = BI.createWidget({ |
|
|
|
this.editor = BI.createWidget({ |
|
|
|
type: "bi.editor", |
|
|
|
type: "bi.editor", |
|
|
|
simple: o.simple, |
|
|
|
simple: o.simple, |
|
|
|
height: o.height - border, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
|
vgap: o.vgap, |
|
|
|
vgap: o.vgap, |
|
|
|
lgap: o.lgap, |
|
|
|
lgap: o.lgap, |
|
|
@ -117,10 +116,14 @@ BI.TextEditor = BI.inherit(BI.Widget, { |
|
|
|
self.fireEvent(BI.TextEditor.EVENT_EMPTY); |
|
|
|
self.fireEvent(BI.TextEditor.EVENT_EMPTY); |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.vertical", |
|
|
|
type: "bi.absolute", |
|
|
|
scrolly: false, |
|
|
|
|
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
items: [this.editor] |
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: this.editor, |
|
|
|
|
|
|
|
inset: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -177,4 +180,4 @@ BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; |
|
|
|
BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; |
|
|
|
BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; |
|
|
|
BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; |
|
|
|
BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; |
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.text_editor", BI.TextEditor); |
|
|
|
BI.shortcut("bi.text_editor", BI.TextEditor); |
|
|
|