| Age | Commit message (Collapse) | Author |
|
A label on input can be a string or another HTMLElement.
|
|
|
|
|
|
|
|
The WuiInputCheckboxes class can create an HTML input for selecting one
or more item using checkbox.
The class require the following options: label, name, and options; and
optionally id, hint, is_disabled, and onChangeHandler.
The onChangeHandler receive all checked values.
|
|
The WuiInputSelect create an HTML input for selecting one more item.
|
|
The WuiInputString create an HTML input for string with predefined
options.
The required options are "label" and "value".
|
|
The WuiInputNumber create an HTML input that allow number only, with
optional max and min options.
The required options is "label" and "value".
Format of generated HTML output,
<div [id=${id}] class="${WUI_INPUT_NUMBER_CLASS}">
<div>
<label class="${WUI_INPUT_NUMBER_CLASS_LABEL}">${label}</label>
<input
class="${WUI_INPUT_NUMBER_CLASS_INPUT}"
[max=${max}]
[min=${min}]
[disabled=${is_disabled}]
value=${value}
>
<span class="${WUI_INPUT_NUMBER_CLASS_HINT_TOGGLER}">i </span>
</div>
<div class="${WUI_INPUT_NUMBER_CLASS_HINT}">${hint}</div>
</div>
User can set onChangeHandler to receive new value when the value
changes and valid; otherwise, if the value is invalid, the input
background will changes accordingly.
|
|
In order to minimize dependencies with require.js, we set the "lib",
"target" and "module" to es2015 and "esModuleInterop" to true to
allow module importable on browser.
|
|
|
|
Since WuiVfsNode does not have any methods then and the constructor
only initialize the value to zero, we remove the type and use the
interface instead.
|
|
|
|
|
|
While at it, fix the return type of Open and OpenNode on WuiVfsOptions
to be Promise.
|
|
|
|
|
|
The OpenNode define an handler that will be called when a node is
clicked from the WuiVfsList.
|
|
This is to fix the notification hidden when the current document have
scroll.
|
|
|
|
|
|
Previously, the WuiVfsOptions contains two handlers: ListNodes to
retrieve list of files and OnClickNode for triggering changes when
user click a path or item in the list.
This changes simplify it into single handler: Open, which accept
path and boolean is_dir.
|
|
Previously, the Open method call the predefined options OpenFile,
which in turn may send request to remote server.
This changes simplify it by accepting node interface that has been
filled with content and metadata.
|
|
Previously, to clear selection, user must set the editor to active
by selecting any line.
This commit allow user to clear selection by pressing "Escape" anywhere
on the document.
While at it, add methods to turn on or off the editor editability.
|
|
This commit changes the WuiVfsOptions.istNodes and
WuiEditorOptions.OpenFile to WuiResponseInterface.
WuiResponseInterface define an interface that will be returned by function
or method with non-void type.
If the function/method success, the code should be set to 200 (equal to
HTTP OK), and the data will contains the expected data for that function.
If the function/method call failed, the code should be set to other value
beside 200 with a message describe why its failed.
|
|
* Use snake_case for field, variable, HTML ID, and CSS class names.
* Use camelCase for class, interface, type, function, or method names.
* An exported type or class. interface, type, method, or function name
MUST start with an upper-case letter.
* An exported class, type, interface, or function MUST be prefixed with
"Wui".
|
|
|
|
The WuiNotif implement the HTML interface to display pop-up notification.
The notification can be triggered by calling method Info() or Error().
Each pop-up has 5 seconds duration, after that they will be removed
automatically.
|
|
|
|
When user press CTRL+S on the editor, it will trigger the OnSave handler.
While at it,
* auto scroll when pressing arrow up or down
* auto scroll to bottom when pressing Enter at the end of file
* fix tab key not inserting tab characters
|
|
The is_dir parameter indicated that the node is a directory.
|
|
While at it, change the border to silver and use console.error for
logging an error message.
|
|
If the node is directory the background color is cornsilk, otherwise
the background color is white.
|
|
|
|
The GetContent method return the concatenated statements with new-line.
While at it, set default range begin and end to -1 to fix issue where
user select only line number 1 (index 0).
|
|
The GetFile method return the current file as IVfsNode, including its
content (concatenated).
The GetSelectionRange return the current selection on the editor.
|
|
|
|
The OnSelection event will be triggered when user select one or more
lines.
|
|
The OnClickNode event will be send when user click non-directory files.
|
|
|
|
|
|
|
|
|
|
Previously copy or cutting text on line and pasting it will generate
<span> inside the line.
This commit fix the paste function to paste only text.
|
|
Enter on middle of line now will cut the text and move the rest text
after caret to the next line.
Pressing backspace on the beginning of line will merge the line with
previous one.
|
|
|
|
|
|
|
|
The vfs.js implement the web user interface for virtual file system
explorer.
|