Sidebar

iTop Customization

"How to" examples
DataModel

User Interface

Automation & Ticket management

Portal Customization

🔙 Back

JSPopupMenuItem

api

Class for adding an item into a popup menu that triggers some Javascript code

Note: This works only in the backoffice, \JSButtonItem for the end-user portal

parent

Tags

since 2.0

API synthesis

List of the public API methods. When manipulating JSPopupMenuItem, You can call those methods:

Public methods

__construct

api public

Class for adding an item that triggers some Javascript code
public __construct($sUID, $sLabel, $sJSCode, $aIncludeJSFiles = array())

Parameters

types name default description
string $sUID The unique identifier of this menu in iTop… make sure you pass something unique enough
string $sLabel The display label of the menu (must be localized)
string $sJSCode In case the menu consists in executing some havascript code inside the page, pass it here. If supplied $sURL ans $sTarget will be ignored
array $aIncludeJSFiles array() An array of file URLs to be included (once) to provide some JS libraries for the page.

AddCssClass

api inherited public

Adds a CSS class to the CSS classes that will be put on the menu item
public AddCssClass($sCssClass)

Parameters

types name default description
$sCssClass

Inherited from \ApplicationPopupMenuItem

GetIconClass

api inherited public

public GetIconClass()

Parameters

none

Returns

string

Inherited from \ApplicationPopupMenuItem

Tags

since 3.0.0

GetTooltip

api inherited public

public GetTooltip()

Parameters

none

Returns

string

Inherited from \ApplicationPopupMenuItem

Tags

since 3.0.0

SetCssClasses

api inherited public

public SetCssClasses($aCssClasses)

Parameters

types name default description
$aCssClasses

Inherited from \ApplicationPopupMenuItem

SetIconClass

api inherited public

public SetIconClass($sIconClass)

Parameters

types name default description
$sIconClass

Inherited from \ApplicationPopupMenuItem

Tags

since 3.0.0

SetTooltip

api inherited public

public SetTooltip($sTooltip)

Parameters

types name default description
$sTooltip

Inherited from \ApplicationPopupMenuItem

Tags

since 3.0.0

🔙 Back

latest/customization/api/extensions/jspopupmenuitem.txt · Last modified: 2024/09/10 10:25 by 127.0.0.1
Back to top
Contact us