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:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
- 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 main
or system
.
- items[].type: string
Type of this entry. Can be app
, function
or group
.
- items[].ui: CodeCoupler Application Object
In case of type is app
this will overwrite the ui
property of the application to start. In
case of type is group
or function
this is mandatory and the minimum properties should be
name
and iconHtml
. You could omit iconHtml
if 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 items
array, with a difference: Entries of type group
are 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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
Details
Sidebar
will insert a new div
into the current stage with two underlying container:
1 2 3 4 5 6 7 8 9 |
|
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Each icon is build inside the system and main area with the following template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Each icon will display a tooltip. The tooltips will be created outside of the sidebar container. The tooltips use the following template:
1 2 3 4 |
|
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:
1 2 3 4 5 6 7 8 9 |
|
Each list item inside the body area is build with the following template:
1 2 3 |
|