Class: Console

console-base-resource/jgconsole~Console()

Provides console related methods. A singleton is automatically created. Selected methods are made available in the JGConsole namespace.

Constructor

new Console()

Source:

Methods

addConlet(conletType, renderModes)

Sends a notification that requests the addition of a conlet.

Parameters:
Name Type Description
conletType string

the type of the conlet to add

renderModes Array.<string>

the requested render mode(s)

Source:

execOnApply(container)

Invokes the functions defined in data-jgwc-on-apply attributes. Must be invoked by edit dialogs when they are closed.

Parameters:
Name Type Description
container HTMLElement

the container of the edit dialog

Source:

lockMessageQueue()

Increases the lock count on the receiver. As long as the lock count is greater than 0, the invocation of handlers is suspended.

Source:

notifyConletModel(conletId, method, …params)

Send a notification with method notifyConletModel and the given conlet id, method and parameters as the notification's parameters to the server.

Parameters:
Name Type Attributes Description
conletId string

the id of the conlet to send to

method string

the method to invoke

params <repeatable>

the parameters to send

Source:

registerConletMethod(conletClass, methodName, method)

Registers a conlet method that to be invoked if a JSON RPC notification with method notifyConletView is received.

Parameters:
Name Type Description
conletClass string

the conlet type for which the method is registered

methodName string

the method that is registered

method function

the function to invoke

Source:

removePreview(the)

Requests the removal of a conlet preview. If a view of the conlet exists, it will be removed also.

Parameters:
Name Type Description
the string

conlet id

Source:

removeView(the)

Requests the removal of a conlet view.

Parameters:
Name Type Description
the string

conlet id

Source:

renderConlet(conletId, modes)

Sends a notification that requests the rendering of a conlet.

Parameters:
Name Type Description
conletId string

the conlet id

modes Array.<string>

the requested render mode(s)

Source:

send(the, …params)

Invokes the given method on the server.

Parameters:
Name Type Attributes Description
the string

method

params any <repeatable>

the parameters

Source:

setLocale(locale)

Sends a notification for changing the language to the server.

Parameters:
Name Type Description
locale string

the id of the selected locale

Source:

unlockMessageQueue()

Decreases the lock count on the receiver. When the count reaches 0, the invocation of handlers is resumed.

Source:

updateLayout(previewLayout, tabsLayout, xtraInfo)

Send the current console layout to the server.

Parameters:
Name Type Description
previewLayout Array.<string>

the conlet ids from top left to bottom right

tabsLayout Array.<string>

the ids of the conlets viewable in tabs

xtraInfo Object

extra information spcific to the console implementation

Source: