BrowserUI (sometimes stylised UF/BrowserUI) is the main frontend UI library module and component of Universal Framework, Confoederatio's main software engine. It typically contains regular DOM functions as well as more advanced context menus and dynamic custom frontend UIs that can be spawned into various containers utilising JSON5 logic. These functions, alongside their documentation, are generally presented below.
Functions.
createContextMenu()
- Creates a context menu within the DOM.
- arg0_options: (Object)
- anchor: (String/HTMLElement) - The query selector to pin a context menu to.
- class: (String) - The class prefix to prepend.
- do_not_append: (Boolean) - Whether to append or not.
- id: (String) - The ID of the context menu.
- name: (String) - Optional. Title of the context menu. Undefined; will not display by default.
- maximum_height: (String) - Optional. The height after which a scrollbar should appear in CSS units.
- maximum_width: (String) - Optional. Maximum width in CSS units.
- <input_key>: (Object)
- type: (String) - The type of HTML input to grab.
- 'basic_colour'
- biuf (Rich text input)
- default: (String) - The default string to input as a placeholder value. ‘Name’ by default.
- 'wysiwyg' (Full word editing; rich text multiline input)
- 'button'
- 'checkbox'
- attributes: (Object) - Optional. Any attributes to pass to each checkbox element.
- <attribute_key>: (String)
- default: (String) - Optional. The default ID to be checked. None by default.
- options: (Object)
- <key_name>: (String) - Value string is used for the display name of the given checkbox; key value is used as the ID of the given checkbox.
- 'color/colour'
- 'datalist'
- name: (String)
- options: (Object)
- <key_name>: (String) - Value string is used for the display name of the given datalist option; key value is used as the ID of the given datalist option.
- 'date'
- default_date: (Object, Date) - The date to set defaults to if applicable.
- multiple_rows: (Boolean) - Optional. Whether to split the date input onto two rows instead of one row. False by default.
- name: (String)
- 'date_length'
- 'email'
- 'file'
- 'hierarchy'
- 'hidden'
- 'html'
- name: (String) - The name of the .header class to have. Undefined by default.
- innerHTML: (String) - The HTML to append to this cell.
- 'image'
- 'number'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- 'password'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- 'radio'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- 'range'
- attributes: (Object) - Optional. Any attributes to pass to pass to the range element.
- max: (Number)
- min: (Number)
- value_equation: (String) - The value equation for the given range element.
- name: (String)
- options: (Object)
- VALUE: (Number) - The main placeholder to use for the given range.
- 'reset'
- 'search_select'
- 'select'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- options: (Object)
- <key_name>: (String) - Value string is used for the display name of the given select option; key value is used as the ID of the given select option.
- ‘sortable_list’
- 'submit'
- 'tel/telephone'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- 'text'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- 'time'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- 'url'
- attributes: (Object) - Optional.
- <attribute_key>: (String)
- name: (String)
- icon: (String) - Optional. The path to the display icon image.
- name: (String) - Optional. The JS code to execute on button click.
- tooltip: (String) - Optional. The HTML tooltip a user can see by hovering over this input.
- height: (Number) - Optional. The row height of this element in a grid. 1 by default.
- width: (Number) - Optional. The column width of this element in a grid. 1 by default.
- x: (Number) - Optional. The X position of the element in a grid. 0 by default.
- y: (Number) - Optional. The Y position of the element in a grid. n + 1 by default, where n = last row.
- return_html: (Boolean) - Optional. Whether to return the html_string instead of modifying the anchor element. False by default.
- Returns: (HTMLElement)
Main article(s): BrowserUI TODO