From 6b53324c97bfc80ed14dfca6a5dbc879950715b9 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 3 Oct 2019 19:03:21 +0200 Subject: Upgrade to Bootstrap 4. Upgrade to Font Awesome 5. Restructure modules. --- .../pl/treksoft/kvision/KVManagerDatetime.kt | 75 +++++ .../pl/treksoft/kvision/form/time/DateTime.kt | 246 ++++++++++++++++ .../pl/treksoft/kvision/form/time/DateTimeInput.kt | 328 +++++++++++++++++++++ .../bootstrap-datetimepicker.ar.js | 18 ++ .../bootstrap-datetimepicker.az.js | 17 ++ .../bootstrap-datetimepicker.bg.js | 17 ++ .../bootstrap-datetimepicker.bn.js | 17 ++ .../bootstrap-datetimepicker.ca.js | 17 ++ .../bootstrap-datetimepicker.cs.js | 20 ++ .../bootstrap-datetimepicker.da.js | 17 ++ .../bootstrap-datetimepicker.de.js | 19 ++ .../bootstrap-datetimepicker.ee.js | 19 ++ .../bootstrap-datetimepicker.el.js | 16 + .../bootstrap-datetimepicker.es.js | 17 ++ .../bootstrap-datetimepicker.fi.js | 17 ++ .../bootstrap-datetimepicker.fr.js | 19 ++ .../bootstrap-datetimepicker.he.js | 18 ++ .../bootstrap-datetimepicker.hr.js | 16 + .../bootstrap-datetimepicker.hu.js | 18 ++ .../bootstrap-datetimepicker.hy.js | 17 ++ .../bootstrap-datetimepicker.id.js | 20 ++ .../bootstrap-datetimepicker.is.js | 17 ++ .../bootstrap-datetimepicker.it.js | 19 ++ .../bootstrap-datetimepicker.ja.js | 17 ++ .../bootstrap-datetimepicker.ka.js | 17 ++ .../bootstrap-datetimepicker.ko.js | 18 ++ .../bootstrap-datetimepicker.lt.js | 19 ++ .../bootstrap-datetimepicker.lv.js | 19 ++ .../bootstrap-datetimepicker.ms.js | 17 ++ .../bootstrap-datetimepicker.nb.js | 17 ++ .../bootstrap-datetimepicker.nl.js | 17 ++ .../bootstrap-datetimepicker.no.js | 17 ++ .../bootstrap-datetimepicker.pl.js | 18 ++ .../bootstrap-datetimepicker.pt-BR.js | 18 ++ .../bootstrap-datetimepicker.pt.js | 18 ++ .../bootstrap-datetimepicker.ro.js | 18 ++ .../bootstrap-datetimepicker.rs-latin.js | 17 ++ .../bootstrap-datetimepicker.rs.js | 17 ++ .../bootstrap-datetimepicker.ru.js | 17 ++ .../bootstrap-datetimepicker.sk.js | 20 ++ .../bootstrap-datetimepicker.sl.js | 17 ++ .../bootstrap-datetimepicker.sv.js | 17 ++ .../bootstrap-datetimepicker.sw.js | 18 ++ .../bootstrap-datetimepicker.th.js | 17 ++ .../bootstrap-datetimepicker.tr.js | 18 ++ .../bootstrap-datetimepicker.ua.js | 16 + .../bootstrap-datetimepicker.uk.js | 17 ++ .../bootstrap-datetimepicker.zh-TW.js | 17 ++ .../bootstrap-datetimepicker.zh.js | 17 ++ .../kotlin/test/pl/treksoft/kvision/TestUtil.kt | 100 +++++++ .../kvision/form/time/DateTimeInputSpec.kt | 53 ++++ .../pl/treksoft/kvision/form/time/DateTimeSpec.kt | 62 ++++ 52 files changed, 1674 insertions(+) create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt create mode 100644 kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt (limited to 'kvision-modules/kvision-bootstrap-datetime/src') diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt new file mode 100644 index 00000000..41f8620f --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package pl.treksoft.kvision + +internal val kVManagerDatetimeInit = KVManagerDatetime.init() + +/** + * Internal singleton object which initializes and configures KVision datetime module. + */ +internal object KVManagerDatetime { + init { + require("bootstrap-datetime-picker/css/bootstrap-datetimepicker.min.css") + require("bootstrap-datetime-picker/js/bootstrap-datetimepicker.min.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js") + require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js") + } + + internal fun init() {} +} diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt new file mode 100644 index 00000000..7fb35057 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt @@ -0,0 +1,246 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package pl.treksoft.kvision.form.time + +import pl.treksoft.kvision.core.Container +import pl.treksoft.kvision.core.StringBoolPair +import pl.treksoft.kvision.core.Widget +import pl.treksoft.kvision.form.DateFormControl +import pl.treksoft.kvision.form.FieldLabel +import pl.treksoft.kvision.form.InvalidFeedback +import pl.treksoft.kvision.panel.SimplePanel +import pl.treksoft.kvision.utils.SnOn +import kotlin.js.Date + +/** + * Form field date/time chooser component. + * + * @constructor + * @param value date/time input value + * @param name the name attribute of the generated HTML input element + * @param format date/time format (default YYYY-MM-DD HH:mm) + * @param label label text bound to the input element + * @param rich determines if [label] can contain HTML code + */ +open class DateTime( + value: Date? = null, name: String? = null, format: String = "YYYY-MM-DD HH:mm", label: String? = null, + rich: Boolean = false +) : SimplePanel(setOf("form-group")), DateFormControl { + + /** + * Date/time input value. + */ + override var value + get() = input.value + set(value) { + input.value = value + } + /** + * Date/time format. + */ + var format + get() = input.format + set(value) { + input.format = value + } + /** + * The placeholder for the date/time input. + */ + var placeholder + get() = input.placeholder + set(value) { + input.placeholder = value + } + /** + * Determines if the date/time input is automatically focused. + */ + var autofocus + get() = input.autofocus + set(value) { + input.autofocus = value + } + /** + * Determines if the date/time input is read-only. + */ + var readonly + get() = input.readonly + set(value) { + input.readonly = value + } + /** + * Day of the week start. 0 (Sunday) to 6 (Saturday). + */ + var weekStart + get() = input.weekStart + set(value) { + input.weekStart = value + } + /** + * Days of the week that should be disabled. Multiple values should be comma separated. + */ + var daysOfWeekDisabled + get() = input.daysOfWeekDisabled + set(value) { + input.daysOfWeekDisabled = value + } + /** + * Determines if *Clear* button should be visible. + */ + var clearBtn + get() = input.clearBtn + set(value) { + input.clearBtn = value + } + /** + * Determines if *Today* button should be visible. + */ + var todayBtn + get() = input.todayBtn + set(value) { + input.todayBtn = value + } + /** + * Determines if the current day should be highlighted. + */ + var todayHighlight + get() = input.todayHighlight + set(value) { + input.todayHighlight = value + } + /** + * The increment used to build the hour view. + */ + var minuteStep + get() = input.minuteStep + set(value) { + input.minuteStep = value + } + /** + * Determines if meridian views are visible in day and hour views. + */ + var showMeridian + get() = input.showMeridian + set(value) { + input.showMeridian = value + } + /** + * The label text bound to the input element. + */ + var label + get() = flabel.content + set(value) { + flabel.content = value + } + /** + * Determines if [label] can contain HTML code. + */ + var rich + get() = flabel.rich + set(value) { + flabel.rich = value + } + + private val idc = "kv_form_time_$counter" + final override val input: DateTimeInput = DateTimeInput(value, format).apply { + this.id = idc + this.name = name + } + final override val flabel: FieldLabel = FieldLabel(idc, label, rich) + final override val invalidFeedback: InvalidFeedback = InvalidFeedback().apply { visible = false } + + init { + @Suppress("LeakingThis") + input.eventTarget = this + this.addInternal(flabel) + this.addInternal(input) + this.addInternal(invalidFeedback) + counter++ + } + + override fun getSnClass(): List { + val cl = super.getSnClass().toMutableList() + if (validatorError != null) { + cl.add("text-danger" to true) + } + return cl + } + + @Suppress("UNCHECKED_CAST") + override fun setEventListener(block: SnOn.() -> Unit): Widget { + input.setEventListener(block) + return this + } + + override fun setEventListener(block: SnOn.() -> Unit): Widget { + input.setEventListener(block) + return this + } + + override fun removeEventListeners(): Widget { + input.removeEventListeners() + return this + } + + /** + * Open date/time chooser popup. + */ + open fun showPopup() { + input.showPopup() + } + + /** + * Hides date/time chooser popup. + */ + open fun hidePopup() { + input.hidePopup() + } + + override fun getValueAsString(): String? { + return input.getValueAsString() + } + + override fun focus() { + input.focus() + } + + override fun blur() { + input.blur() + } + + companion object { + internal var counter = 0 + + /** + * DSL builder extension function. + * + * It takes the same parameters as the constructor of the built component. + */ + fun Container.dateTime( + value: Date? = null, name: String? = null, format: String = "YYYY-MM-DD HH:mm", label: String? = null, + rich: Boolean = false, init: (DateTime.() -> Unit)? = null + ): DateTime { + val dateTime = DateTime(value, name, format, label, rich).apply { init?.invoke(this) } + this.add(dateTime) + return dateTime + } + } +} diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt new file mode 100644 index 00000000..66cb6cc0 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt @@ -0,0 +1,328 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package pl.treksoft.kvision.form.time + +import com.github.snabbdom.VNode +import pl.treksoft.kvision.core.Container +import pl.treksoft.kvision.core.StringBoolPair +import pl.treksoft.kvision.core.StringPair +import pl.treksoft.kvision.core.Widget +import pl.treksoft.kvision.form.FormInput +import pl.treksoft.kvision.form.InputSize +import pl.treksoft.kvision.form.ValidationStatus +import pl.treksoft.kvision.i18n.I18n +import pl.treksoft.kvision.types.toDateF +import pl.treksoft.kvision.types.toStringF +import pl.treksoft.kvision.utils.obj +import kotlin.js.Date + +internal const val DEFAULT_MINUTE_STEP = 5 +internal const val MAX_VIEW = 4 + +/** + * Basic date/time chooser component. + * + * @constructor + * @param value date/time input value + * @param format date/time format (default YYYY-MM-DD HH:mm) + * @param classes a set of CSS class names + */ +@Suppress("TooManyFunctions") +open class DateTimeInput( + value: Date? = null, format: String = "YYYY-MM-DD HH:mm", + classes: Set = setOf() +) : Widget(classes + "form-control"), FormInput { + + private var initialized = false + + init { + this.setInternalEventListener { + change = { + self.changeValue() + } + } + } + + /** + * Date/time input value. + */ + var value by refreshOnUpdate(value) { refreshState() } + /** + * Date/time format. + */ + var format by refreshOnUpdate(format) { refreshDatePicker() } + /** + * The placeholder for the date/time input. + */ + var placeholder: String? by refreshOnUpdate() + /** + * The name attribute of the generated HTML input element. + */ + override var name: String? by refreshOnUpdate() + /** + * Determines if the field is disabled. + */ + override var disabled by refreshOnUpdate(false) { refresh(); checkDisabled() } + /** + * Determines if the text input is automatically focused. + */ + var autofocus: Boolean? by refreshOnUpdate() + /** + * Determines if the date/time input is read-only. + */ + var readonly: Boolean? by refreshOnUpdate() + /** + * The size of the input. + */ + override var size: InputSize? by refreshOnUpdate() + /** + * The validation status of the input. + */ + override var validationStatus: ValidationStatus? by refreshOnUpdate() + /** + * Day of the week start. 0 (Sunday) to 6 (Saturday). + */ + var weekStart by refreshOnUpdate(0) { refreshDatePicker() } + /** + * Days of the week that should be disabled. Multiple values should be comma separated. + */ + var daysOfWeekDisabled by refreshOnUpdate(arrayOf()) { refreshDatePicker() } + /** + * Determines if *Clear* button should be visible. + */ + var clearBtn by refreshOnUpdate(true) { refreshDatePicker() } + /** + * Determines if *Today* button should be visible. + */ + var todayBtn by refreshOnUpdate(false) { refreshDatePicker() } + /** + * Determines if the current day should be highlighted. + */ + var todayHighlight by refreshOnUpdate(false) { refreshDatePicker() } + /** + * The increment used to build the hour view. + */ + var minuteStep by refreshOnUpdate(DEFAULT_MINUTE_STEP) { refreshDatePicker() } + /** + * Determines if meridian views are visible in day and hour views. + */ + var showMeridian by refreshOnUpdate(false) { refreshDatePicker() } + + override fun render(): VNode { + return render("input") + } + + override fun getSnClass(): List { + val cl = super.getSnClass().toMutableList() + validationStatus?.let { + cl.add(it.className to true) + } + size?.let { + cl.add(it.className to true) + } + return cl + } + + override fun getSnAttrs(): List { + val sn = super.getSnAttrs().toMutableList() + sn.add("type" to "text") + placeholder?.let { + sn.add("placeholder" to translate(it)) + } + name?.let { + sn.add("name" to it) + } + autofocus?.let { + if (it) { + sn.add("autofocus" to "autofocus") + } + } + readonly?.let { + if (it) { + sn.add("readonly" to "readonly") + } + } + if (disabled) { + sn.add("disabled" to "disabled") + value?.let { + sn.add("value" to it.toStringF(format)) + } + } + return sn + } + + private fun checkDisabled() { + if (disabled) { + if (initialized) { + getElementJQueryD()?.datetimepicker("remove") + initialized = false + } + } else { + if (!initialized) { + this.initDateTimePicker() + this.initEventHandlers() + this.refreshState() + initialized = true + } + } + } + + @Suppress("UnsafeCastFromDynamic") + protected open fun refreshState() { + value?.let { + getElementJQueryD()?.datetimepicker("update", it) + } ?: run { + getElementJQueryD()?.`val`(null) + getElementJQueryD()?.datetimepicker("update", null) + } + } + + protected open fun refreshDatePicker() { + getElementJQueryD()?.`val`(null) + getElementJQueryD()?.datetimepicker("remove") + initDateTimePicker() + refreshState() + } + + protected open fun changeValue() { + val v = getElementJQuery()?.`val`() as String? + if (v != null && v.isNotEmpty()) { + this.value = v.toDateF(format) + } else { + this.value = null + } + } + + /** + * Open date/time chooser popup. + */ + open fun showPopup() { + if (initialized) getElementJQueryD()?.datetimepicker("show") + } + + /** + * Hides date/time chooser popup. + */ + open fun hidePopup() { + if (initialized) getElementJQueryD()?.datetimepicker("hide") + } + + @Suppress("UnsafeCastFromDynamic") + override fun afterInsert(node: VNode) { + if (!this.disabled) { + this.initDateTimePicker() + this.initEventHandlers() + this.refreshState() + initialized = true + } + } + + override fun afterDestroy() { + if (initialized) { + getElementJQueryD()?.datetimepicker("remove") + initialized = false + } + } + + private fun initDateTimePicker() { + val datePickerFormat = format.toDatePickerFormat() + val minView = if (format.contains("HH") || format.contains("mm")) 0 else 2 + val maxView = if (format.contains("YY") || format.contains("M") || format.contains("D")) MAX_VIEW else 1 + val startView = if (maxView < 2) maxView else 2 + val language = I18n.language + getElementJQueryD()?.datetimepicker(obj { + this.format = datePickerFormat + this.startView = startView + this.minView = minView + this.maxView = maxView + this.minuteStep = minuteStep + this.todayHighlight = todayHighlight + this.clearBtn = clearBtn + this.todayBtn = todayBtn + this.weekStart = weekStart + this.showMeridian = showMeridian + this.daysOfWeekDisabled = daysOfWeekDisabled + this.autoclose = true + this.language = language + }) + } + + private fun initEventHandlers() { + this.getElementJQuery()?.on("changeDate") { e, _ -> + @Suppress("UnsafeCastFromDynamic") + this.dispatchEvent("change", obj { detail = e }) + } + this.getElementJQuery()?.on("show") { e, _ -> + @Suppress("UnsafeCastFromDynamic") + this.dispatchEvent("showBsDateTime", obj { detail = e }) + } + this.getElementJQuery()?.on("hide") { e, _ -> + @Suppress("UnsafeCastFromDynamic") + this.dispatchEvent("hideBsDateTime", obj { detail = e }) + } + } + + /** + * Get value of date/time input control as String + * @return value as a String + */ + fun getValueAsString(): String? { + return value?.toStringF(format) + } + + /** + * Makes the input element focused. + */ + override fun focus() { + getElementJQuery()?.focus() + } + + /** + * Makes the input element blur. + */ + override fun blur() { + getElementJQuery()?.blur() + } + + companion object { + + private fun String.toDatePickerFormat(): String { + return this.replace("YY", "yy").replace("m", "i").replace("MMMM", "{----}").replace("MMM", "{---}") + .replace("M", "m").replace("{----}", "MM").replace("{---}", "M").replace("H", "{-}") + .replace("h", "H").replace("{-}", "h").replace("D", "d").replace("a", "p").replace("A", "P") + } + + /** + * DSL builder extension function. + * + * It takes the same parameters as the constructor of the built component. + */ + fun Container.dateTimeInput( + value: Date? = null, format: String = "YYYY-MM-DD HH:mm", classes: Set = setOf(), + init: (DateTimeInput.() -> Unit)? = null + ): DateTimeInput { + val dateTimeInput = DateTimeInput(value, format, classes).apply { init?.invoke(this) } + this.add(dateTimeInput) + return dateTimeInput + } + } +} diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js new file mode 100644 index 00000000..a43b4739 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js @@ -0,0 +1,18 @@ +/** +* Arabic translation for bootstrap-datetimepicker +* Ala' Mohammad +*/ +;(function($){ + $.fn.datetimepicker.dates['ar'] = { + days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], + daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], + daysMin: ["أح", "إث", "ث", "أر", "خ", "ج", "س", "أح"], + months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], + monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], + today: "هذا اليوم", + clear: "x", + suffix: [], + meridiem: [], + rtl: true + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js new file mode 100644 index 00000000..c840d6f0 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js @@ -0,0 +1,17 @@ +/** + * Azerbaijani translation for bootstrap-datetimepicker + * Konstantin Kaluzhnikov + */ +;(function($){ + $.fn.datetimepicker.dates['az'] = { + days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə", "Bazar"], + daysShort: ["B", "Be", "Ça", "Ç", "Ca", "C", "Ş", "B"], + daysMin: ["B", "Be", "Ça", "Ç", "Ca", "C", "Ş", "B"], + months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"], + monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"], + today: "Bugün", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js new file mode 100644 index 00000000..3bc7e273 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js @@ -0,0 +1,17 @@ +/** + * Bulgarian translation for bootstrap-datetimepicker + * Apostol Apostolov + */ +;(function($){ + $.fn.datetimepicker.dates['bg'] = { + days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"], + daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб", "Нед"], + daysMin: ["Н", "П", "В", "С", "Ч", "П", "С", "Н"], + months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], + monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], + today: "днес", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js new file mode 100644 index 00000000..b46bd54f --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js @@ -0,0 +1,17 @@ +/** + * Bangla(Bangladesh) translation for bootstrap-datetimepicker + * Mahbub Rabbani + */ +;(function($){ + $.fn.datetimepicker.dates['bn'] = { + days: ["রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহষ্পতিবার", "শুক্রবার", "শনিবার", "রবিবার"], + daysShort: ["রবি", "সোম", "মঙ্গল", "বুধ", " বৃহঃ", "শুক্র", "শনি", "রবি"], + daysMin: ["রবি", "সোম", "মঙ্গ", "বুধ", "বৃহ", "শুক্র", "শনি", "রবি"], + months: ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'অগাস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর' ], + monthsShort: ['জানু', 'ফেব্রু', 'মার্চ', 'এপ্রি', 'মে', 'জুন', 'জুলা', 'অগা', 'সেপ্টে', 'অক্টো', 'নভে', 'ডিসে' ], + today: "আজ", + clear: "x", + suffix: [], + meridiem: ['পূর্বাহ্ণ', 'অপরাহ্ন'] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js new file mode 100644 index 00000000..d3137a2d --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js @@ -0,0 +1,17 @@ +/** + * Catalan translation for bootstrap-datetimepicker + * J. Garcia + */ +;(function($){ + $.fn.datetimepicker.dates['ca'] = { + days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte", "Diumenge"], + daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis", "Diu"], + daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds", "dg"], + months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], + monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], + today: "Avui", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js new file mode 100644 index 00000000..318cd5cf --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js @@ -0,0 +1,20 @@ +/** + * Czech translation for bootstrap-datetimepicker + * Matěj Koubík + * Fixes by Michal Remiš + */ +;(function($){ + $.fn.datetimepicker.dates['cs'] = { + days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota", "Neděle"], + daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob", "Ned"], + daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So", "Ne"], + months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], + monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"], + today: "Dnes", + suffix: [], + clear: "x", + meridiem: [], + weekStart: 1, + format: "dd.mm.yyyy" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js new file mode 100644 index 00000000..30d9a34a --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js @@ -0,0 +1,17 @@ +/** + * Danish translation for bootstrap-datetimepicker + * Christian Pedersen + */ +;(function($){ + $.fn.datetimepicker.dates['da'] = { + days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], + daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], + daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], + months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "I Dag", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js new file mode 100644 index 00000000..52a19060 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js @@ -0,0 +1,19 @@ +/** + * German translation for bootstrap-datetimepicker + * Sam Zurcher + */ +;(function($){ + $.fn.datetimepicker.dates['de'] = { + days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"], + daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam", "Son"], + daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"], + months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], + monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], + today: "Heute", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1, + format: "dd.mm.yyyy" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js new file mode 100644 index 00000000..882378f3 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js @@ -0,0 +1,19 @@ +/** + * Estonian translation for bootstrap-datetimepicker + * Rene Korss + */ +;(function($){ + $.fn.datetimepicker.dates['ee'] = { + days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev", "Pühapäev"], + daysShort: ["P", "E", "T", "K", "N", "R", "L", "P"], + daysMin: ["P", "E", "T", "K", "N", "R", "L", "P"], + months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"], + monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], + today: "Täna", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1, + format: "dd.mm.yyyy hh:ii" + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js new file mode 100644 index 00000000..cbbdc9a7 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js @@ -0,0 +1,16 @@ +/** +* Greek translation for bootstrap-datetimepicker +*/ +;(function($){ + $.fn.datetimepicker.dates['el'] = { + days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"], + daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"], + daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"], + months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], + monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], + today: "Σήμερα", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js new file mode 100644 index 00000000..bbf3c207 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js @@ -0,0 +1,17 @@ +/** + * Spanish translation for bootstrap-datetimepicker + * Bruno Bonamin + */ +;(function($){ + $.fn.datetimepicker.dates['es'] = { + days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"], + daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Dom"], + daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"], + months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], + monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], + today: "Hoy", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js new file mode 100644 index 00000000..95eb4a8d --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js @@ -0,0 +1,17 @@ +/** + * Finnish translation for bootstrap-datetimepicker + * Jaakko Salonen + */ +;(function($){ + $.fn.datetimepicker.dates['fi'] = { + days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"], + daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau", "sun"], + daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la", "su"], + months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], + monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"], + today: "tänään", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js new file mode 100644 index 00000000..f9194cbd --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js @@ -0,0 +1,19 @@ +/** + * French translation for bootstrap-datetimepicker + * Nico Mollet + */ +;(function($){ + $.fn.datetimepicker.dates['fr'] = { + days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"], + daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"], + daysMin: ["D", "L", "Ma", "Me", "J", "V", "S", "D"], + months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], + monthsShort: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"], + today: "Aujourd'hui", + suffix: [], + clear: "x", + meridiem: ["am", "pm"], + weekStart: 1, + format: "dd/mm/yyyy hh:ii" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js new file mode 100644 index 00000000..1060a4a7 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js @@ -0,0 +1,18 @@ +/** + * Hebrew translation for bootstrap-datetimepicker + * Sagie Maoz + */ +;(function($){ + $.fn.datetimepicker.dates['he'] = { + days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], + daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], + daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], + months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], + monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], + today: "היום", + clear: "x", + suffix: [], + meridiem: [], + rtl: true + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js new file mode 100644 index 00000000..f85540fa --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js @@ -0,0 +1,16 @@ +/** + * Croatian localisation + */ +;(function($){ + $.fn.datetimepicker.dates['hr'] = { + days: ["Nedjelja", "Ponedjelja", "Utorak", "Srijeda", "Četrtak", "Petak", "Subota", "Nedjelja"], + daysShort: ["Ned", "Pon", "Uto", "Srr", "Čet", "Pet", "Sub", "Ned"], + daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su", "Ne"], + months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], + monthsShort: ["Sije", "Velj", "Ožu", "Tra", "Svi", "Lip", "Jul", "Kol", "Ruj", "Lis", "Stu", "Pro"], + today: "Danas", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js new file mode 100644 index 00000000..5de9fe9e --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js @@ -0,0 +1,18 @@ +/** + * Hungarian translation for bootstrap-datetimepicker + * darevish + */ +;(function($){ + $.fn.datetimepicker.dates['hu'] = { + days: ["Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"], + daysShort: ["Vas", "Hét", "Ked", "Sze", "Csü", "Pén", "Szo", "Vas"], + daysMin: ["V", "H", "K", "Sze", "Cs", "P", "Szo", "V"], + months: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"], + monthsShort: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sze", "Okt", "Nov", "Dec"], + today: "Ma", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1 + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js new file mode 100644 index 00000000..cedee4db --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js @@ -0,0 +1,17 @@ +/** + * Armenian translation for bootstrap-datepicker + * Hayk Chamyan + */ +;(function($){ + $.fn.datetimepicker.dates['hy'] = { + days: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ", "Կիրակի"], + daysShort: ["Կիր", "Երկ", "Երք", "Չոր", "Հնգ", "Ուր", "Շաբ", "Կիր"], + daysMin: ["Կի", "Եկ", "Եք", "Չո", "Հի", "Ու", "Շա", "Կի"], + months: ["Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"], + monthsShort: ["Հնվ", "Փետ", "Մար", "Ապր", "Մայ", "Հուն", "Հուլ", "Օգս", "Սեպ", "Հոկ", "Նոյ", "Դեկ"], + today: "Այսօր", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js new file mode 100644 index 00000000..feef4a3b --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js @@ -0,0 +1,20 @@ +/** + * Bahasa translation for bootstrap-datetimepicker + * Azwar Akbar + * Addtional by Yulian Sutopo + */ +;(function($){ + $.fn.datetimepicker.dates['id'] = { + days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"], + daysShort: ["Mng", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Mng"], + daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa", "Mg"], + months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], + today: "Hari Ini", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1, + format: "dd/mm/yyyy hh:ii:ss" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js new file mode 100644 index 00000000..9944c6d7 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js @@ -0,0 +1,17 @@ +/** + * Icelandic translation for bootstrap-datetimepicker + * Hinrik Örn Sigurðsson + */ +;(function($){ + $.fn.datetimepicker.dates['is'] = { + days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur", "Sunnudagur"], + daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau", "Sun"], + daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La", "Su"], + months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], + today: "Í Dag", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js new file mode 100644 index 00000000..c00a0499 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js @@ -0,0 +1,19 @@ +/** + * Italian translation for bootstrap-datetimepicker + * Enrico Rubboli + */ +;(function($){ + $.fn.datetimepicker.dates['it'] = { + days: ["Domenica", "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato", "Domenica"], + daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Dom"], + daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa", "Do"], + months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + today: "Oggi", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1, + format: "dd/mm/yyyy hh:ii:ss" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js new file mode 100644 index 00000000..3a2d3b9b --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js @@ -0,0 +1,17 @@ +/** + * Japanese translation for bootstrap-datetimepicker + * Norio Suzuki + */ +;(function($){ + $.fn.datetimepicker.dates['ja'] = { + days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜", "日曜"], + daysShort: ["日", "月", "火", "水", "木", "金", "土", "日"], + daysMin: ["日", "月", "火", "水", "木", "金", "土", "日"], + months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + today: "今日", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js new file mode 100644 index 00000000..d4595eff --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js @@ -0,0 +1,17 @@ +/** + * Georgian translation for bootstrap-datetimepicker + * Zura Jijavadze + */ +;(function($){ + $.fn.datetimepicker.dates['ka'] = { + days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი", "კვირა"], + daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ", "კვი"], + daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა", "კვ"], + months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], + monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], + today: "დღეს", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js new file mode 100644 index 00000000..adeb6cb6 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js @@ -0,0 +1,18 @@ +/** + * Korean translation for bootstrap-datetimepicker + * Gu Youn + * Baekjoon Choi + */ +;(function($){ + $.fn.datetimepicker.dates['ko'] = { + days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"], + daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"], + daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"], + months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], + monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], + suffix: [], + meridiem: ["오전", "오후"], + today: "오늘", + clear: "x" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js new file mode 100644 index 00000000..917243c4 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js @@ -0,0 +1,19 @@ +/** + * Lithuanian translation for bootstrap-datetimepicker + * Šarūnas Gliebus + */ + +;(function($){ + $.fn.datetimepicker.dates['lt'] = { + days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis", "Sekmadienis"], + daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š", "S"], + daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št", "Sk"], + months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"], + monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"], + today: "Šiandien", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1 + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js new file mode 100644 index 00000000..f9b3c774 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js @@ -0,0 +1,19 @@ +/** + * Latvian translation for bootstrap-datetimepicker + * Artis Avotins + */ + +;(function($){ + $.fn.datetimepicker.dates['lv'] = { + days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"], + daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"], + daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"], + months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."], + today: "Šodien", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1 + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js new file mode 100644 index 00000000..26a2cc0e --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js @@ -0,0 +1,17 @@ +/** + * Malay translation for bootstrap-datetimepicker + * Ateman Faiz + */ +;(function($){ + $.fn.datetimepicker.dates['ms'] = { + days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu", "Ahad"], + daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab", "Aha"], + daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa", "Ah"], + months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], + today: "Hari Ini", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js new file mode 100644 index 00000000..a2fd01a6 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js @@ -0,0 +1,17 @@ +/** + * Norwegian (bokmål) translation for bootstrap-datetimepicker + * Fredrik Sundmyhr + */ +;(function($){ + $.fn.datetimepicker.dates['nb'] = { + days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], + daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], + daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], + months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], + today: "I Dag", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js new file mode 100644 index 00000000..a28fa031 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js @@ -0,0 +1,17 @@ +/** + * Dutch translation for bootstrap-datetimepicker + * Reinier Goltstein + */ +;(function($){ + $.fn.datetimepicker.dates['nl'] = { + days: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"], + daysShort: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"], + daysMin: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"], + months: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "Vandaag", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js new file mode 100644 index 00000000..36e33a0b --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js @@ -0,0 +1,17 @@ +/** + * Norwegian translation for bootstrap-datetimepicker + * Rune Warhuus + */ +;(function($){ + $.fn.datetimepicker.dates['no'] = { + days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], + daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], + daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], + months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], + today: "I Dag", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js new file mode 100644 index 00000000..12fc7422 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js @@ -0,0 +1,18 @@ +/** + * Polish translation for bootstrap-datetimepicker + * Robert + */ +;(function($){ +$.fn.datetimepicker.dates['pl'] = { + days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"], + daysShort: ["Nie", "Pn", "Wt", "Śr", "Czw", "Pt", "So", "Nie"], + daysMin: ["N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"], + months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], + monthsShort: ["Sty", "Lu", "Mar", "Kw", "Maj", "Cze", "Lip", "Sie", "Wrz", "Pa", "Lis", "Gru"], + today: "Dzisiaj", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1 +}; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js new file mode 100644 index 00000000..1d307416 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js @@ -0,0 +1,18 @@ +/** + * Brazilian translation for bootstrap-datetimepicker + * Cauan Cabral + */ +;(function($){ + $.fn.datetimepicker.dates['pt-BR'] = { + format: 'dd/mm/yyyy', + days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"], + daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"], + daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"], + months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], + monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], + today: "Hoje", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js new file mode 100644 index 00000000..166034ef --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js @@ -0,0 +1,18 @@ +/** + * Portuguese translation for bootstrap-datetimepicker + * Original code: Cauan Cabral + * Tiago Melo + */ +;(function($){ + $.fn.datetimepicker.dates['pt'] = { + days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"], + daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"], + daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"], + months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], + monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], + suffix: [], + meridiem: [], + today: "Hoje", + clear: "x" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js new file mode 100644 index 00000000..a7569c6f --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js @@ -0,0 +1,18 @@ +/** + * Romanian translation for bootstrap-datetimepicker + * Cristian Vasile + */ +;(function($){ + $.fn.datetimepicker.dates['ro'] = { + days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă", "Duminică"], + daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm", "Dum"], + daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ", "Du"], + months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], + monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Astăzi", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1 + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js new file mode 100644 index 00000000..57c819f9 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js @@ -0,0 +1,17 @@ +/** + * Serbian latin translation for bootstrap-datetimepicker + * Bojan Milosavlević + */ +;(function($){ + $.fn.datetimepicker.dates['rs'] = { + days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota", "Nedelja"], + daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub", "Ned"], + daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su", "N"], + months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danas", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js new file mode 100644 index 00000000..3e9db3e6 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js @@ -0,0 +1,17 @@ +/** + * Serbian cyrillic translation for bootstrap-datetimepicker + * Bojan Milosavlević + */ +;(function($){ + $.fn.datetimepicker.dates['rs'] = { + days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота", "Недеља"], + daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб", "Нед"], + daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су", "Н"], + months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], + monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], + today: "Данас", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js new file mode 100644 index 00000000..20caf251 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js @@ -0,0 +1,17 @@ +/** + * Russian translation for bootstrap-datetimepicker + * Victor Taranenko + */ +;(function($){ + $.fn.datetimepicker.dates['ru'] = { + days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"], + daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Вск"], + daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], + months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], + monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], + today: "Сегодня", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js new file mode 100644 index 00000000..acf1495a --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js @@ -0,0 +1,20 @@ +/** + * Slovak translation for bootstrap-datetimepicker + * Marek Lichtner + * Fixes by Michal Remiš + */ +;(function($){ + $.fn.datetimepicker.dates["sk"] = { + days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota", "Nedeľa"], + daysShort: ["Ned", "Pon", "Uto", "Str", "Štv", "Pia", "Sob", "Ned"], + daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So", "Ne"], + months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "Dnes", + clear: "x", + suffix: [], + meridiem: [], + weekStart: 1, + format: "dd.mm.yyyy" + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js new file mode 100644 index 00000000..a7e58bdf --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js @@ -0,0 +1,17 @@ +/** + * Slovene translation for bootstrap-datetimepicker + * Gregor Rudolf + */ +;(function($){ + $.fn.datetimepicker.dates['sl'] = { + days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota", "Nedelja"], + daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob", "Ned"], + daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So", "Ne"], + months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danes", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js new file mode 100644 index 00000000..050125ad --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js @@ -0,0 +1,17 @@ +/** + * Swedish translation for bootstrap-datetimepicker + * Patrik Ragnarsson + */ +;(function($){ + $.fn.datetimepicker.dates['sv'] = { + days: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag", "Söndag"], + daysShort: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör", "Sön"], + daysMin: ["Sö", "Må", "Ti", "On", "To", "Fr", "Lö", "Sö"], + months: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "I Dag", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js new file mode 100644 index 00000000..8cdb4df2 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js @@ -0,0 +1,18 @@ +/** + * Swahili translation for bootstrap-datetimepicker + * Edwin Mugendi + * Source: http://scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku + */ +;(function($){ + $.fn.datetimepicker.dates['sw'] = { + days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi", "Jumapili"], + daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1", "J2"], + daysMin: ["2", "3", "4", "5", "A", "I", "1", "2"], + months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], + monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], + today: "Leo", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js new file mode 100644 index 00000000..8adc129a --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js @@ -0,0 +1,17 @@ +/** + * Thai translation for bootstrap-datetimepicker + * Suchau Jiraprapot + */ +;(function($){ + $.fn.datetimepicker.dates['th'] = { + days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], + daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], + daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], + months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], + monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], + today: "วันนี้", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js new file mode 100644 index 00000000..0130c94c --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js @@ -0,0 +1,18 @@ +/** + * Turkish translation for bootstrap-datetimepicker + * Serkan Algur + */ +;(function($){ + $.fn.datetimepicker.dates['tr'] = { + days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi", "Pazar"], + daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts", "Pz"], + daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct", "Pz"], + months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], + monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], + today: "Bugün", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); + diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js new file mode 100644 index 00000000..1687a1dc --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js @@ -0,0 +1,16 @@ +/** + * Ukrainian translation for bootstrap-datepicker + * Igor Polynets + */ +;(function($){ + $.fn.datetimepicker.dates['ua'] = { + days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четверг", "П'ятниця", "Субота", "Неділя"], + daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], + daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], + months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], + monthsShort: ["Січ", "Лют", "Бер", "Квт", "Трв", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Грд"], + today: "Сьогодні", + clear: "x", + weekStart: 1 + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js new file mode 100644 index 00000000..4b3a9e0a --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js @@ -0,0 +1,17 @@ +/** + * Ukrainian translation for bootstrap-datetimepicker + * Andrey Vityuk + */ +;(function($){ + $.fn.datetimepicker.dates['uk'] = { + days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"], + daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], + daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], + months: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], + monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], + today: "Сьогодні", + clear: "x", + suffix: [], + meridiem: [] + }; +}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js new file mode 100644 index 00000000..f84ba548 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js @@ -0,0 +1,17 @@ +/** + * Traditional Chinese translation for bootstrap-datetimepicker + * Rung-Sheng Jang + */ +;(function($){ + $.fn.datetimepicker.dates['zh-TW'] = { + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], + daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"], + daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + today: "今天", + clear: "x", + suffix: [], + meridiem: ["上午", "下午"] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js new file mode 100644 index 00000000..66ac5a01 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js @@ -0,0 +1,17 @@ +/** + * Simplified Chinese translation for bootstrap-datetimepicker + * Yuan Cheung + */ +;(function($){ + $.fn.datetimepicker.dates['zh'] = { + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], + daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"], + daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + today: "今天", + clear: "x", + suffix: [], + meridiem: ["上午", "下午"] + }; +}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt new file mode 100644 index 00000000..13c8531b --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package test.pl.treksoft.kvision + +import org.w3c.dom.Element +import pl.treksoft.jquery.jQuery +import pl.treksoft.kvision.core.Widget +import pl.treksoft.kvision.panel.Root +import kotlin.browser.document +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +interface TestSpec { + fun beforeTest() + + fun afterTest() + + fun run(code: () -> Unit) { + beforeTest() + code() + afterTest() + } +} + +interface SimpleSpec : TestSpec { + + override fun beforeTest() { + } + + override fun afterTest() { + } + +} + +interface DomSpec : TestSpec { + + override fun beforeTest() { + val fixture = "
" + + "
" + document.body?.insertAdjacentHTML("afterbegin", fixture) + } + + override fun afterTest() { + val div = document.getElementById("pretest") + div?.let { jQuery(it).remove() } + jQuery(".modal-backdrop").remove() + Root.shutdown() + } + + fun assertEqualsHtml(expected: String?, actual: String?, message: String?) { + if (expected != null && actual != null) { + val exp = jQuery(expected) + val act = jQuery(actual) + val result = exp[0]?.isEqualNode(act[0]) + if (result == true) { + assertTrue(result == true, message) + } else { + assertEquals(expected, actual, message) + } + } else { + assertEquals(expected, actual, message) + } + } +} + +interface WSpec : DomSpec { + + fun runW(code: (widget: Widget, element: Element?) -> Unit) { + run { + val root = Root("test", fixed = true) + val widget = Widget() + widget.id = "test_id" + root.add(widget) + val element = document.getElementById("test_id") + code(widget, element) + } + } + +} + +external fun require(name: String): dynamic diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt new file mode 100644 index 00000000..877cf650 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package test.pl.treksoft.kvision.form.time + +import pl.treksoft.kvision.form.time.DateTimeInput +import pl.treksoft.kvision.panel.Root +import pl.treksoft.kvision.types.toStringF +import test.pl.treksoft.kvision.DomSpec +import kotlin.js.Date +import kotlin.test.Test +import kotlin.test.assertEquals + +class DateTimeInputSpec : DomSpec { + + @Test + fun render() { + run { + val root = Root("test", fixed = true) + val data = Date() + val dti = DateTimeInput(value = data).apply { + placeholder = "place" + id = "idti" + } + root.add(dti) + val value = dti.getElementJQuery()?.`val`() + assertEquals( + data.toStringF(dti.format), + value, + "Should render date time input with correctly formatted value" + ) + } + } + +} \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt new file mode 100644 index 00000000..eba3ef74 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package test.pl.treksoft.kvision.form.time + +import pl.treksoft.kvision.form.time.DateTime +import pl.treksoft.kvision.panel.Root +import pl.treksoft.kvision.types.toStringF +import test.pl.treksoft.kvision.DomSpec +import kotlin.browser.document +import kotlin.js.Date +import kotlin.test.Test + +class DateTimeSpec : DomSpec { + + @Test + fun render() { + run { + val root = Root("test", fixed = true) + val data = Date() + val ti = DateTime(value = data, label = "Label").apply { + placeholder = "place" + name = "name" + disabled = true + } + root.add(ti) + val element = document.getElementById("test") + val id = ti.input.id + val datastr = data.toStringF(ti.format) + assertEqualsHtml( + "
", + element?.innerHTML, + "Should render correct date time input form control" + ) + ti.validatorError = "Validation Error" + assertEqualsHtml( + "
Validation Error
", + element?.innerHTML, + "Should render correct date time input form control with validation error" + ) + } + } + +} \ No newline at end of file -- cgit From aeaa30256e49389662c45199cb1b3b201ffe2efe Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 5 Oct 2019 00:25:42 +0200 Subject: Updated DateTime form control (#89) --- .../kvision-bootstrap-datetime/build.gradle | 2 +- .../pl/treksoft/kvision/KVManagerDatetime.kt | 43 +-- .../pl/treksoft/kvision/form/time/DateTime.kt | 91 ++++-- .../pl/treksoft/kvision/form/time/DateTimeInput.kt | 330 ++++++++++++--------- .../bootstrap-datetimepicker.ar.js | 18 -- .../bootstrap-datetimepicker.az.js | 17 -- .../bootstrap-datetimepicker.bg.js | 17 -- .../bootstrap-datetimepicker.bn.js | 17 -- .../bootstrap-datetimepicker.ca.js | 17 -- .../bootstrap-datetimepicker.cs.js | 20 -- .../bootstrap-datetimepicker.da.js | 17 -- .../bootstrap-datetimepicker.de.js | 19 -- .../bootstrap-datetimepicker.ee.js | 19 -- .../bootstrap-datetimepicker.el.js | 16 - .../bootstrap-datetimepicker.es.js | 17 -- .../bootstrap-datetimepicker.fi.js | 17 -- .../bootstrap-datetimepicker.fr.js | 19 -- .../bootstrap-datetimepicker.he.js | 18 -- .../bootstrap-datetimepicker.hr.js | 16 - .../bootstrap-datetimepicker.hu.js | 18 -- .../bootstrap-datetimepicker.hy.js | 17 -- .../bootstrap-datetimepicker.id.js | 20 -- .../bootstrap-datetimepicker.is.js | 17 -- .../bootstrap-datetimepicker.it.js | 19 -- .../bootstrap-datetimepicker.ja.js | 17 -- .../bootstrap-datetimepicker.ka.js | 17 -- .../bootstrap-datetimepicker.ko.js | 18 -- .../bootstrap-datetimepicker.lt.js | 19 -- .../bootstrap-datetimepicker.lv.js | 19 -- .../bootstrap-datetimepicker.ms.js | 17 -- .../bootstrap-datetimepicker.nb.js | 17 -- .../bootstrap-datetimepicker.nl.js | 17 -- .../bootstrap-datetimepicker.no.js | 17 -- .../bootstrap-datetimepicker.pl.js | 18 -- .../bootstrap-datetimepicker.pt-BR.js | 18 -- .../bootstrap-datetimepicker.pt.js | 18 -- .../bootstrap-datetimepicker.ro.js | 18 -- .../bootstrap-datetimepicker.rs-latin.js | 17 -- .../bootstrap-datetimepicker.rs.js | 17 -- .../bootstrap-datetimepicker.ru.js | 17 -- .../bootstrap-datetimepicker.sk.js | 20 -- .../bootstrap-datetimepicker.sl.js | 17 -- .../bootstrap-datetimepicker.sv.js | 17 -- .../bootstrap-datetimepicker.sw.js | 18 -- .../bootstrap-datetimepicker.th.js | 17 -- .../bootstrap-datetimepicker.tr.js | 18 -- .../bootstrap-datetimepicker.ua.js | 16 - .../bootstrap-datetimepicker.uk.js | 17 -- .../bootstrap-datetimepicker.zh-TW.js | 17 -- .../bootstrap-datetimepicker.zh.js | 17 -- .../pl/treksoft/kvision/KVManagerBootstrap.kt | 1 - .../src/main/resources/css/kvbootstrap.css | 4 + src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 2 +- 53 files changed, 262 insertions(+), 1021 deletions(-) delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js delete mode 100644 kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js (limited to 'kvision-modules/kvision-bootstrap-datetime/src') diff --git a/kvision-modules/kvision-bootstrap-datetime/build.gradle b/kvision-modules/kvision-bootstrap-datetime/build.gradle index fb440934..8cb14799 100644 --- a/kvision-modules/kvision-bootstrap-datetime/build.gradle +++ b/kvision-modules/kvision-bootstrap-datetime/build.gradle @@ -7,7 +7,7 @@ dependencies { kotlinFrontend { npm { - dependency("bootstrap-datetime-picker", "2.4.4") + dependency("pc-bootstrap4-datetimepicker", "4.17.50") } } diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt index 41f8620f..c02a116d 100644 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/KVManagerDatetime.kt @@ -28,47 +28,8 @@ internal val kVManagerDatetimeInit = KVManagerDatetime.init() */ internal object KVManagerDatetime { init { - require("bootstrap-datetime-picker/css/bootstrap-datetimepicker.min.css") - require("bootstrap-datetime-picker/js/bootstrap-datetimepicker.min.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js") - require("./js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js") + require("pc-bootstrap4-datetimepicker/build/css/bootstrap-datetimepicker.min.css") + require("pc-bootstrap4-datetimepicker/build/js/bootstrap-datetimepicker.min.js") } internal fun init() {} diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt index 7fb35057..b7cf18ec 100644 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt @@ -86,14 +86,6 @@ open class DateTime( set(value) { input.readonly = value } - /** - * Day of the week start. 0 (Sunday) to 6 (Saturday). - */ - var weekStart - get() = input.weekStart - set(value) { - input.weekStart = value - } /** * Days of the week that should be disabled. Multiple values should be comma separated. */ @@ -105,42 +97,82 @@ open class DateTime( /** * Determines if *Clear* button should be visible. */ - var clearBtn - get() = input.clearBtn + var showClear + get() = input.showClear set(value) { - input.clearBtn = value + input.showClear = value } /** - * Determines if *Today* button should be visible. + * Determines if *Close* button should be visible. */ - var todayBtn - get() = input.todayBtn + var showClose + get() = input.showClose set(value) { - input.todayBtn = value + input.showClose = value } /** - * Determines if the current day should be highlighted. + * Determines if *Today* button should be visible. */ - var todayHighlight - get() = input.todayHighlight + var showTodayButton + get() = input.showTodayButton set(value) { - input.todayHighlight = value + input.showTodayButton = value } /** * The increment used to build the hour view. */ - var minuteStep - get() = input.minuteStep + var stepping + get() = input.stepping + set(value) { + input.stepping = value + } + /** + * Prevents date selection before this date. + */ + var minDate + get() = input.minDate + set(value) { + input.minDate = value + } + /** + * Prevents date selection after this date. + */ + var maxDate + get() = input.maxDate + set(value) { + input.maxDate = value + } + /** + * Shows date and time pickers side by side. + */ + var sideBySide + get() = input.sideBySide + set(value) { + input.sideBySide = value + } + /** + * An array of enabled dates. + */ + var enabledDates + get() = input.enabledDates set(value) { - input.minuteStep = value + input.enabledDates = value } /** - * Determines if meridian views are visible in day and hour views. + * An array of disabled dates. */ - var showMeridian - get() = input.showMeridian + var disabledDates + get() = input.disabledDates set(value) { - input.showMeridian = value + input.disabledDates = value + } + /** + * Allow date picker for readonly component.. + */ + var ignoreReadonly + get() = input.ignoreReadonly + set(value) { + input.ignoreReadonly = value } /** * The label text bound to the input element. @@ -214,6 +246,13 @@ open class DateTime( input.hidePopup() } + /** + * Toggle date/time chooser popup. + */ + open fun togglePopup() { + input.togglePopup() + } + override fun getValueAsString(): String? { return input.getValueAsString() } diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt index 66cb6cc0..e0da98f8 100644 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt @@ -24,19 +24,20 @@ package pl.treksoft.kvision.form.time import com.github.snabbdom.VNode import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.StringBoolPair -import pl.treksoft.kvision.core.StringPair -import pl.treksoft.kvision.core.Widget import pl.treksoft.kvision.form.FormInput -import pl.treksoft.kvision.form.InputSize -import pl.treksoft.kvision.form.ValidationStatus +import pl.treksoft.kvision.form.text.TextInput +import pl.treksoft.kvision.html.Div +import pl.treksoft.kvision.html.Icon +import pl.treksoft.kvision.html.Icon.Companion.icon +import pl.treksoft.kvision.html.Span.Companion.span import pl.treksoft.kvision.i18n.I18n +import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.types.toDateF import pl.treksoft.kvision.types.toStringF import pl.treksoft.kvision.utils.obj import kotlin.js.Date -internal const val DEFAULT_MINUTE_STEP = 5 -internal const val MAX_VIEW = 4 +internal const val DEFAULT_STEPPING = 5 /** * Basic date/time chooser component. @@ -50,22 +51,32 @@ internal const val MAX_VIEW = 4 open class DateTimeInput( value: Date? = null, format: String = "YYYY-MM-DD HH:mm", classes: Set = setOf() -) : Widget(classes + "form-control"), FormInput { +) : SimplePanel(classes + "input-group" + "date"), FormInput { private var initialized = false - init { - this.setInternalEventListener { - change = { - self.changeValue() - } + internal val input = TextInput(value = value?.toStringF(format)) + private lateinit var icon: Icon + private val addon = Div(classes = setOf("input-group-append")) { + span(classes = setOf("input-group-text", "datepickerbutton")) { + icon = icon(getIconClass(format)) } } + init { + addInternal(input) + addInternal(addon) + } + /** * Date/time input value. */ - var value by refreshOnUpdate(value) { refreshState() } + var value + get() = input.value?.toDateF(format) + set(value) { + input.value = value?.toStringF(format) + refreshState() + } /** * Date/time format. */ @@ -73,35 +84,60 @@ open class DateTimeInput( /** * The placeholder for the date/time input. */ - var placeholder: String? by refreshOnUpdate() + var placeholder + get() = input.placeholder + set(value) { + input.placeholder = value + } /** * The name attribute of the generated HTML input element. */ - override var name: String? by refreshOnUpdate() + override var name + get() = input.name + set(value) { + input.name = value + } /** * Determines if the field is disabled. */ - override var disabled by refreshOnUpdate(false) { refresh(); checkDisabled() } + override var disabled + get() = input.disabled + set(value) { + input.disabled = value + } /** * Determines if the text input is automatically focused. */ - var autofocus: Boolean? by refreshOnUpdate() + var autofocus + get() = input.autofocus + set(value) { + input.autofocus = value + } /** * Determines if the date/time input is read-only. */ - var readonly: Boolean? by refreshOnUpdate() + var readonly + get() = input.readonly + set(value) { + input.readonly = value + } /** * The size of the input. */ - override var size: InputSize? by refreshOnUpdate() + override var size + get() = input.size + set(value) { + input.size = value + } /** * The validation status of the input. */ - override var validationStatus: ValidationStatus? by refreshOnUpdate() - /** - * Day of the week start. 0 (Sunday) to 6 (Saturday). - */ - var weekStart by refreshOnUpdate(0) { refreshDatePicker() } + override var validationStatus + get() = input.validationStatus + set(value) { + input.validationStatus = value + refresh() + } /** * Days of the week that should be disabled. Multiple values should be comma separated. */ @@ -109,26 +145,54 @@ open class DateTimeInput( /** * Determines if *Clear* button should be visible. */ - var clearBtn by refreshOnUpdate(true) { refreshDatePicker() } + var showClear by refreshOnUpdate(true) { refreshDatePicker() } /** - * Determines if *Today* button should be visible. + * Determines if *Close* button should be visible. */ - var todayBtn by refreshOnUpdate(false) { refreshDatePicker() } + var showClose by refreshOnUpdate(true) { refreshDatePicker() } /** - * Determines if the current day should be highlighted. + * Determines if *Today* button should be visible. */ - var todayHighlight by refreshOnUpdate(false) { refreshDatePicker() } + var showTodayButton by refreshOnUpdate(true) { refreshDatePicker() } /** * The increment used to build the hour view. */ - var minuteStep by refreshOnUpdate(DEFAULT_MINUTE_STEP) { refreshDatePicker() } + var stepping by refreshOnUpdate(DEFAULT_STEPPING) { refreshDatePicker() } + /** + * Prevents date selection before this date. + */ + var minDate: Date? by refreshOnUpdate { refreshDatePicker() } /** - * Determines if meridian views are visible in day and hour views. + * Prevents date selection after this date. */ - var showMeridian by refreshOnUpdate(false) { refreshDatePicker() } + var maxDate: Date? by refreshOnUpdate { refreshDatePicker() } + /** + * Shows date and time pickers side by side. + */ + var sideBySide by refreshOnUpdate(false) { refreshDatePicker() } + /** + * An array of enabled dates. + */ + var enabledDates by refreshOnUpdate(arrayOf()) { refreshDatePicker() } + /** + * An array of disabled dates. + */ + var disabledDates by refreshOnUpdate(arrayOf()) { refreshDatePicker() } + /** + * Allow date picker for readonly component. + */ + var ignoreReadonly by refreshOnUpdate(false) { refreshDatePicker() } - override fun render(): VNode { - return render("input") + private fun refreshState() { + if (initialized) getElementJQueryD().data("DateTimePicker").date(value) + } + + private fun getIconClass(format: String): String { + return if (format.contains("YYYY") || format.contains("MM") || format.contains("DD")) { + "fas fa-calendar-alt" + } else { + "fas fa-clock" + } } override fun getSnClass(): List { @@ -136,146 +200,137 @@ open class DateTimeInput( validationStatus?.let { cl.add(it.className to true) } - size?.let { - cl.add(it.className to true) - } return cl } - override fun getSnAttrs(): List { - val sn = super.getSnAttrs().toMutableList() - sn.add("type" to "text") - placeholder?.let { - sn.add("placeholder" to translate(it)) - } - name?.let { - sn.add("name" to it) - } - autofocus?.let { - if (it) { - sn.add("autofocus" to "autofocus") - } - } - readonly?.let { - if (it) { - sn.add("readonly" to "readonly") - } - } - if (disabled) { - sn.add("disabled" to "disabled") - value?.let { - sn.add("value" to it.toStringF(format)) - } - } - return sn - } - - private fun checkDisabled() { - if (disabled) { - if (initialized) { - getElementJQueryD()?.datetimepicker("remove") - initialized = false - } - } else { - if (!initialized) { - this.initDateTimePicker() - this.initEventHandlers() - this.refreshState() - initialized = true - } - } - } - - @Suppress("UnsafeCastFromDynamic") - protected open fun refreshState() { - value?.let { - getElementJQueryD()?.datetimepicker("update", it) - } ?: run { - getElementJQueryD()?.`val`(null) - getElementJQueryD()?.datetimepicker("update", null) - } - } - protected open fun refreshDatePicker() { - getElementJQueryD()?.`val`(null) - getElementJQueryD()?.datetimepicker("remove") - initDateTimePicker() - refreshState() - } - - protected open fun changeValue() { - val v = getElementJQuery()?.`val`() as String? - if (v != null && v.isNotEmpty()) { - this.value = v.toDateF(format) - } else { - this.value = null + if (initialized) { + getElementJQueryD()?.data("DateTimePicker").destroy() } + initDateTimePicker() + icon.icon = getIconClass(format) } /** * Open date/time chooser popup. */ open fun showPopup() { - if (initialized) getElementJQueryD()?.datetimepicker("show") + if (initialized) getElementJQueryD()?.data("DateTimePicker").show() } /** * Hides date/time chooser popup. */ open fun hidePopup() { - if (initialized) getElementJQueryD()?.datetimepicker("hide") + if (initialized) getElementJQueryD()?.data("DateTimePicker").hide() + } + + /** + * Toggles date/time chooser popup. + */ + open fun togglePopup() { + if (initialized) getElementJQueryD()?.data("DateTimePicker").toggle() } @Suppress("UnsafeCastFromDynamic") override fun afterInsert(node: VNode) { - if (!this.disabled) { - this.initDateTimePicker() - this.initEventHandlers() - this.refreshState() - initialized = true - } + this.initDateTimePicker() + this.initEventHandlers() + initialized = true } override fun afterDestroy() { if (initialized) { - getElementJQueryD()?.datetimepicker("remove") + getElementJQueryD()?.data("DateTimePicker").destroy() initialized = false } } private fun initDateTimePicker() { - val datePickerFormat = format.toDatePickerFormat() - val minView = if (format.contains("HH") || format.contains("mm")) 0 else 2 - val maxView = if (format.contains("YY") || format.contains("M") || format.contains("D")) MAX_VIEW else 1 - val startView = if (maxView < 2) maxView else 2 val language = I18n.language + val self = this getElementJQueryD()?.datetimepicker(obj { - this.format = datePickerFormat - this.startView = startView - this.minView = minView - this.maxView = maxView - this.minuteStep = minuteStep - this.todayHighlight = todayHighlight - this.clearBtn = clearBtn - this.todayBtn = todayBtn - this.weekStart = weekStart - this.showMeridian = showMeridian - this.daysOfWeekDisabled = daysOfWeekDisabled - this.autoclose = true - this.language = language + this.useCurrent = false + this.format = format + this.stepping = stepping + this.showClear = showClear + this.showClose = showClose + this.showTodayButton = showTodayButton + this.sideBySide = sideBySide + this.ignoreReadonly = ignoreReadonly + if (minDate != null) this.minDate = minDate + if (maxDate != null) this.maxDate = maxDate + if (daysOfWeekDisabled.isNotEmpty()) this.daysOfWeekDisabled = daysOfWeekDisabled + if (enabledDates.isNotEmpty()) this.enabledDates = enabledDates + if (disabledDates.isNotEmpty()) this.disabledDates = disabledDates + this.locale = language + this.icons = obj { + this.time = "far fa-clock" + this.date = "far fa-calendar" + this.up = "fas fa-arrow-up" + this.down = "fas fa-arrow-down" + this.previous = "fas fa-chevron-left" + this.next = "fas fa-chevron-right" + this.today = "fas fa-calendar-check" + this.clear = "far fa-trash-alt" + this.close = "far fa-times-circle" + } + this.tooltips = obj { + this.today = "" + this.clear = "" + this.close = "" + this.selectMonth = "" + this.prevMonth = "" + this.nextMonth = "" + this.selectYear = "" + this.prevYear = "" + this.nextYear = "" + this.selectDecade = "" + this.prevDecade = "" + this.nextDecade = "" + this.prevCentury = "" + this.nextCentury = "" + this.pickHour = "" + this.incrementHour = "" + this.decrementHour = "" + this.pickMinute = "" + this.incrementMinute = "" + this.decrementMinute = "" + this.pickSecond = "" + this.incrementSecond = "" + this.decrementSecond = "" + this.togglePeriod = "" + this.selectTime = "" + } + this.keyBinds = obj { + enter = { + self.togglePopup() + } + } }) } private fun initEventHandlers() { - this.getElementJQuery()?.on("changeDate") { e, _ -> + this.getElementJQuery()?.on("dp.change") { e, _ -> + val moment = e.asDynamic().date + if (moment) { + this.value = moment.toDate() + } else { + this.value = null + } @Suppress("UnsafeCastFromDynamic") this.dispatchEvent("change", obj { detail = e }) } - this.getElementJQuery()?.on("show") { e, _ -> + this.getElementJQuery()?.on("dp.error") { e, _ -> + this.value = null + @Suppress("UnsafeCastFromDynamic") + this.dispatchEvent("change", obj { detail = e }) + } + this.getElementJQuery()?.on("dp.show") { e, _ -> @Suppress("UnsafeCastFromDynamic") this.dispatchEvent("showBsDateTime", obj { detail = e }) } - this.getElementJQuery()?.on("hide") { e, _ -> + this.getElementJQuery()?.on("dp.hide") { e, _ -> @Suppress("UnsafeCastFromDynamic") this.dispatchEvent("hideBsDateTime", obj { detail = e }) } @@ -293,24 +348,17 @@ open class DateTimeInput( * Makes the input element focused. */ override fun focus() { - getElementJQuery()?.focus() + input.focus() } /** * Makes the input element blur. */ override fun blur() { - getElementJQuery()?.blur() + input.blur() } companion object { - - private fun String.toDatePickerFormat(): String { - return this.replace("YY", "yy").replace("m", "i").replace("MMMM", "{----}").replace("MMM", "{---}") - .replace("M", "m").replace("{----}", "MM").replace("{---}", "M").replace("H", "{-}") - .replace("h", "H").replace("{-}", "h").replace("D", "d").replace("a", "p").replace("A", "P") - } - /** * DSL builder extension function. * diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js deleted file mode 100644 index a43b4739..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ar.js +++ /dev/null @@ -1,18 +0,0 @@ -/** -* Arabic translation for bootstrap-datetimepicker -* Ala' Mohammad -*/ -;(function($){ - $.fn.datetimepicker.dates['ar'] = { - days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], - daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], - daysMin: ["أح", "إث", "ث", "أر", "خ", "ج", "س", "أح"], - months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], - monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], - today: "هذا اليوم", - clear: "x", - suffix: [], - meridiem: [], - rtl: true - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js deleted file mode 100644 index c840d6f0..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.az.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Azerbaijani translation for bootstrap-datetimepicker - * Konstantin Kaluzhnikov - */ -;(function($){ - $.fn.datetimepicker.dates['az'] = { - days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə", "Bazar"], - daysShort: ["B", "Be", "Ça", "Ç", "Ca", "C", "Ş", "B"], - daysMin: ["B", "Be", "Ça", "Ç", "Ca", "C", "Ş", "B"], - months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"], - monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"], - today: "Bugün", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js deleted file mode 100644 index 3bc7e273..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bg.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Bulgarian translation for bootstrap-datetimepicker - * Apostol Apostolov - */ -;(function($){ - $.fn.datetimepicker.dates['bg'] = { - days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"], - daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб", "Нед"], - daysMin: ["Н", "П", "В", "С", "Ч", "П", "С", "Н"], - months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], - monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], - today: "днес", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js deleted file mode 100644 index b46bd54f..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.bn.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Bangla(Bangladesh) translation for bootstrap-datetimepicker - * Mahbub Rabbani - */ -;(function($){ - $.fn.datetimepicker.dates['bn'] = { - days: ["রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহষ্পতিবার", "শুক্রবার", "শনিবার", "রবিবার"], - daysShort: ["রবি", "সোম", "মঙ্গল", "বুধ", " বৃহঃ", "শুক্র", "শনি", "রবি"], - daysMin: ["রবি", "সোম", "মঙ্গ", "বুধ", "বৃহ", "শুক্র", "শনি", "রবি"], - months: ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'অগাস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর' ], - monthsShort: ['জানু', 'ফেব্রু', 'মার্চ', 'এপ্রি', 'মে', 'জুন', 'জুলা', 'অগা', 'সেপ্টে', 'অক্টো', 'নভে', 'ডিসে' ], - today: "আজ", - clear: "x", - suffix: [], - meridiem: ['পূর্বাহ্ণ', 'অপরাহ্ন'] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js deleted file mode 100644 index d3137a2d..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ca.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Catalan translation for bootstrap-datetimepicker - * J. Garcia - */ -;(function($){ - $.fn.datetimepicker.dates['ca'] = { - days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte", "Diumenge"], - daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis", "Diu"], - daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds", "dg"], - months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], - monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], - today: "Avui", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js deleted file mode 100644 index 318cd5cf..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.cs.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Czech translation for bootstrap-datetimepicker - * Matěj Koubík - * Fixes by Michal Remiš - */ -;(function($){ - $.fn.datetimepicker.dates['cs'] = { - days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota", "Neděle"], - daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob", "Ned"], - daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So", "Ne"], - months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], - monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"], - today: "Dnes", - suffix: [], - clear: "x", - meridiem: [], - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js deleted file mode 100644 index 30d9a34a..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.da.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Danish translation for bootstrap-datetimepicker - * Christian Pedersen - */ -;(function($){ - $.fn.datetimepicker.dates['da'] = { - days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], - daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], - daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], - months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "I Dag", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js deleted file mode 100644 index 52a19060..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.de.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * German translation for bootstrap-datetimepicker - * Sam Zurcher - */ -;(function($){ - $.fn.datetimepicker.dates['de'] = { - days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"], - daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam", "Son"], - daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"], - months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], - monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], - today: "Heute", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js deleted file mode 100644 index 882378f3..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ee.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Estonian translation for bootstrap-datetimepicker - * Rene Korss - */ -;(function($){ - $.fn.datetimepicker.dates['ee'] = { - days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev", "Pühapäev"], - daysShort: ["P", "E", "T", "K", "N", "R", "L", "P"], - daysMin: ["P", "E", "T", "K", "N", "R", "L", "P"], - months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"], - monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], - today: "Täna", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1, - format: "dd.mm.yyyy hh:ii" - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js deleted file mode 100644 index cbbdc9a7..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.el.js +++ /dev/null @@ -1,16 +0,0 @@ -/** -* Greek translation for bootstrap-datetimepicker -*/ -;(function($){ - $.fn.datetimepicker.dates['el'] = { - days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"], - daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"], - daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"], - months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], - monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], - today: "Σήμερα", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js deleted file mode 100644 index bbf3c207..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.es.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Spanish translation for bootstrap-datetimepicker - * Bruno Bonamin - */ -;(function($){ - $.fn.datetimepicker.dates['es'] = { - days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"], - daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Dom"], - daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"], - months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], - monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], - today: "Hoy", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js deleted file mode 100644 index 95eb4a8d..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fi.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Finnish translation for bootstrap-datetimepicker - * Jaakko Salonen - */ -;(function($){ - $.fn.datetimepicker.dates['fi'] = { - days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"], - daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau", "sun"], - daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la", "su"], - months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], - monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"], - today: "tänään", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js deleted file mode 100644 index f9194cbd..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.fr.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * French translation for bootstrap-datetimepicker - * Nico Mollet - */ -;(function($){ - $.fn.datetimepicker.dates['fr'] = { - days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"], - daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"], - daysMin: ["D", "L", "Ma", "Me", "J", "V", "S", "D"], - months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], - monthsShort: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"], - today: "Aujourd'hui", - suffix: [], - clear: "x", - meridiem: ["am", "pm"], - weekStart: 1, - format: "dd/mm/yyyy hh:ii" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js deleted file mode 100644 index 1060a4a7..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.he.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Hebrew translation for bootstrap-datetimepicker - * Sagie Maoz - */ -;(function($){ - $.fn.datetimepicker.dates['he'] = { - days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], - daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], - daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], - months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], - monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], - today: "היום", - clear: "x", - suffix: [], - meridiem: [], - rtl: true - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js deleted file mode 100644 index f85540fa..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hr.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Croatian localisation - */ -;(function($){ - $.fn.datetimepicker.dates['hr'] = { - days: ["Nedjelja", "Ponedjelja", "Utorak", "Srijeda", "Četrtak", "Petak", "Subota", "Nedjelja"], - daysShort: ["Ned", "Pon", "Uto", "Srr", "Čet", "Pet", "Sub", "Ned"], - daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su", "Ne"], - months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], - monthsShort: ["Sije", "Velj", "Ožu", "Tra", "Svi", "Lip", "Jul", "Kol", "Ruj", "Lis", "Stu", "Pro"], - today: "Danas", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js deleted file mode 100644 index 5de9fe9e..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hu.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Hungarian translation for bootstrap-datetimepicker - * darevish - */ -;(function($){ - $.fn.datetimepicker.dates['hu'] = { - days: ["Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"], - daysShort: ["Vas", "Hét", "Ked", "Sze", "Csü", "Pén", "Szo", "Vas"], - daysMin: ["V", "H", "K", "Sze", "Cs", "P", "Szo", "V"], - months: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"], - monthsShort: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sze", "Okt", "Nov", "Dec"], - today: "Ma", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1 - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js deleted file mode 100644 index cedee4db..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.hy.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Armenian translation for bootstrap-datepicker - * Hayk Chamyan - */ -;(function($){ - $.fn.datetimepicker.dates['hy'] = { - days: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ", "Կիրակի"], - daysShort: ["Կիր", "Երկ", "Երք", "Չոր", "Հնգ", "Ուր", "Շաբ", "Կիր"], - daysMin: ["Կի", "Եկ", "Եք", "Չո", "Հի", "Ու", "Շա", "Կի"], - months: ["Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"], - monthsShort: ["Հնվ", "Փետ", "Մար", "Ապր", "Մայ", "Հուն", "Հուլ", "Օգս", "Սեպ", "Հոկ", "Նոյ", "Դեկ"], - today: "Այսօր", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js deleted file mode 100644 index feef4a3b..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.id.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Bahasa translation for bootstrap-datetimepicker - * Azwar Akbar - * Addtional by Yulian Sutopo - */ -;(function($){ - $.fn.datetimepicker.dates['id'] = { - days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"], - daysShort: ["Mng", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Mng"], - daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa", "Mg"], - months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], - today: "Hari Ini", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1, - format: "dd/mm/yyyy hh:ii:ss" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js deleted file mode 100644 index 9944c6d7..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.is.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Icelandic translation for bootstrap-datetimepicker - * Hinrik Örn Sigurðsson - */ -;(function($){ - $.fn.datetimepicker.dates['is'] = { - days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur", "Sunnudagur"], - daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau", "Sun"], - daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La", "Su"], - months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], - today: "Í Dag", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js deleted file mode 100644 index c00a0499..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.it.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Italian translation for bootstrap-datetimepicker - * Enrico Rubboli - */ -;(function($){ - $.fn.datetimepicker.dates['it'] = { - days: ["Domenica", "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato", "Domenica"], - daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Dom"], - daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa", "Do"], - months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], - monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], - today: "Oggi", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1, - format: "dd/mm/yyyy hh:ii:ss" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js deleted file mode 100644 index 3a2d3b9b..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ja.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Japanese translation for bootstrap-datetimepicker - * Norio Suzuki - */ -;(function($){ - $.fn.datetimepicker.dates['ja'] = { - days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜", "日曜"], - daysShort: ["日", "月", "火", "水", "木", "金", "土", "日"], - daysMin: ["日", "月", "火", "水", "木", "金", "土", "日"], - months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - today: "今日", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js deleted file mode 100644 index d4595eff..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ka.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Georgian translation for bootstrap-datetimepicker - * Zura Jijavadze - */ -;(function($){ - $.fn.datetimepicker.dates['ka'] = { - days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი", "კვირა"], - daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ", "კვი"], - daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა", "კვ"], - months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], - monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], - today: "დღეს", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js deleted file mode 100644 index adeb6cb6..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ko.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Korean translation for bootstrap-datetimepicker - * Gu Youn - * Baekjoon Choi - */ -;(function($){ - $.fn.datetimepicker.dates['ko'] = { - days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"], - daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"], - daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"], - months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], - monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], - suffix: [], - meridiem: ["오전", "오후"], - today: "오늘", - clear: "x" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js deleted file mode 100644 index 917243c4..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lt.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Lithuanian translation for bootstrap-datetimepicker - * Šarūnas Gliebus - */ - -;(function($){ - $.fn.datetimepicker.dates['lt'] = { - days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis", "Sekmadienis"], - daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š", "S"], - daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št", "Sk"], - months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"], - monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"], - today: "Šiandien", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1 - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js deleted file mode 100644 index f9b3c774..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.lv.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Latvian translation for bootstrap-datetimepicker - * Artis Avotins - */ - -;(function($){ - $.fn.datetimepicker.dates['lv'] = { - days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"], - daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"], - daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"], - months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."], - today: "Šodien", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1 - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js deleted file mode 100644 index 26a2cc0e..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ms.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Malay translation for bootstrap-datetimepicker - * Ateman Faiz - */ -;(function($){ - $.fn.datetimepicker.dates['ms'] = { - days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu", "Ahad"], - daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab", "Aha"], - daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa", "Ah"], - months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], - today: "Hari Ini", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js deleted file mode 100644 index a2fd01a6..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nb.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Norwegian (bokmål) translation for bootstrap-datetimepicker - * Fredrik Sundmyhr - */ -;(function($){ - $.fn.datetimepicker.dates['nb'] = { - days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], - daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], - daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], - months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], - today: "I Dag", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js deleted file mode 100644 index a28fa031..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.nl.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Dutch translation for bootstrap-datetimepicker - * Reinier Goltstein - */ -;(function($){ - $.fn.datetimepicker.dates['nl'] = { - days: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"], - daysShort: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"], - daysMin: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"], - months: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], - monthsShort: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "Vandaag", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js deleted file mode 100644 index 36e33a0b..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.no.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Norwegian translation for bootstrap-datetimepicker - * Rune Warhuus - */ -;(function($){ - $.fn.datetimepicker.dates['no'] = { - days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], - daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], - daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], - months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], - today: "I Dag", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js deleted file mode 100644 index 12fc7422..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pl.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Polish translation for bootstrap-datetimepicker - * Robert - */ -;(function($){ -$.fn.datetimepicker.dates['pl'] = { - days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"], - daysShort: ["Nie", "Pn", "Wt", "Śr", "Czw", "Pt", "So", "Nie"], - daysMin: ["N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"], - months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], - monthsShort: ["Sty", "Lu", "Mar", "Kw", "Maj", "Cze", "Lip", "Sie", "Wrz", "Pa", "Lis", "Gru"], - today: "Dzisiaj", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1 -}; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js deleted file mode 100644 index 1d307416..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt-BR.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Brazilian translation for bootstrap-datetimepicker - * Cauan Cabral - */ -;(function($){ - $.fn.datetimepicker.dates['pt-BR'] = { - format: 'dd/mm/yyyy', - days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"], - daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"], - daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"], - months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], - monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], - today: "Hoje", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js deleted file mode 100644 index 166034ef..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.pt.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Portuguese translation for bootstrap-datetimepicker - * Original code: Cauan Cabral - * Tiago Melo - */ -;(function($){ - $.fn.datetimepicker.dates['pt'] = { - days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"], - daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"], - daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"], - months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], - monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], - suffix: [], - meridiem: [], - today: "Hoje", - clear: "x" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js deleted file mode 100644 index a7569c6f..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ro.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Romanian translation for bootstrap-datetimepicker - * Cristian Vasile - */ -;(function($){ - $.fn.datetimepicker.dates['ro'] = { - days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă", "Duminică"], - daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm", "Dum"], - daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ", "Du"], - months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], - monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Astăzi", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1 - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js deleted file mode 100644 index 57c819f9..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs-latin.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Serbian latin translation for bootstrap-datetimepicker - * Bojan Milosavlević - */ -;(function($){ - $.fn.datetimepicker.dates['rs'] = { - days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota", "Nedelja"], - daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub", "Ned"], - daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su", "N"], - months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], - today: "Danas", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js deleted file mode 100644 index 3e9db3e6..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.rs.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Serbian cyrillic translation for bootstrap-datetimepicker - * Bojan Milosavlević - */ -;(function($){ - $.fn.datetimepicker.dates['rs'] = { - days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота", "Недеља"], - daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб", "Нед"], - daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су", "Н"], - months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], - monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], - today: "Данас", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js deleted file mode 100644 index 20caf251..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ru.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Russian translation for bootstrap-datetimepicker - * Victor Taranenko - */ -;(function($){ - $.fn.datetimepicker.dates['ru'] = { - days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"], - daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Вск"], - daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], - months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], - monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], - today: "Сегодня", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js deleted file mode 100644 index acf1495a..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sk.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Slovak translation for bootstrap-datetimepicker - * Marek Lichtner - * Fixes by Michal Remiš - */ -;(function($){ - $.fn.datetimepicker.dates["sk"] = { - days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota", "Nedeľa"], - daysShort: ["Ned", "Pon", "Uto", "Str", "Štv", "Pia", "Sob", "Ned"], - daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So", "Ne"], - months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "Dnes", - clear: "x", - suffix: [], - meridiem: [], - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js deleted file mode 100644 index a7e58bdf..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sl.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Slovene translation for bootstrap-datetimepicker - * Gregor Rudolf - */ -;(function($){ - $.fn.datetimepicker.dates['sl'] = { - days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota", "Nedelja"], - daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob", "Ned"], - daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So", "Ne"], - months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], - today: "Danes", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js deleted file mode 100644 index 050125ad..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sv.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Swedish translation for bootstrap-datetimepicker - * Patrik Ragnarsson - */ -;(function($){ - $.fn.datetimepicker.dates['sv'] = { - days: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag", "Söndag"], - daysShort: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör", "Sön"], - daysMin: ["Sö", "Må", "Ti", "On", "To", "Fr", "Lö", "Sö"], - months: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "I Dag", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js deleted file mode 100644 index 8cdb4df2..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.sw.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Swahili translation for bootstrap-datetimepicker - * Edwin Mugendi - * Source: http://scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku - */ -;(function($){ - $.fn.datetimepicker.dates['sw'] = { - days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi", "Jumapili"], - daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1", "J2"], - daysMin: ["2", "3", "4", "5", "A", "I", "1", "2"], - months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], - monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], - today: "Leo", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js deleted file mode 100644 index 8adc129a..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.th.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Thai translation for bootstrap-datetimepicker - * Suchau Jiraprapot - */ -;(function($){ - $.fn.datetimepicker.dates['th'] = { - days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], - daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], - daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], - months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], - monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], - today: "วันนี้", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js deleted file mode 100644 index 0130c94c..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.tr.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Turkish translation for bootstrap-datetimepicker - * Serkan Algur - */ -;(function($){ - $.fn.datetimepicker.dates['tr'] = { - days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi", "Pazar"], - daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts", "Pz"], - daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct", "Pz"], - months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], - monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], - today: "Bugün", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); - diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js deleted file mode 100644 index 1687a1dc..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.ua.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Ukrainian translation for bootstrap-datepicker - * Igor Polynets - */ -;(function($){ - $.fn.datetimepicker.dates['ua'] = { - days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четверг", "П'ятниця", "Субота", "Неділя"], - daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], - daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], - months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], - monthsShort: ["Січ", "Лют", "Бер", "Квт", "Трв", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Грд"], - today: "Сьогодні", - clear: "x", - weekStart: 1 - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js deleted file mode 100644 index 4b3a9e0a..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.uk.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Ukrainian translation for bootstrap-datetimepicker - * Andrey Vityuk - */ -;(function($){ - $.fn.datetimepicker.dates['uk'] = { - days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"], - daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], - daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], - months: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], - monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], - today: "Сьогодні", - clear: "x", - suffix: [], - meridiem: [] - }; -}(jQuery)); \ No newline at end of file diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js deleted file mode 100644 index f84ba548..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh-TW.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Traditional Chinese translation for bootstrap-datetimepicker - * Rung-Sheng Jang - */ -;(function($){ - $.fn.datetimepicker.dates['zh-TW'] = { - days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], - daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"], - daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], - months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], - monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], - today: "今天", - clear: "x", - suffix: [], - meridiem: ["上午", "下午"] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js b/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js deleted file mode 100644 index 66ac5a01..00000000 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/resources/js/locales/bootstrap-datetime-picker/bootstrap-datetimepicker.zh.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Simplified Chinese translation for bootstrap-datetimepicker - * Yuan Cheung - */ -;(function($){ - $.fn.datetimepicker.dates['zh'] = { - days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], - daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"], - daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], - months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], - monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], - today: "今天", - clear: "x", - suffix: [], - meridiem: ["上午", "下午"] - }; -}(jQuery)); diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt index 1a650117..b7a44115 100644 --- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt +++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt @@ -33,7 +33,6 @@ internal object KVManagerBootstrap { init { require("bootstrap/dist/js/bootstrap.bundle.min.js") require("awesome-bootstrap-checkbox") - require("bootstrap-vertical-tabs") require("./css/kvbootstrap.css") } diff --git a/kvision-modules/kvision-bootstrap/src/main/resources/css/kvbootstrap.css b/kvision-modules/kvision-bootstrap/src/main/resources/css/kvbootstrap.css index 1a16b41f..6f99a26c 100644 --- a/kvision-modules/kvision-bootstrap/src/main/resources/css/kvbootstrap.css +++ b/kvision-modules/kvision-bootstrap/src/main/resources/css/kvbootstrap.css @@ -1,3 +1,7 @@ +.input-group.date.is-invalid~.invalid-feedback { + display: block; +} + /* .bootstrap-touchspin .input-group-btn-vertical> .input-sm { diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt index d3d00851..9772f808 100644 --- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt @@ -61,7 +61,7 @@ object KVManager { require("jquery-resizable-dom") } - internal val fecha = require("fecha") + internal val fecha = require("fecha").default private val sdPatch = Snabbdom.init( arrayOf( classModule, attributesModule, propsModule, styleModule, -- cgit From 6b14906f0e35dc522bd1c1a44682d728315cf619 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 6 Oct 2019 20:38:07 +0200 Subject: Update all tests. --- kvision-modules/kvision-bootstrap-css/build.gradle | 8 ++++-- .../pl/treksoft/kvision/form/time/DateTimeInput.kt | 3 ++- .../kvision/form/time/DateTimeInputSpec.kt | 8 +++--- .../pl/treksoft/kvision/form/time/DateTimeSpec.kt | 4 +-- .../webpack.config.d/css.js | 2 ++ .../webpack.config.d/css.js | 2 ++ .../kvision/form/select/SelectInputSpec.kt | 2 +- .../kvision/form/select/SelectOptionSpec.kt | 4 +-- .../pl/treksoft/kvision/form/select/SelectSpec.kt | 6 +---- .../webpack.config.d/jquery.js | 5 ++++ .../treksoft/kvision/form/spinner/SpinnerSpec.kt | 4 +-- .../webpack.config.d/jquery.js | 5 ++++ kvision-modules/kvision-bootstrap/build.gradle | 1 + .../kotlin/test/pl/treksoft/kvision/TestUtil.kt | 4 +-- .../treksoft/kvision/dropdown/ContextMenuSpec.kt | 5 ++-- .../pl/treksoft/kvision/dropdown/DropDownSpec.kt | 29 +++++++++++----------- .../pl/treksoft/kvision/dropdown/HeaderSpec.kt | 2 +- .../pl/treksoft/kvision/dropdown/SeparatorSpec.kt | 2 +- .../test/pl/treksoft/kvision/modal/AlertSpec.kt | 16 ++++++------ .../test/pl/treksoft/kvision/navbar/NavFormSpec.kt | 4 +-- .../test/pl/treksoft/kvision/navbar/NavSpec.kt | 4 +-- .../test/pl/treksoft/kvision/navbar/NavbarSpec.kt | 11 ++++---- .../kvision/panel/ResponsiveGridPanelSpec.kt | 2 +- .../test/pl/treksoft/kvision/panel/TabPanelSpec.kt | 10 ++++---- .../pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt | 7 +++--- .../test/pl/treksoft/kvision/window/WindowSpec.kt | 11 +++----- .../kvision-chart/webpack.config.d/css.js | 2 ++ .../kvision-cordova/webpack.config.d/css.js | 2 ++ .../kvision-datacontainer/webpack.config.d/css.js | 2 ++ .../kvision-i18n/webpack.config.d/css.js | 2 ++ .../kvision-redux-kotlin/webpack.config.d/css.js | 2 ++ .../kvision-redux/webpack.config.d/css.js | 2 ++ .../kvision-richtext/webpack.config.d/jquery.js | 5 ++++ .../webpack.config.d/css.js | 2 ++ .../test/pl/treksoft/kvision/form/HelpTextSpec.kt | 4 +-- .../pl/treksoft/kvision/form/check/CheckBoxSpec.kt | 4 +-- .../kvision/form/check/RadioGroupInputSpec.kt | 2 +- .../treksoft/kvision/form/check/RadioGroupSpec.kt | 6 ++--- .../pl/treksoft/kvision/form/check/RadioSpec.kt | 4 +-- .../test/pl/treksoft/kvision/form/text/TextSpec.kt | 2 +- .../test/pl/treksoft/kvision/html/ButtonSpec.kt | 4 +-- .../test/pl/treksoft/kvision/html/IconSpec.kt | 4 +-- .../test/pl/treksoft/kvision/html/ImageSpec.kt | 2 +- .../test/pl/treksoft/kvision/table/TableSpec.kt | 4 +-- 44 files changed, 125 insertions(+), 91 deletions(-) create mode 100644 kvision-modules/kvision-bootstrap-dialog/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-bootstrap-select-remote/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-bootstrap-select/webpack.config.d/jquery.js create mode 100644 kvision-modules/kvision-bootstrap-upload/webpack.config.d/jquery.js create mode 100644 kvision-modules/kvision-chart/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-cordova/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-datacontainer/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-i18n/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-redux-kotlin/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-redux/webpack.config.d/css.js create mode 100644 kvision-modules/kvision-richtext/webpack.config.d/jquery.js create mode 100644 kvision-modules/kvision-tabulator-remote/webpack.config.d/css.js (limited to 'kvision-modules/kvision-bootstrap-datetime/src') diff --git a/kvision-modules/kvision-bootstrap-css/build.gradle b/kvision-modules/kvision-bootstrap-css/build.gradle index 0d47049b..1aca3288 100644 --- a/kvision-modules/kvision-bootstrap-css/build.gradle +++ b/kvision-modules/kvision-bootstrap-css/build.gradle @@ -1,5 +1,9 @@ apply from: "../shared.gradle" -dependencies { - compile project(":kvision-modules:kvision-bootstrap") +kotlinFrontend { + + npm { + dependency("bootstrap", "4.3.1") + } + } diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt index e0da98f8..626346b1 100644 --- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt +++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt @@ -241,7 +241,8 @@ open class DateTimeInput( override fun afterDestroy() { if (initialized) { - getElementJQueryD()?.data("DateTimePicker").destroy() + val comp = getElementJQueryD()?.data("DateTimePicker") + if (comp != null) comp.destroy() initialized = false } } diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt index 877cf650..5cdb68c9 100644 --- a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt +++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt @@ -25,6 +25,7 @@ import pl.treksoft.kvision.form.time.DateTimeInput import pl.treksoft.kvision.panel.Root import pl.treksoft.kvision.types.toStringF import test.pl.treksoft.kvision.DomSpec +import kotlin.browser.document import kotlin.js.Date import kotlin.test.Test import kotlin.test.assertEquals @@ -41,10 +42,11 @@ class DateTimeInputSpec : DomSpec { id = "idti" } root.add(dti) - val value = dti.getElementJQuery()?.`val`() + val element = document.getElementById("test") + val datastr = data.toStringF(dti.format) assertEquals( - data.toStringF(dti.format), - value, + "
", + element?.innerHTML, "Should render date time input with correctly formatted value" ) } diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt index eba3ef74..a6714f0c 100644 --- a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt +++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt @@ -46,13 +46,13 @@ class DateTimeSpec : DomSpec { val id = ti.input.id val datastr = data.toStringF(ti.format) assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct date time input form control" ) ti.validatorError = "Validation Error" assertEqualsHtml( - "
Validation Error
", + "
Validation Error
", element?.innerHTML, "Should render correct date time input form control with validation error" ) diff --git a/kvision-modules/kvision-bootstrap-dialog/webpack.config.d/css.js b/kvision-modules/kvision-bootstrap-dialog/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-dialog/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-bootstrap-select-remote/webpack.config.d/css.js b/kvision-modules/kvision-bootstrap-select-remote/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-select-remote/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt index bfd93900..0e759896 100644 --- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt +++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt @@ -44,7 +44,7 @@ class SelectInputSpec : DomSpec { root.add(selectInput) val element = document.getElementById("test") assertTrue( - true == element?.innerHTML?.endsWith(""), + true == element?.innerHTML?.startsWith("
"), "Should render correct select input" ) } diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt index 33c36576..d711301a 100644 --- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt +++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt @@ -41,9 +41,9 @@ class SelectOptionSpec : DomSpec { element?.innerHTML, "Should render correct select option" ) - selectOption.icon = "fa-flag" + selectOption.icon = "fas fa-flag" assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct select option with icon" ) diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt index 9eddff81..9ed44f82 100644 --- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt +++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt @@ -45,11 +45,7 @@ class SelectSpec : DomSpec { val element = document.getElementById("test") val id = select.input.id assertTrue( - true == element?.innerHTML?.startsWith("
"), - "Should render correct select form control" - ) - assertTrue( - true == element?.innerHTML?.endsWith("
"), + true == element?.innerHTML?.startsWith("
"), "Should render correct select form control" ) } diff --git a/kvision-modules/kvision-bootstrap-select/webpack.config.d/jquery.js b/kvision-modules/kvision-bootstrap-select/webpack.config.d/jquery.js new file mode 100644 index 00000000..bf5a1a20 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-select/webpack.config.d/jquery.js @@ -0,0 +1,5 @@ +config.plugins.push(new webpack.ProvidePlugin({ + $: "jquery", + jQuery: "jquery", + "window.jQuery": "jquery" +})); diff --git a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt index ead19d86..bb090b61 100644 --- a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt +++ b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt @@ -43,13 +43,13 @@ class SpinnerSpec : DomSpec { val element = document.getElementById("test") val id = ti.input.id assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct spinner input form control" ) ti.validatorError = "Validation Error" assertEqualsHtml( - "
Validation Error
", + "
Validation Error
", element?.innerHTML, "Should render correct spinner input form control with validation error" ) diff --git a/kvision-modules/kvision-bootstrap-upload/webpack.config.d/jquery.js b/kvision-modules/kvision-bootstrap-upload/webpack.config.d/jquery.js new file mode 100644 index 00000000..bf5a1a20 --- /dev/null +++ b/kvision-modules/kvision-bootstrap-upload/webpack.config.d/jquery.js @@ -0,0 +1,5 @@ +config.plugins.push(new webpack.ProvidePlugin({ + $: "jquery", + jQuery: "jquery", + "window.jQuery": "jquery" +})); diff --git a/kvision-modules/kvision-bootstrap/build.gradle b/kvision-modules/kvision-bootstrap/build.gradle index 34aa8bb0..fe519014 100644 --- a/kvision-modules/kvision-bootstrap/build.gradle +++ b/kvision-modules/kvision-bootstrap/build.gradle @@ -3,6 +3,7 @@ apply from: "../shared.gradle" kotlinFrontend { npm { + dependency("popper.js", "1.15.0") dependency("bootstrap", "4.3.1") dependency("awesome-bootstrap-checkbox", "1.0.1") dependency("element-resize-event", "3.0.3") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt index 1ad97acc..fc3d5242 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt @@ -70,8 +70,8 @@ interface DomSpec : TestSpec { fun assertEqualsHtml(expected: String?, actual: String?, message: String?) { if (expected != null && actual != null) { - val exp = jQuery(expected) - val act = jQuery(actual) + val exp = jQuery(expected.replace("position: ;","position: absolute;")) + val act = jQuery(actual.replace("position: ;","position: absolute;")) val result = exp[0]?.isEqualNode(act[0]) if (result == true) { assertTrue(result == true, message) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt index 35172267..b467f1ff 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt @@ -22,6 +22,7 @@ package test.pl.treksoft.kvision.dropdown import pl.treksoft.kvision.dropdown.ContextMenu +import pl.treksoft.kvision.dropdown.ContextMenu.Companion.setContextMenu import pl.treksoft.kvision.html.Link.Companion.link import pl.treksoft.kvision.panel.Root import pl.treksoft.kvision.utils.obj @@ -43,7 +44,7 @@ class ContextMenuSpec : DomSpec { m.show() val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct context menu" ) @@ -66,7 +67,7 @@ class ContextMenuSpec : DomSpec { }) val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should place context menu in the correct position" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt index af35fa51..f75331f3 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt @@ -22,6 +22,7 @@ package test.pl.treksoft.kvision.dropdown import pl.treksoft.kvision.dropdown.DD +import pl.treksoft.kvision.dropdown.Direction import pl.treksoft.kvision.dropdown.DropDown import pl.treksoft.kvision.panel.Root import test.pl.treksoft.kvision.DomSpec @@ -37,11 +38,11 @@ class DropDownSpec : DomSpec { val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag") root.add(dd) - dd.toggle() + dd.list.getElementJQueryD()?.dropdown("toggle") val element = document.getElementById("test") val id = dd.buttonId() assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct drop down" ) @@ -52,13 +53,13 @@ class DropDownSpec : DomSpec { fun renderDropUp() { run { val root = Root("test", fixed = true) - val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag").apply { dropup = true } + val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag").apply { direction = Direction.DROPUP } root.add(dd) - dd.toggle() + dd.list.getElementJQueryD()?.dropdown("toggle") val element = document.getElementById("test") val id = dd.buttonId() assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct drop down" ) @@ -71,11 +72,11 @@ class DropDownSpec : DomSpec { val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to DD.HEADER.option), "flag") root.add(dd) - dd.toggle() + dd.list.getElementJQueryD()?.dropdown("toggle") val element = document.getElementById("test") val id = dd.buttonId() assertEqualsHtml( - "
  • abc
", + "
abc
", element?.innerHTML, "Should render correct drop down" ) @@ -88,11 +89,11 @@ class DropDownSpec : DomSpec { val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to DD.SEPARATOR.option), "flag") root.add(dd) - dd.toggle() + dd.list.getElementJQueryD()?.dropdown("toggle") val element = document.getElementById("test") val id = dd.buttonId() assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct drop down" ) @@ -105,11 +106,11 @@ class DropDownSpec : DomSpec { val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to DD.DISABLED.option), "flag") root.add(dd) - dd.toggle() + dd.list.getElementJQueryD()?.dropdown("toggle") val element = document.getElementById("test") val id = dd.buttonId() assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct drop down" ) @@ -122,10 +123,10 @@ class DropDownSpec : DomSpec { val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag") root.add(dd) - val visible = dd.getElementJQuery()?.hasClass("open") ?: false + val visible = dd.getElementJQuery()?.hasClass("show") ?: false assertTrue("Dropdown menu is not visible before toggle") { !visible } - dd.toggle() - val visible2 = dd.getElementJQuery()?.hasClass("open") ?: false + dd.list.getElementJQueryD()?.dropdown("toggle") + val visible2 = dd.getElementJQuery()?.hasClass("show") ?: false assertTrue("Dropdown menu is visible after toggle") { visible2 } } } diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt index e75baf9e..25ca7a7d 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt @@ -37,7 +37,7 @@ class HeaderSpec : DomSpec { root.add(h) val element = document.getElementById("test") assertEqualsHtml( - "
  • Test
  • ", + "
    Test
    ", element?.innerHTML, "Should render correct drop down header" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt index 86607ec7..36c22a74 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt @@ -37,7 +37,7 @@ class SeparatorSpec : DomSpec { root.add(s) val element = document.getElementById("test") assertEqualsHtml( - "
  • ", + "
    ", element?.innerHTML, "Should render correct drop down separator" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt index c3d17de9..48a8b5a0 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt @@ -37,22 +37,22 @@ class AlertSpec : DomSpec { fun render() { run { Root("test", fixed = true) - Alert.show("Alert caption", "Alert content") - val alert = document.getElementById("test")?.let { jQuery(it).find(".modal")[0] } + Alert.show("Alert caption", "Alert content", animation = false) + val alert = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal")[0] } assertNotNull(alert, "Should show alert window") - val title = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() } + val title = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal-title").html() } assertEquals("Alert caption", title, "Should render alert window with correct caption") - val body = document.getElementById("test")?.let { jQuery(it).find(".modal-body").html() } + val body = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal-body").html() } assertEquals("
    Alert content
    ", body, "Should render alert window with correct content") - val footer = document.getElementById("test")?.let { jQuery(it).find(".modal-footer").html() } + val footer = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal-footer").html() } assertEqualsHtml( - "", + "", footer, "Should render alert window with correct footer" ) - val button = document.getElementById("test")?.let { jQuery(it).find(".modal-footer").find("button") } + val button = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal-footer").find("button") } button?.click() - val alert2 = document.getElementById("test")?.let { jQuery(it).find(".modal")[0] } + val alert2 = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal")[0] } assertNull(alert2, "Should hide alert window after clicking OK") } } diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt index 40720bcb..8eb7bd5b 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt @@ -37,13 +37,13 @@ class NavFormSpec : DomSpec { root.add(navf) val element = document.getElementById("test") assertEqualsHtml( - "
    ", + "
    ", element?.innerHTML, "Should render correct nav form" ) navf.rightAlign = true assertEqualsHtml( - "
    ", + "
    ", element?.innerHTML, "Should render correct right aligned nav form" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt index 988a706d..2e52557f 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt @@ -37,13 +37,13 @@ class NavSpec : DomSpec { root.add(nav) val element = document.getElementById("test") assertEqualsHtml( - "
      ", + "
      ", element?.innerHTML, "Should render correct nav" ) nav.rightAlign = true assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct right aligned nav" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt index f38a05f9..1658e63c 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt @@ -26,6 +26,7 @@ import pl.treksoft.kvision.html.TAG import pl.treksoft.kvision.html.Tag.Companion.tag import pl.treksoft.kvision.navbar.Nav import pl.treksoft.kvision.navbar.Navbar +import pl.treksoft.kvision.navbar.NavbarColor import pl.treksoft.kvision.navbar.NavbarType import pl.treksoft.kvision.panel.Root import test.pl.treksoft.kvision.DomSpec @@ -43,15 +44,15 @@ class NavbarSpec : DomSpec { val element = document.getElementById("test") val id = navbar.container.id assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct navbar" ) - navbar.inverted = true + navbar.nColor = NavbarColor.DARK assertEqualsHtml( - "", + "", element?.innerHTML, - "Should render correct inverted navbar" + "Should render correct dark navbar" ) navbar.add(Nav { tag(TAG.LI) { @@ -59,7 +60,7 @@ class NavbarSpec : DomSpec { } }) assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct navbar with nav link" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt index fcdf9860..1ebac202 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt @@ -41,7 +41,7 @@ class ResponsiveGridPanelSpec : DomSpec { rgPanel.add(Span("ghi"), 3, 3) val element = document.getElementById("test") assertEqualsHtml( - "
        abc
        def
        ghi
        ", + "
        abc
        def
        ghi
        ", element?.innerHTML, "Should render correct responsive grid panel" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt index 9335562f..7a76cde9 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt @@ -43,7 +43,7 @@ class TabPanelSpec : DomSpec { tabs.addTab("DEF", label2) val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct tabs" ) @@ -63,7 +63,7 @@ class TabPanelSpec : DomSpec { tabs.activeIndex = 1 val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should change selected tab" ) @@ -84,7 +84,7 @@ class TabPanelSpec : DomSpec { tabs.removeTab(1) val element = document.getElementById("test") assertEqualsHtml( - "
        abc
        ", + "
        abc
        ", element?.innerHTML, "Should remove tab" ) @@ -105,10 +105,10 @@ class TabPanelSpec : DomSpec { tabs.removeTab(0) val label3 = Span("ghi") tabs.addTab("GHI", label3) - jQuery("#test a")[0]?.click() + jQuery("#test a")[1]?.click() val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should select correct tab by clicking" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt index b324b8ab..b3ddbe40 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt @@ -24,7 +24,6 @@ package test.pl.treksoft.kvision.toolbar import pl.treksoft.kvision.panel.Root import pl.treksoft.kvision.toolbar.ButtonGroup import pl.treksoft.kvision.toolbar.ButtonGroupSize -import pl.treksoft.kvision.toolbar.ButtonGroupStyle import test.pl.treksoft.kvision.DomSpec import kotlin.browser.document import kotlin.test.Test @@ -44,11 +43,11 @@ class ButtonGroupSpec : DomSpec { "Should render correct button group" ) group.size = ButtonGroupSize.LARGE - group.style = ButtonGroupStyle.JUSTIFIED + group.vertical = true assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, - "Should render correct button group with large and justified buttons" + "Should render correct button group with large and vertical buttons" ) } diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt index c79b9d32..a65ff7c3 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt @@ -35,18 +35,13 @@ class WindowSpec : DomSpec { val root = Root("test", fixed = true) val window = Window("Window title", isResizable = false) root.add(window) + window.show() val id = window.id val element = document.getElementById("test") assertEqualsHtml( - "

        Window title

        ", + "
        Window title
        ", element?.innerHTML, - "Should render floating window without resizable handler" - ) - window.isResizable = true - assertEqualsHtml( - "

        Window title

        ", - element?.innerHTML, - "Should render floating window with resizable handler" + "Should render floating window" ) } } diff --git a/kvision-modules/kvision-chart/webpack.config.d/css.js b/kvision-modules/kvision-chart/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-chart/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-cordova/webpack.config.d/css.js b/kvision-modules/kvision-cordova/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-cordova/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-datacontainer/webpack.config.d/css.js b/kvision-modules/kvision-datacontainer/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-datacontainer/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-i18n/webpack.config.d/css.js b/kvision-modules/kvision-i18n/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-i18n/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-redux-kotlin/webpack.config.d/css.js b/kvision-modules/kvision-redux-kotlin/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-redux-kotlin/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-redux/webpack.config.d/css.js b/kvision-modules/kvision-redux/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-redux/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/kvision-modules/kvision-richtext/webpack.config.d/jquery.js b/kvision-modules/kvision-richtext/webpack.config.d/jquery.js new file mode 100644 index 00000000..bf5a1a20 --- /dev/null +++ b/kvision-modules/kvision-richtext/webpack.config.d/jquery.js @@ -0,0 +1,5 @@ +config.plugins.push(new webpack.ProvidePlugin({ + $: "jquery", + jQuery: "jquery", + "window.jQuery": "jquery" +})); diff --git a/kvision-modules/kvision-tabulator-remote/webpack.config.d/css.js b/kvision-modules/kvision-tabulator-remote/webpack.config.d/css.js new file mode 100644 index 00000000..5d710d35 --- /dev/null +++ b/kvision-modules/kvision-tabulator-remote/webpack.config.d/css.js @@ -0,0 +1,2 @@ +config.module.rules.push({ test: /\.css$/, loader: "style-loader!css-loader" }); + diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt index 4be84d22..785f9a2c 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt @@ -27,7 +27,7 @@ import test.pl.treksoft.kvision.DomSpec import kotlin.browser.document import kotlin.test.Test -class HelpBlockSpec : DomSpec { +class HelpTextSpec : DomSpec { @Test fun render() { @@ -37,7 +37,7 @@ class HelpBlockSpec : DomSpec { root.add(fl) val element = document.getElementById("test") assertEqualsHtml( - "Form Error", + "Form Error", element?.innerHTML, "Should render correct help block" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt index 16da0c70..2c329ffa 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt @@ -45,7 +45,7 @@ class CheckBoxSpec : DomSpec { val element = document.getElementById("test") val id = ci.input.id assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct checkbox form control" ) @@ -53,7 +53,7 @@ class CheckBoxSpec : DomSpec { ci.circled = false ci.inline = false assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct checkbox form control" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt index 55788c84..020ad529 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt @@ -44,7 +44,7 @@ class RadioGroupInputSpec : DomSpec { val rid1 = ci.getChildren().filterIsInstance().first().input.id val rid2 = ci.getChildren().filterIsInstance().last().input.id assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct radio button group form control" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt index 2ed52b67..77547977 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt @@ -41,10 +41,10 @@ class RadioGroupSpec : DomSpec { root.add(ci) val element = document.getElementById("test") val id = ci.flabel.forId - val rid1 = ci.getChildren().filterIsInstance().first().input.id - val rid2 = ci.getChildren().filterIsInstance().last().input.id + val rid1 = ci.container.getChildren().filterIsInstance().first().input.id + val rid2 = ci.container.getChildren().filterIsInstance().last().input.id assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct radio button group form control" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt index bd0b3993..c709b548 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt @@ -44,7 +44,7 @@ class RadioSpec : DomSpec { val element = document.getElementById("test") val id = ci.input.id assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct radio button form control" ) @@ -52,7 +52,7 @@ class RadioSpec : DomSpec { ci.squared = true ci.inline = false assertEqualsHtml( - "
        ", + "
        ", element?.innerHTML, "Should render correct radio button form control" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt index 2bc35a38..02ba7643 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt @@ -49,7 +49,7 @@ class TextSpec : DomSpec { ) ti.validatorError = "Validation Error" assertEqualsHtml( - "
        Validation Error
        ", + "
        Validation Error
        ", element?.innerHTML, "Should render correct input form control with validation error" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt index 512c3bc2..e807bfd5 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt @@ -35,13 +35,13 @@ class ButtonSpec : DomSpec { fun render() { run { val root = Root("test", fixed = true) - val button = Button("Cancel", "fa-bars", ButtonStyle.PRIMARY) + val button = Button("Cancel", "fas fa-bars", ButtonStyle.PRIMARY) button.size = ButtonSize.LARGE button.block = true root.add(button) val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct html button" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt index ea3425c5..9a63c68e 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt @@ -33,10 +33,10 @@ class IconSpec : DomSpec { fun render() { run { val root = Root("test", fixed = true) - val icon = Icon("fa-check") + val icon = Icon("fas fa-check") root.add(icon) val element = document.getElementById("test") - assertEqualsHtml("", element?.innerHTML, "Should render correct icon") + assertEqualsHtml("", element?.innerHTML, "Should render correct icon") } } diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt index 169575fc..ed3a5347 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt @@ -41,7 +41,7 @@ class ImageSpec : DomSpec { root.add(image) val element = document.getElementById("test") assertEqualsHtml( - "\"Image\"", + "\"Image\"", element?.innerHTML, "Should render correct html image" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt index c312040a..69dc05d3 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt @@ -46,7 +46,7 @@ class TableSpec : DomSpec { root.add(table) val element = document.getElementById("test") assertEqualsHtml( - "
        ab
        AB
        ", + "
        ab
        AB
        ", element?.innerHTML, "Should render correct table" ) @@ -55,7 +55,7 @@ class TableSpec : DomSpec { table.types = setOf(TableType.BORDERED) val element2 = document.getElementById("test") assertEqualsHtml( - "
        Caption
        ab
        AB
        ", + "
        Caption
        ab
        AB
        ", element2?.innerHTML, "Should render correct responsive table" ) -- cgit