mirror of
https://github.com/dzeiocom/FormManager.git
synced 2025-04-23 03:12:14 +00:00
Implemented modeSwitch listener
This commit is contained in:
parent
5b11c7d7b4
commit
2569decb62
@ -244,8 +244,9 @@ export default class FormManager {
|
|||||||
ajax.send()
|
ajax.send()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public mode = FMMode.EditMode;
|
||||||
public setMode(mode: FMMode) {
|
public setMode(mode: FMMode) {
|
||||||
console.log(mode)
|
this.mode = mode
|
||||||
if (mode == FMMode.ViewMode) {
|
if (mode == FMMode.ViewMode) {
|
||||||
for (const name in this.inputs) {
|
for (const name in this.inputs) {
|
||||||
if (this.inputs.hasOwnProperty(name)) {
|
if (this.inputs.hasOwnProperty(name)) {
|
||||||
@ -263,6 +264,7 @@ export default class FormManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.attributeManager.trigger(AttributeListeners.MODE_SWITCH, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
public setModeForInput(mode: FMMode, inputName: string) {
|
public setModeForInput(mode: FMMode, inputName: string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user