mr-crocs-adventures/tilorswift/js/dialog/DialogAddRows.js

28 lines
769 B
JavaScript
Raw Permalink Normal View History

2020-02-09 00:29:46 +01:00
import Dialog from "./Dialog.js";
import TilorswiftAddRowsEvent from "../events/TilorswiftAddRowsEvent.js";
export default class DialogAddRows extends Dialog
{
constructor() {
super();
this.inputPosition = this.createInputNumber('Einfügen vor Zeile');
this.inputRows = this.createInputNumber('Anzahl Zeilen');
this.buttonOk = this.createButton('OK');
this.buttonOk.addEventListener(
'click',
() => {
window.dispatchEvent(new TilorswiftAddRowsEvent(this.getPosition(), this.getRowsCount()));
}
)
}
getPosition()
{
return parseInt(this.inputPosition.value);
2020-02-09 00:29:46 +01:00
}
getRowsCount()
{
return parseInt(this.inputRows.value);
2020-02-09 00:29:46 +01:00
}
}