|
|
|
@ -1,36 +1,61 @@
|
|
|
|
|
import { shortcut, Widget, extend, emptyFn, i18nText, isArray, createWidget, nextTick, Controller, isNotNull, isString, isKey, isFunction, isNumber, isEmpty } from "@/core"; |
|
|
|
|
import { TextButton, Editor } from "@/base"; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* guy |
|
|
|
|
* 记录状态的输入框 |
|
|
|
|
* @class BI.StateEditor |
|
|
|
|
* @extends BI.Single |
|
|
|
|
* @class StateEditor |
|
|
|
|
* @extends Single |
|
|
|
|
*/ |
|
|
|
|
BI.StateEditor = BI.inherit(BI.Widget, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments); |
|
|
|
|
return BI.extend(conf, { |
|
|
|
|
baseCls: (conf.baseCls || "") + " bi-state-editor", |
|
|
|
|
@shortcut() |
|
|
|
|
export class StateEditor extends Widget { |
|
|
|
|
static xtype = "bi.state_editor" |
|
|
|
|
|
|
|
|
|
static EVENT_CHANGE = "EVENT_CHANGE" |
|
|
|
|
static EVENT_FOCUS = "EVENT_FOCUS" |
|
|
|
|
static EVENT_BLUR = "EVENT_BLUR" |
|
|
|
|
static EVENT_CLICK = "EVENT_CLICK" |
|
|
|
|
static EVENT_KEY_DOWN = "EVENT_KEY_DOWN" |
|
|
|
|
static EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL" |
|
|
|
|
static EVENT_START = "EVENT_START" |
|
|
|
|
static EVENT_PAUSE = "EVENT_PAUSE" |
|
|
|
|
static EVENT_STOP = "EVENT_STOP" |
|
|
|
|
static EVENT_CONFIRM = "EVENT_CONFIRM" |
|
|
|
|
static EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM" |
|
|
|
|
static EVENT_VALID = "EVENT_VALID" |
|
|
|
|
static EVENT_ERROR = "EVENT_ERROR" |
|
|
|
|
static EVENT_ENTER = "EVENT_ENTER" |
|
|
|
|
static EVENT_RESTRICT = "EVENT_RESTRICT" |
|
|
|
|
static EVENT_SPACE = "EVENT_SPACE" |
|
|
|
|
static EVENT_EMPTY = "EVENT_EMPTY" |
|
|
|
|
|
|
|
|
|
_defaultConfig() { |
|
|
|
|
const conf = super._defaultConfig(...arguments); |
|
|
|
|
|
|
|
|
|
return extend(conf, { |
|
|
|
|
baseCls: `${conf.baseCls || ""} bi-state-editor`, |
|
|
|
|
hgap: 4, |
|
|
|
|
vgap: 2, |
|
|
|
|
lgap: 0, |
|
|
|
|
rgap: 0, |
|
|
|
|
tgap: 0, |
|
|
|
|
bgap: 0, |
|
|
|
|
validationChecker: BI.emptyFn, |
|
|
|
|
quitChecker: BI.emptyFn, |
|
|
|
|
validationChecker: emptyFn, |
|
|
|
|
quitChecker: emptyFn, |
|
|
|
|
allowBlank: true, |
|
|
|
|
watermark: "", |
|
|
|
|
errorText: "", |
|
|
|
|
height: 24, |
|
|
|
|
defaultText: BI.i18nText("BI-Basic_Unrestricted"), // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
|
|
|
|
|
defaultText: i18nText("BI-Basic_Unrestricted"), // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
|
|
|
|
|
text: "", // 显示值
|
|
|
|
|
el: {} |
|
|
|
|
el: {}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.StateEditor.superclass._init.apply(this, arguments); |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
this.editor = BI.createWidget(o.el, { |
|
|
|
|
_init() { |
|
|
|
|
super._init(...arguments); |
|
|
|
|
const o = this.options; |
|
|
|
|
this.editor = createWidget(o.el, { |
|
|
|
|
type: "bi.editor", |
|
|
|
|
simple: o.simple, |
|
|
|
|
height: o.height, |
|
|
|
@ -48,262 +73,243 @@ BI.StateEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
errorText: o.errorText, |
|
|
|
|
autoTrim: o.autoTrim, |
|
|
|
|
}); |
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
|
this.text = createWidget({ |
|
|
|
|
type: "bi.text_button", |
|
|
|
|
cls: "bi-water-mark tip-text-style", |
|
|
|
|
textAlign: "left", |
|
|
|
|
height: o.height, |
|
|
|
|
text: o.text, |
|
|
|
|
hgap: o.hgap + 2, |
|
|
|
|
handler: function () { |
|
|
|
|
self._showInput(); |
|
|
|
|
self.editor.focus(); |
|
|
|
|
self.editor.setValue(""); |
|
|
|
|
handler: () => { |
|
|
|
|
this._showInput(); |
|
|
|
|
this.editor.focus(); |
|
|
|
|
this.editor.setValue(""); |
|
|
|
|
}, |
|
|
|
|
title: BI.isNotNull(o.tipText) ? o.tipText : function () { |
|
|
|
|
var title = ""; |
|
|
|
|
if (BI.isString(self.stateValue)) { |
|
|
|
|
title = self.stateValue; |
|
|
|
|
title: isNotNull(o.tipText) ? o.tipText : () => { |
|
|
|
|
let title = ""; |
|
|
|
|
if (isString(this.stateValue)) { |
|
|
|
|
title = this.stateValue; |
|
|
|
|
} |
|
|
|
|
if (BI.isArray(self.stateValue) && self.stateValue.length === 1) { |
|
|
|
|
title = self.stateValue[0]; |
|
|
|
|
if (isArray(this.stateValue) && this.stateValue.length === 1) { |
|
|
|
|
title = this.stateValue[0]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return title; |
|
|
|
|
}, |
|
|
|
|
warningTitle: o.warningTitle, |
|
|
|
|
tipType: o.tipType |
|
|
|
|
tipType: o.tipType, |
|
|
|
|
}); |
|
|
|
|
this.text.on(BI.TextButton.EVENT_CHANGE, function () { |
|
|
|
|
BI.nextTick(function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); |
|
|
|
|
this.text.on(TextButton.EVENT_CHANGE, () => { |
|
|
|
|
nextTick(() => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_CLICK_LABEL); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Controller.EVENT_CHANGE, function () { |
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
|
this.editor.on(Controller.EVENT_CHANGE, (...args) => { |
|
|
|
|
this.fireEvent(Controller.EVENT_CHANGE, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_FOCUS, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_FOCUS, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_FOCUS, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_BLUR, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_BLUR, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_BLUR, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_CLICK, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_CLICK, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_CLICK, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_CHANGE, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_CHANGE, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_CHANGE, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_KEY_DOWN, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_KEY_DOWN, ...args); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.editor.on(BI.Editor.EVENT_VALID, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_VALID, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_VALID, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_VALID, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_CONFIRM, function () { |
|
|
|
|
self._showHint(); |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_CONFIRM, (...args) => { |
|
|
|
|
this._showHint(); |
|
|
|
|
this.fireEvent(StateEditor.EVENT_CONFIRM, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () { |
|
|
|
|
self._showHint(); |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_CHANGE_CONFIRM, (...args) => { |
|
|
|
|
this._showHint(); |
|
|
|
|
this.fireEvent(StateEditor.EVENT_CHANGE_CONFIRM, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_START, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_START, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_START, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_START, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_PAUSE, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_PAUSE, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_PAUSE, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_STOP, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_STOP, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_STOP, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_STOP, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_SPACE, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_SPACE, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_SPACE, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_ERROR, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_ERROR, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_ERROR, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_ENTER, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_ENTER, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_ENTER, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_RESTRICT, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_RESTRICT, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_RESTRICT, ...args); |
|
|
|
|
}); |
|
|
|
|
this.editor.on(BI.Editor.EVENT_EMPTY, function () { |
|
|
|
|
self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); |
|
|
|
|
this.editor.on(Editor.EVENT_EMPTY, (...args) => { |
|
|
|
|
this.fireEvent(StateEditor.EVENT_EMPTY, ...args); |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
element: this, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
items: [{ |
|
|
|
|
el: this.text, |
|
|
|
|
inset: 0, |
|
|
|
|
}, { |
|
|
|
|
el: this.editor, |
|
|
|
|
inset: 0, |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}], |
|
|
|
|
}); |
|
|
|
|
this._showHint(); |
|
|
|
|
if (BI.isNotNull(o.text)) { |
|
|
|
|
if (isNotNull(o.text)) { |
|
|
|
|
this.setState(o.text); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setWaterMark: function (v) { |
|
|
|
|
setWaterMark(v) { |
|
|
|
|
this.options.watermark = v; |
|
|
|
|
this.editor.setWaterMark(v); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
doRedMark: function () { |
|
|
|
|
if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { |
|
|
|
|
doRedMark() { |
|
|
|
|
if (this.editor.getValue() === "" && isKey(this.options.watermark)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.text.doRedMark.apply(this.text, arguments); |
|
|
|
|
}, |
|
|
|
|
this.text.doRedMark(...arguments); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
unRedMark: function () { |
|
|
|
|
this.text.unRedMark.apply(this.text, arguments); |
|
|
|
|
}, |
|
|
|
|
unRedMark() { |
|
|
|
|
this.text.unRedMark(...arguments); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
doHighLight: function () { |
|
|
|
|
if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { |
|
|
|
|
doHighLight() { |
|
|
|
|
if (this.editor.getValue() === "" && isKey(this.options.watermark)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.text.doHighLight.apply(this.text, arguments); |
|
|
|
|
}, |
|
|
|
|
this.text.doHighLight(...arguments); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
unHighLight: function () { |
|
|
|
|
this.text.unHighLight.apply(this.text, arguments); |
|
|
|
|
}, |
|
|
|
|
unHighLight() { |
|
|
|
|
this.text.unHighLight(...arguments); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
focus: function () { |
|
|
|
|
focus() { |
|
|
|
|
if (this.options.disabled === false) { |
|
|
|
|
this._showInput(); |
|
|
|
|
this.editor.focus(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
blur: function () { |
|
|
|
|
blur() { |
|
|
|
|
this.editor.blur(); |
|
|
|
|
this._showHint(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_showInput: function () { |
|
|
|
|
_showInput() { |
|
|
|
|
this.editor.visible(); |
|
|
|
|
this.text.invisible(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_showHint: function () { |
|
|
|
|
_showHint() { |
|
|
|
|
this.editor.invisible(); |
|
|
|
|
this.text.visible(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_setText: function (v) { |
|
|
|
|
_setText(v) { |
|
|
|
|
this.text.setText(v); |
|
|
|
|
this.text.setTitle(v); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isValid: function () { |
|
|
|
|
isValid() { |
|
|
|
|
return this.editor.isValid(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setErrorText: function (text) { |
|
|
|
|
setErrorText(text) { |
|
|
|
|
this.editor.setErrorText(text); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getErrorText: function () { |
|
|
|
|
getErrorText() { |
|
|
|
|
return this.editor.getErrorText(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isEditing: function () { |
|
|
|
|
isEditing() { |
|
|
|
|
return this.editor.isEditing(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getLastValidValue: function () { |
|
|
|
|
getLastValidValue() { |
|
|
|
|
return this.editor.getLastValidValue(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getLastChangedValue: function () { |
|
|
|
|
getLastChangedValue() { |
|
|
|
|
return this.editor.getLastChangedValue(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setValue: function (k) { |
|
|
|
|
setValue(k) { |
|
|
|
|
this.editor.setValue(k); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
|
getValue() { |
|
|
|
|
return this.editor.getValue(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getState: function () { |
|
|
|
|
getState() { |
|
|
|
|
return this.editor.getValue().match(/[^\s]+/g); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setState: function (v) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var defaultText = BI.isFunction(o.defaultText) ? o.defaultText() : o.defaultText; |
|
|
|
|
BI.StateEditor.superclass.setValue.apply(this, arguments); |
|
|
|
|
setState(v) { |
|
|
|
|
const o = this.options; |
|
|
|
|
const defaultText = isFunction(o.defaultText) ? o.defaultText() : o.defaultText; |
|
|
|
|
super.setValue(...arguments); |
|
|
|
|
this.stateValue = v; |
|
|
|
|
if (BI.isNumber(v)) { |
|
|
|
|
if (v === BI.Selection.All) { |
|
|
|
|
this._setText(BI.i18nText("BI-Select_All")); |
|
|
|
|
if (isNumber(v)) { |
|
|
|
|
if (v === Selection.All) { |
|
|
|
|
this._setText(i18nText("BI-Select_All")); |
|
|
|
|
this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
} else if (v === BI.Selection.Multi) { |
|
|
|
|
this._setText(BI.i18nText("BI-Select_Part")); |
|
|
|
|
} else if (v === Selection.Multi) { |
|
|
|
|
this._setText(i18nText("BI-Select_Part")); |
|
|
|
|
this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
} else { |
|
|
|
|
this._setText(BI.isKey(defaultText) ? defaultText : o.text); |
|
|
|
|
BI.isKey(defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
this._setText(isKey(defaultText) ? defaultText : o.text); |
|
|
|
|
isKey(defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (BI.isString(v)) { |
|
|
|
|
if (isString(v)) { |
|
|
|
|
this._setText(v); |
|
|
|
|
// 配置了defaultText才判断标灰,其他情况不标灰
|
|
|
|
|
(BI.isKey(defaultText) && defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
(isKey(defaultText) && defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (BI.isArray(v)) { |
|
|
|
|
if (BI.isEmpty(v)) { |
|
|
|
|
this._setText(BI.isKey(defaultText) ? defaultText : o.text); |
|
|
|
|
BI.isKey(defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
if (isArray(v)) { |
|
|
|
|
if (isEmpty(v)) { |
|
|
|
|
this._setText(isKey(defaultText) ? defaultText : o.text); |
|
|
|
|
isKey(defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
} else if (v.length === 1) { |
|
|
|
|
this._setText(v[0]); |
|
|
|
|
this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
} else { |
|
|
|
|
this._setText(BI.i18nText("BI-Select_Part")); |
|
|
|
|
this._setText(i18nText("BI-Select_Part")); |
|
|
|
|
this.text.element.removeClass("bi-water-mark"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setTipType: function (v) { |
|
|
|
|
setTipType(v) { |
|
|
|
|
this.text.options.tipType = v; |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getText: function () { |
|
|
|
|
getText() { |
|
|
|
|
return this.text.getText(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
|
BI.StateEditor.EVENT_FOCUS = "EVENT_FOCUS"; |
|
|
|
|
BI.StateEditor.EVENT_BLUR = "EVENT_BLUR"; |
|
|
|
|
BI.StateEditor.EVENT_CLICK = "EVENT_CLICK"; |
|
|
|
|
BI.StateEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; |
|
|
|
|
BI.StateEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; |
|
|
|
|
|
|
|
|
|
BI.StateEditor.EVENT_START = "EVENT_START"; |
|
|
|
|
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE"; |
|
|
|
|
BI.StateEditor.EVENT_STOP = "EVENT_STOP"; |
|
|
|
|
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; |
|
|
|
|
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM"; |
|
|
|
|
BI.StateEditor.EVENT_VALID = "EVENT_VALID"; |
|
|
|
|
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR"; |
|
|
|
|
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER"; |
|
|
|
|
BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; |
|
|
|
|
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE"; |
|
|
|
|
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY"; |
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.state_editor", BI.StateEditor); |
|
|
|
|
} |
|
|
|
|