Creates an instance of FileDialog.
Reference to the core API namespace
Reference to the core GUI namespace
Each model has its own local announcement system to handle all local events inside that model.
This observable object is propagate to all the UI elements (AFXTag) inside the model
The argument of the model
Placeholder for the process creation timestamp
Placeholder of the dialog input data
Reference to the model's dialog
Placeholder for the dialog callback on exit
The HTML element ID of the virtual desktop
Placeholder for the UI scheme to be rendered. This can be either the string definition of the scheme or the VFS file handle of the scheme file
Placeholder indicates whether the sub window is in modal mode. This value is reserver for future use
The class name
Reference to the parent of the current sub-window
The process number of the current model. For sub-window this number is the number of the parent window
Reference the DOM element of the UI scheme belong to this model
Reference to the system setting
The javascript or css files that the model depends on. All dependencies will be loaded before the model is rendered
Store the last opened directory
Place holder for model meta-data
If the markup
variable is not provided, then
the init function will find the scheme definition
in this class variable
Allow singleton on this model
Reference to the CSS Element of the model
Different model type
Getter: get the local announcer object
Open a YesNoDialog to confirm a task
YesNoDialog input data
Execute a server side script and get back the result
execution indication, should be:
{
path?: string, // VFS path to the server side script
code: string, // or server side code to be executed
parameters: any // the parameters of the server side execution
}
Report a global error
error message
Report a global fail event
fail message
Find a HTMLElement in the UI of the model
using the data-id
attribute of the element
Hide the sub-window
Render the dialog using the UI scheme provided by either
the markup
instance variable or the scheme
class variable
Return the parent meta-data of the current sub-window
Publish a global notification
notification string
Unsubscribe an event
event name or *
(all events)
Subscribe to a local event
event name
event callback
subscribe once to a local event
name of the event
event callback
Function called when dialog exits
Open a dialog
a dialog object or a dialog class name
A promise on the callback data of the dialog, refer to each dialog definition for the format of the callback data
VFS path to the model asset
Trigger a global event
event name
event message
Exit the sub-window
Render the model's UI
VFS path to the UI scheme definition
Select all DOM Element inside the UI of the model using JQuery selector
Show the sub-window
Connect to the server side api using a websocket connection
Server side script can be execute inside the stream by writing data in JSON format with the following interface
{
path?: string, // VFS path to the server side script
code: string, // or server side code to be executed
parameters: any // the parameters of the server side execution
}
subscribe to an event on the global announcement system
event name
event callback
Throw an error inside the model
trigger a local event
event name
Update the model, this will update all its UI elements
Update the model locale
Publish a global warning
warning string
File dialog allows user to select a file/folder
Input data:
{ title: string, // window title root?: string, // the root path folder of the file view type?: "file"|"dir"|"app", // file type to be selected mimes?: string[], // mime types of file to be selected hidden?: boolean, // show/hide hidden file file?: string // file name }
Callback data:
{ file: string, // selected file path name: string // user input file name }