CodeCoupler UI Stage "Sidebar"
Sidebar is an stage object which will build a sidebar on the left side of the current stage and
provide a new stage on the right side. The stage will display icons which start an application,
execute a user defined function or opens a list in a subnavigation flyout, in which the items can
also start an application or execute a user defined function.
The sidebar is divided into four parts:
- You can optionally display a logo image at the top of the sidebar.
- You can distribute your icons into a "main" and a "system" area.
- The switcher will display a wider sidebar with names to the right of the icon.
Options
-
logo: Path to image of the logo to insert in the Logo Area. If not set the logo area will be removed.
-
items: object[]
Array of icons to display in the sidebar.
-
items[].roles: string[]
Allowed rolenames for this icon. If the roles of the current user do not match, the icon will not displayed.
-
items[].scopes: string[]
Allowed scopenames for this icon. If the scopes of the current user do not match, the icon will not displayed.
-
items[].area: string
In which area should this icon displayed. Can be
mainorsystem. -
items[].type: string
Type of this entry. Can be
app,functionorgroup. -
items[].ui: CodeCoupler Application Object
In case of type is
appthis will overwrite theuiproperty of the application to start. In case of type isgrouporfunctionthis is mandatory and the minimum properties should benameandiconHtml. You could omiticonHtmlif the entry is inside a subgroup.
Application specific options (only relevant if type is app):
-
items[].app: CodeCoupler Application Object
The application class to start.
-
items[].options: any
The options with which will start the application.
-
items[].panel: object
The panel options with which will start the application.
-
items[].id: boolean
If true, the app will start only once. If the icon will be clicked multiple times, the running application will just be fronted.
Group specific options (only relevant if type is group):
-
items[].items: object[]
This array is the same as the
itemsarray, with a difference: Entries of typegroupare not allowed here.
Function specific options (only relevant if type is function):
-
items[].click: function
Function to execute if the user clicks on the icon.
Styling
Use this template to change the colors of the sidebar:
Details
Sidebar will insert a new div into the current stage with two underlying container:
Two of .cc-sidebar-nav will be inserted into the container. One of them is the sidebar which will
be displayed at beginning and shows only icons. The second one displays the names to the right of
the icons. The second one is absolute positioned and will be displayed if the user clicks the
switcher. The container of the two sidebars have different additional classes:
<nav class="cc-sidebar-nav small"><nav class="cc-sidebar-nav full">
The basic structure of the sidebar container is:
Each icon is build inside the system and main area with the following template:
Each icon will display a tooltip. The tooltips will be created outside of the sidebar container. The tooltips use the following template:
Furthermore for each group an flyout container will be inserted into the stage container:
<nav class="cc-sidebar-flyout">
They are absolute positioned and have the following structure:
Each list item inside the body area is build with the following template: