Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Asset Information Management

The Tabs Panel

  • Last UpdatedMay 10, 2023
  • 3 minute read

This section describes the parameters that can be used in the JS file when creating an extension to add a tab to Tabs Panel.

You must register both of the following:

  • A route - a path to use when linking to the tab.

  • A tab with the content tabbing mechanism

It is possible to define two types of tabs:

  • Static

  • Dynamic

Routing

Registration

Method: ContentTabsRoutingProvider.register(path, options)

Registration Definition Parameters

Parameter

Description

Required/ Optional

Default
Value

path

The path for the route.

Note: For details, refer to https://docs.angularjs.org/api/ngRoute/provider/$routeProvider path documentation.

We reserve the right to use any English language route. At the moment we use this route: /item/*

Make sure that you use a path that is a unique, but understandable name.

Required

options

The options for the route.

Note: For details, seehttps://docs.angularjs.org/api/ngRoute/provider/$routeProvider route documentation.

Optional

Static (ContentTabs.types.static)

Registration

Method: ContentTabs.register(id, definition)

Registration Definition Parameters

Parameter

Description

Required/
Optional

Default Value

directive

The name of the directive to use, to fulfill the functionality.

Required

text

The text to display for the tab header or a function that returns the text for the tab header.

Required

type

The type of the tab. ContentTabs.types.static

Required

href

The href for the tab should correspond to the route, you registered in with ContentTabsRoutingProvider

Required

icon

The icon to display in the tab header.

Optional

App/src/img/ClassDriven/default.gif

order

The order that this tab should be displayed on the tab bar when initially loaded. After that point, the order that tabs are opened takes over.

Optional

10000

Dynamic (ContentTabs.types.dynamic)

Registration

Method: ContentTabs.register(id, definition)

Registration Definition Parameters

Parameter

Description

Required/
Optional

Default Value

type

The type of the tab. ContentTabs.types.dynamic

Required

text

A string representing a property on each object in the tabs array, where the value will be used as the name for the tab.

Required

tabs

An array for which each element will be a tab.

Required

retainDOM

A string representing a property on each object in the tabs array, where the value will be used to retain the DOM for that tab when the tab is changed. true/false

Optional

false

order

The order that this tab should be displayed on the tab bar when initially loaded. After that point the order that tabs are opened takes over.

Optional

10000

onCloseAll

A function that is called when a user chooses to close all tabs.

Required

(CanClose)

onClose

A function that is called when a tab is closed passing the id from the id field of the tab to be closed.

Required

(CanClose)

loading

A string representing a property on each object in the tabs array, where the value will be used to show whether the tab is loading.

Required

loaded

A string representing a property on each object in the tabs array, where the value will be used to show whether the tab is loaded.

Required

id

A string representing a property on each object in the tabs array, where the value will be used as the id for the tab. Must be unique for each tab.

Required

icon

A string representing a property on each object in the tabs array, where the value will be used as icon name.

Optional

App/src/img/ClassDriven/default.gif

href

A function that will be called with the item in tabs array and should return the url to that tab.

Required

directive

The name of the directive to use to fulfill the functionality.

Required

canClose

A boolean which specifies whether the tab can be closed after it is opened.

Optional

false

Directive

Directive Scope Parameters

Parameter

Description

Required/Optional

item

The item from the array that this is a tab for.

Optional

In This Topic
TitleResults for “How to create a CRG?”Also Available in