aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/snabbdom
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-09-17 23:34:00 +0200
committerRobert Jaros <rjaros@finn.pl>2017-09-17 23:34:00 +0200
commitc40b93a416acd7e5f72ce0025668f1a9d8267fd4 (patch)
tree63e018b9789be0dc6ac0ed215fc3c25359455eb8 /src/main/kotlin/pl/treksoft/kvision/snabbdom
parent9a8a42e60947083352eed78a8fea5f92ea5a9a4e (diff)
downloadkvision-c40b93a416acd7e5f72ce0025668f1a9d8267fd4.tar.gz
kvision-c40b93a416acd7e5f72ce0025668f1a9d8267fd4.tar.bz2
kvision-c40b93a416acd7e5f72ce0025668f1a9d8267fd4.zip
Refactoring event handlers
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/snabbdom')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt b/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt
index a9ee9442..e8df9971 100644
--- a/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt
@@ -9,8 +9,8 @@ import com.github.snabbdom.VNodeData
import com.github.snabbdom.VNodeStyle
import org.w3c.dom.CustomEvent
import org.w3c.dom.CustomEventInit
+import pl.treksoft.jquery.JQueryEventObject
import pl.treksoft.kvision.core.Widget
-import pl.treksoft.kvision.html.Button
external class Object
@@ -21,19 +21,19 @@ fun obj(init: dynamic.() -> Unit): dynamic {
@Suppress("UnsafeCastFromDynamic")
private fun vNodeData(): VNodeData = js("({})")
-class DropDownEvent(type: String, eventInitDict: CustomEventInit) : CustomEvent(type, eventInitDict) {
- override val detail: Button? = null
+class KvEvent(type: String, eventInitDict: CustomEventInit) : CustomEvent(type, eventInitDict) {
+ override val detail: JQueryEventObject = obj({})
}
interface BtOn : On {
- var showBsDropdown: ((DropDownEvent) -> kotlin.Unit)?
- var shownBsDropdown: ((DropDownEvent) -> kotlin.Unit)?
- var hideBsDropdown: ((DropDownEvent) -> kotlin.Unit)?
- var hiddenBsDropdown: ((DropDownEvent) -> kotlin.Unit)?
- var showBsModal: ((CustomEvent) -> kotlin.Unit)?
- var shownBsModal: ((CustomEvent) -> kotlin.Unit)?
- var hideBsModal: ((CustomEvent) -> kotlin.Unit)?
- var hiddenBsModal: ((CustomEvent) -> kotlin.Unit)?
+ var showBsDropdown: ((KvEvent) -> kotlin.Unit)?
+ var shownBsDropdown: ((KvEvent) -> kotlin.Unit)?
+ var hideBsDropdown: ((KvEvent) -> kotlin.Unit)?
+ var hiddenBsDropdown: ((KvEvent) -> kotlin.Unit)?
+ var showBsModal: ((KvEvent) -> kotlin.Unit)?
+ var shownBsModal: ((KvEvent) -> kotlin.Unit)?
+ var hideBsModal: ((KvEvent) -> kotlin.Unit)?
+ var hiddenBsModal: ((KvEvent) -> kotlin.Unit)?
}
interface SnOn<T> : BtOn {