28 lines
773 B
JavaScript
28 lines
773 B
JavaScript
import Dialog from "./Dialog.js";
|
|
import TilorswiftAddColumnsEvent from "../events/TilorswiftAddColumnsEvent.js";
|
|
|
|
export default class DialogAddColumns extends Dialog
|
|
{
|
|
constructor() {
|
|
super();
|
|
this.inputPosition = this.createInputNumber('Einfügen vor Spalte');
|
|
this.inputColumns = this.createInputNumber('Anzahl Spalten');
|
|
this.buttonOk = this.createButton('OK');
|
|
this.buttonOk.addEventListener(
|
|
'click',
|
|
() => {
|
|
window.dispatchEvent(new TilorswiftAddColumnsEvent(this.getPosition(), this.getColumnCount()));
|
|
}
|
|
)
|
|
}
|
|
|
|
getPosition()
|
|
{
|
|
return this.inputPosition.value;
|
|
}
|
|
|
|
getColumnCount()
|
|
{
|
|
return this.inputColumns.value;
|
|
}
|
|
} |