From 0365722f8549ee93918be99da1b9f901cf0b2c8d Mon Sep 17 00:00:00 2001
From: Robert Jaros The form field file upload component. Allowed file extensions. Allowed file types. Determines if the click on the preview zone opens file browse window. Determines if Drag&Drop zone is enabled. Determines if the explorer theme is used. Form field label. The actual input component. Invalid feedback component. The label text bound to the spinner input element. Determines if multiple file upload is supported. Determines if the iconic preview is prefered. Determines if the input selection is required. Determines if label can contain HTML code. Determines if the file browse button is shown. Determines if the cancel button is shown. Determines if the caption is shown. Determines if the preview is shown. Determines if the remove button is shown. Determines if the upload button is shown. The extra data that will be passed as data to the AJAX server call via POST. The optional URL for the upload processing action.
If not set the upload button action will default to form submission. File input value.
Upload
-open class Upload : SimplePanel, KFilesFormControl
+(js) open class Upload : SimplePanel, KFilesFormControl
Constructors
-
-
+(js)
+
<init>
@@ -27,221 +28,210 @@
Upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false)
-
+(js)
+
allowedFileExtensions
-
+var allowedFileExtensions: Set<String>?
var allowedFileExtensions: Set<String>?
-
+(js)
+
allowedFileTypes
-
+var allowedFileTypes: Set<String>?
var allowedFileTypes: Set<String>?
-
+(js)
+
browseOnZoneClick
-
+var browseOnZoneClick: Boolean
var browseOnZoneClick: Boolean
-
+(js)
+
dropZoneEnabled
-
+var dropZoneEnabled: Boolean
var dropZoneEnabled: Boolean
-
+(js)
+
explorerTheme
-
+var explorerTheme: Boolean
var explorerTheme: Boolean
-
+(js)
+
flabel
-
+val flabel: FieldLabel
val flabel: FieldLabel
-
+(js)
+
idc
val idc: String
-
+(js)
+
input
-
+val input: UploadInput
val input: UploadInput
-
+(js)
+
invalidFeedback
-
+val invalidFeedback: InvalidFeedback
val invalidFeedback: InvalidFeedback
-
+(js)
+
label
-
+var label: String?
var label: String?
-
+(js)
+
multiple
-
+var multiple: Boolean
var multiple: Boolean
-
+(js)
+
preferIconicPreview
-
+var preferIconicPreview: Boolean
var preferIconicPreview: Boolean
-
+(js)
+
required
-
+var required: Boolean
var required: Boolean
-
+(js)
+
rich
-
+var rich: Boolean
var rich: Boolean
-
+(js)
+
showBrowse
-
+var showBrowse: Boolean
var showBrowse: Boolean
-
+(js)
+
showCancel
-
+var showCancel: Boolean
var showCancel: Boolean
-
+(js)
+
showCaption
-
+var showCaption: Boolean
var showCaption: Boolean
-
+(js)
+
showPreview
-
+var showPreview: Boolean
var showPreview: Boolean
-
+(js)
+
showRemove
-
+var showRemove: Boolean
var showRemove: Boolean
-
+(js)
+
showUpload
-
+var showUpload: Boolean
var showUpload: Boolean
-
+(js)
+
uploadExtraData
-
+var uploadExtraData: ((String, Int) -> dynamic)?
var uploadExtraData: ((String, Int) -> dynamic)?
-
+(js)
+
uploadUrl
-
+var uploadUrl: String?
var uploadUrl: String?
-
-
-
+(js)
+
value
-
-open var value: List<KFile>?
Inherited Properties
-
-
-
@@ -250,224 +240,129 @@ If not set the upload button action will default to form submission.
-
-
-
-
-
+val children: MutableList<Component>open var value: List<KFile>?
open fun blur(): Unit
Makes the input element blur.
-open fun blur(): Unit
open fun cancel(): Unit
Cancel an ongoing ajax upload (only for ajax mode).
-open fun cancel(): Unit
open fun clearInput(): Unit
Clears the file input control (including the native input).
-open fun clearInput(): Unit
open fun focus(): Unit
Makes the input element focused.
-open fun focus(): Unit
open fun getNativeFile(kFile: KFile): File?
Returns the native JavaScript File object.
-open fun getNativeFile(kFile: KFile): File?
open fun getSnClass(): List<StringBoolPair>
Returns list of CSS class names for current widget in the form of a List.
-open fun getSnClass(): List<StringBoolPair>
open fun getValueAsString(): String?
Returns the value of the control as a String.
-open fun getValueAsString(): String?
open fun lock(): Unit
Locks the file input (disabling all buttons except a cancel button).
-open fun lock(): Unit
open fun removeEventListener(id: Int): Widget
Removes event listener from current widget.
-open fun removeEventListener(id: Int): Widget
open fun removeEventListeners(): Widget
Removes all event listeners from current widget.
-open fun removeEventListeners(): Widget
open fun resetInput(): Unit
Resets the file input control.
-open fun resetInput(): Unit
open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Int
Sets an event listener for current widget, keeping the actual type of component.
-open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Int
open fun unlock(): Unit
Unlocks the file input.
-open fun unlock(): Unit
open fun upload(): Unit
Trigger ajax upload (only for ajax mode).
-| - - | -
-open fun add(child: Component): SimplePanel
-Adds given component to the current container. - |
-
| - - | -
-open fun addAll(children: List<Component>): SimplePanel
-Adds a list of components to the current container. - |
-
| - - | -
-fun addInternal(child: Component): SimplePanel
-Protected and final method to add given component to the current container. - |
-
| - - | -
-open fun childrenVNodes(): Array<VNode>
-Returns the array of the children Snabbdom vnodes. - |
-
| - - | -
-open fun getChildren(): List<Component>
-Returns a list of children of the current container. - |
-
| - - | -
-open fun getValue(): List<KFile>?
-Returns the value of the control. - |
-
| - - | -
-open fun remove(child: Component): SimplePanel
-Removes given component from the current container. - |
-
| - - | -
-open fun removeAll(): SimplePanel
-Removes all children from the current container. - |
-
| - - | -
-open fun render(): VNode
-Renders current component as a Snabbdom vnode. - |
-
| - - | -
-open fun setValue(v: Any?): Unit
-Sets the value of the control. - |
+
val <T : Widget> T.changeFlow: <ERROR CLASS><T>val <T : Widget> T.changeFlow: Flow<T>
val <T : Widget> T.clickFlow: <ERROR CLASS><T>val <T : Widget> T.clickFlow: Flow<T>
val <T : Widget> T.inputFlow: <ERROR CLASS><T>val <T : Widget> T.inputFlow: Flow<T>
fun Component.addBsBgColor(bsBgColor: BsBgColor): Unitfun Component.addBsBorder(vararg bsBorder: BsBorder): Unitfun Component.addBsClearfix(): Unitfun Component.addBsColor(bsColor: BsColor): Unitfun Component.addBsRounded(vararg bsRounded: BsRounded): Unitfun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String> = setOf(), init: (Bold.() -> Unit)? = null): Bold
DSL builder extension function.
-fun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String> = setOf(), init: (Bold.() -> Unit)? = null): Bold
fun Container.button(text: String, icon: String? = null, style: ButtonStyle = ButtonStyle.PRIMARY, type: ButtonType = ButtonType.BUTTON, disabled: Boolean = false,