File

core/action-bar/action-bar.component.ts

Description

This component is used as the outlet to show the action bars. In a c8ycli app it is by default placed on the bootstrap component.

Metadata

host {
}
selector c8y-action-bar
templateUrl ./action-bar.component.html

Index

Properties
Methods
Inputs
HostBindings

Inputs

hasTabs

Identifies if the current view has tabs. If yes, the action bar needs to move down.

Default value : false

isTabsHorizontal

Identifies if the tabs are aligned horizontally. If yes, the tabs don't need to move to the left.

Default value : false

items

The current items to display in the ActionBar.

Type : ActionBarItem[]

Default value : []

navigatorOpen

Identifies if the navigator is opened. If yes, the action-bar needs to move to the right.

Default value : false

HostBindings

class.c8y-ui-action-bar
class.c8y-ui-action-bar:
Default value : true

Adds the default c8y-ui-action-bar class.

hidden
hidden:

Returns true if no items are present and hides the action bar.

Methods

getSortedItems
getSortedItems(placement: "left" | "right" | "more")

Returns the items sorted by priority and grouped by the placement passed.

Parameters :
Name Type Optional
placement "left" | "right" | "more" No
Returns : any

Properties

isPageToolbarExpanded
isPageToolbarExpanded:
Default value : false

Identifies if in a mobile view the toolbar is expanded or not.

<div class="navbar-header">
  <button
    type="button"
    class="navbar-toggle collapsed"
    (click)="isPageToolbarExpanded = !isPageToolbarExpanded"
  >
    <span class="sr-only" translate>Toggle toolbar</span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
  </button>
</div>

<div id="page-toolbar" class="navbar-collapse" [collapse]="!isPageToolbarExpanded">
  <ul class="nav navbar-nav navbar-left">
    <ng-container *ngFor="let item of getSortedItems('left')">
      <ng-container *c8yOutlet="item.template"></ng-container>
    </ng-container>
  </ul>
  <ul class="nav navbar-nav navbar-right">
    <ng-container *ngFor="let item of getSortedItems('right')">
      <ng-container *c8yOutlet="item.template"></ng-container>
    </ng-container>
    <li class="no-remove more-wrapper" *ngIf="getSortedItems('more').length > 0">
      <div class="dropdown" dropdown>
        <button
          title="{{ 'More' | translate }}…"
          class="dropdown-toggle c8y-dropdown"
          dropdownToggle
          aria-haspopup="true"
          aria-expanded="false"
        >
          <span translate>More…</span>
          <i [c8yIcon]="'caret-down'"></i>
        </button>
        <ul class="dropdown-menu dropdown-menu-right" *dropdownMenu>
          <ng-container *ngFor="let item of getSortedItems('more')">
            <ng-container *c8yOutlet="item.template"></ng-container>
          </ng-container>
        </ul>
        <ul class="dropdown-menu visible-xs"> 
          <ng-container *ngFor="let item of getSortedItems('more')">
            <ng-container *c8yOutlet="item.template"></ng-container>
          </ng-container>
        </ul>
      </div>
    </li>
  </ul>
</div>

result-matching ""

    No results matching ""