en | fr

The Ui class


This class manages some elements of the user interface and contains methods that are related to it.

You can also check out these classes for further information:


loadPartials

Loads the different partials. The skeleton has some placeholders that are waiting some contents to be loaded (e.g. sidebar).

Parameters

Returns null


render

Renders content or calls a method given an URI. There are two possible URI schemes:

Controller rendering

If a link is referencing a controller/action set, then this function will extract the controller name from the h-ref and call the appropriate method on the controller class.

Before rendering any action, the function first checks whether the controller is associated to any specific service and whether the latter is connected or not.

It also don’t barely call the specified action; the h-ref is first given to Router.to to match user’s preferences.

Call to a specific service

If the h-ref starts with a sharp (#) then it is considered as a call to a specific service class so just like for controller rendering, the service name and method are extracted from the h-ref and properly delegated.

Parameters

Returns Promise


loading

Shows the loader.

Parameters

Returns null


loaded

Hide the loader.

Returns null


loadNextRecords

Function that loads new records once we hit the bottom of the page.

Returns null


share

Puts the media’s URL in the clipboard.

Parameters

Returns null


tag

Displays a dialog to customize the tags of the file to download for SoundCloud and YouTube or to change them for a local file.

Parameters

Returns null


downloadStart

Displays a notification about download’s beginning and show the main download bar.

Parameters

Returns null


downloadEnd

Displays a notification about the download’s end and hides the main download bar if necessary.

Parameters

Returns null


downloadProgress

Updates the download bars’ progression.

Parameters

Returns null


hideShadow

Hide the black transparent shadow and its inner element (i.e. the video player or the dialog box).

Returns null


addToPlaylist

Displays a popup to add an element to a playlist.

Parameters

Returns null


pageSize

Tries to guess the number of records that should be loaded on the page.

Parameters

Returns Bool


scrollToPlayingElement

Scrolls to the current playing element or playlist.

Returns null