rcube_treelist_widget()

new rcube_treelist_widget()

Roundcube Treelist widget class

Methods

inner collapse()

Collapse a the node with the given ID

inner collapse_all()

Collapse all expanded nodes

inner dom2id()

Get the (stripped) node ID from the given DOM element

inner drag_end()

Signal that dragging has stopped

inner drag_scroll()

Scroll list container in the given direction

inner drag_start()

When dragging starts, compute absolute bounding boxes of the list and it's items for faster comparisons while mouse is moving

inner draggable(object)

Wrapper for jQuery.UI.draggable() activation on this widget
Parameters:
Name Type Description
object Options as passed to regular .draggable() function

inner droppable(object)

Wrapper for jQuery.UI.droppable() activation on this widget
Parameters:
Name Type Description
object Options as passed to regular .droppable() function

inner expand()

Expand a the node with the given ID

inner expand_all()

Expand all collapsed nodes

inner focus_noscroll()

Focus the given element without scrolling the list container

inner get_item()

Return the DOM element of the list item with the given ID

inner get_node()

Return the DOM element of the list item with the given ID

inner get_selection()

Getter for the currently selected node ID

inner get_state()

Read node collapse state from localStorage

inner id2dom()

Get the
  • element for the given node ID
  • inner in_selection()

    Check if given id is selected This is for consistency with rcube_list_widget

    inner index_data()

    Recursively walk the data tree and index nodes by their ID

    inner insert()

    Insert the given node

    inner intersects()

    Determine if the given mouse coords intersect the list and one of its items

    inner keypress()

    Handler for keyboard events on treelist

    inner remove()

    Remove the item with the given ID

    inner render()

    Render the tree list from the internal data structure

    inner render_node()

    Render a specific node into the DOM list

    inner reset()

    inner resort_node()

    Helper method to sort the list of the given item

    inner save_state()

    Save node collapse state to localStorage

    inner scroll_to_node()

    Scroll the parent container to make the given list item visible

    inner search()

    inner select()

    Select a tree node by it's ID

    inner toggle()

    Toggle collapsed state of a list node

    inner update_data()

    (Re-)read tree data from DOM

    inner update_dom()

    Apply the 'collapsed' status of the data node to the corresponding DOM element(s)

    inner update_node()

    Update properties of an existing node

    inner walk_list()

    Recursively walk the DOM tree and build an internal data structure representing the skeleton of this tree list.