aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt10
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt10
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt6
3 files changed, 13 insertions, 13 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
index 8d83ee51..de5bcd3b 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
@@ -22,8 +22,8 @@
package pl.treksoft.kvision.modal
import pl.treksoft.kvision.core.Widget
-import pl.treksoft.kvision.html.ALIGN
-import pl.treksoft.kvision.html.BUTTONSTYLE
+import pl.treksoft.kvision.html.Align
+import pl.treksoft.kvision.html.ButtonStyle
import pl.treksoft.kvision.html.Button
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
@@ -43,7 +43,7 @@ import pl.treksoft.kvision.utils.ENTER_KEY
*/
open class Alert(
caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ align: Align? = null, size: ModalSize? = null, animation: Boolean = true,
private val callback: (() -> Unit)? = null
) : Modal(caption, true, size, animation) {
@@ -76,7 +76,7 @@ open class Alert(
init {
body.add(content)
- val okButton = Button("OK", "ok", BUTTONSTYLE.PRIMARY)
+ val okButton = Button("OK", "ok", ButtonStyle.PRIMARY)
okButton.setEventListener {
click = {
hide()
@@ -112,7 +112,7 @@ open class Alert(
@Suppress("LongParameterList")
fun show(
caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ align: Align? = null, size: ModalSize? = null, animation: Boolean = true,
callback: (() -> Unit)? = null
) {
Alert(caption, text, rich, align, size, animation, callback).show()
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
index a3bb8d77..55310d50 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
@@ -21,8 +21,8 @@
*/
package pl.treksoft.kvision.modal
-import pl.treksoft.kvision.html.ALIGN
-import pl.treksoft.kvision.html.BUTTONSTYLE
+import pl.treksoft.kvision.html.Align
+import pl.treksoft.kvision.html.ButtonStyle
import pl.treksoft.kvision.html.Button
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
@@ -43,7 +43,7 @@ import pl.treksoft.kvision.html.Tag
*/
open class Confirm(
caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ align: Align? = null, size: ModalSize? = null, animation: Boolean = true,
cancelVisible: Boolean = false,
private val noCallback: (() -> Unit)? = null,
private val yesCallback: (() -> Unit)? = null
@@ -96,7 +96,7 @@ open class Confirm(
}
}
this.addButton(noButton)
- val yesButton = Button("Yes", "ok", BUTTONSTYLE.PRIMARY)
+ val yesButton = Button("Yes", "ok", ButtonStyle.PRIMARY)
yesButton.setEventListener {
click = {
hide()
@@ -133,7 +133,7 @@ open class Confirm(
@Suppress("LongParameterList")
fun show(
caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ align: Align? = null, size: ModalSize? = null, animation: Boolean = true,
cancelVisible: Boolean = false,
noCallback: (() -> Unit)? = null, yesCallback: (() -> Unit)? = null
) {
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
index d9cd0e8e..d4addf24 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
@@ -36,7 +36,7 @@ import pl.treksoft.kvision.utils.obj
/**
* Modal window sizes.
*/
-enum class MODALSIZE(val className: String) {
+enum class ModalSize(val className: String) {
LARGE("modal-lg"),
SMALL("modal-sm")
}
@@ -56,7 +56,7 @@ enum class MODALSIZE(val className: String) {
@Suppress("TooManyFunctions")
open class Modal(
caption: String? = null, closeButton: Boolean = true,
- size: MODALSIZE? = null, animation: Boolean = true, private val escape: Boolean = true,
+ size: ModalSize? = null, animation: Boolean = true, private val escape: Boolean = true,
classes: Set<String> = setOf(), init: (Modal.() -> Unit)? = null
) : SimplePanel(classes) {
@@ -251,7 +251,7 @@ open class Modal(
* @constructor
* @param size modal window size
*/
-internal class ModalDialog(size: MODALSIZE?) : SimplePanel(setOf("modal-dialog")) {
+internal class ModalDialog(size: ModalSize?) : SimplePanel(setOf("modal-dialog")) {
/**
* Modal window size.