From 6c1c0e7bb02843a8088a011dbfb224605c201dd7 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 20 May 2020 15:11:04 +0200 Subject: Support relative links for remote endpoints --- .../src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvision-modules/kvision-tabulator-remote/src/main') diff --git a/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt b/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt index e4473ed8..e61ced55 100644 --- a/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt +++ b/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt @@ -61,7 +61,7 @@ open class TabulatorRemote( ) : Tabulator(null, false, options, types, classes) { private val kvUrlPrefix = window["kv_remote_url_prefix"] - private val urlPrefix: String = if (kvUrlPrefix != undefined) kvUrlPrefix else "" + private val urlPrefix: String = if (kvUrlPrefix != undefined) "$kvUrlPrefix/" else "" init { val (url, method) = @@ -69,7 +69,7 @@ open class TabulatorRemote( ?: throw IllegalStateException("Function not specified!") val callAgent = CallAgent() - options.ajaxURL = urlPrefix + url + options.ajaxURL = urlPrefix + url.drop(1) options.ajaxRequestFunc = { _, _, params -> val page = params.page val size = params.size -- cgit