28 lines
749 B
JavaScript
28 lines
749 B
JavaScript
|
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 this.inputPosition.value;
|
||
|
}
|
||
|
|
||
|
getRowsCount()
|
||
|
{
|
||
|
return this.inputRows.value;
|
||
|
}
|
||
|
}
|