Abstract
Called from the Console when a new conlet type is added.
the conlet type
the display names for the conlet type by lang
the render modes
of components to be added to the page
Abstract
closeCalled by the Console to close a modal dialog when a corrsponding request is received from the server.
the container for the dialog
Called from the console when the connection to the server is suspended. The default implementation logs a warning message. Should be overridden by a method that displays a modal dialog.
The connection can be resumed by invoking the function passed as argument.
called when resuming
Find the conlet representations that display content.
The default implementation wraps all nodes that match
body .conlet.conlet-content
. If a conletId
is specified,
the the result set is restricted to conlets with this id.
Optional
conletId: stringthe conlet id
the conlets found
Find the conlet representation that displays the preview of the
conlet with the given id. The default implementation wraps
the node with .conlet-preview[data-conlet-id='<conletId>'
.
the conlet id
the conlet or null
Find the conlets that display the preview, view or content of
the conlet with the given id. The default implementation wraps
all nodes with .conlet[data-conlet-id='<conletId>'
in
DefaultConlets.
the conlet id
the conlets found
Find conlet representations that display content and
are embedded in the given conlet (which is most likely a view
or preview, but may also be a content representation).
The default implementation wraps all nodes (with the exception
of the argument's element) that match
.conlet.conlet-content
and returns them in a depth first order.
the containing conlet
the conlets found
Find the HTML element that displays a modal dialog associated
with the conlet with the given id. The default implementation returns
all nodes with .conlet-modal-dialog[data-conlet-id='<conletId>'
.
the conlet id
the HTML element or null
Called from Console.init with the options passed to Console.init.
the options
Called from the Console when the console layout is received from the server.
the conlet ids from top left to bottom right
the ids of the conlets viewable in tabs
extra information spcific to the console implementation
Called by the Console to displays a notification.
the content to display
the options
Abstract
openCalled by the Console to open a modal dialog.
The container has a generated dialog id and attributes
data-conlet-type
and data-conlet-id
. If
ModalDialogOptions.useSubmit is true
, the submit button
generated by the console must be linked to the form
in the
content. By convention, this is done using the dialog's id
with "-form" appended (i.e. used as the form's id
ans the
button's form
attribute).
the container for the dialog
the options
the content as HTML
Called from the Console to update a conlet that is used to provide content. The default implementation removes all children from the container and inserts the new content.
the conlet as returned from e.g. Renderer.findConletContents
the component content as DOM received from the server, usually inserted into the container
Called by the Console to update the modes of the conlet with the given id.
the conlet id
the modes
Called from the Console to update the preview of
the given conlet. If the preview is new (no preview with the
given conlet id exists), the console provides DOM for the
container as a convenience. Implementations of this method
are free to extract the data from the container
argument
and provide their own markup for a new container.
true
if it is a new (not yet existing) conlet preview
the container for the preview representation. Either the result from Renderer.findConletPreview, if an existing preview is updated, or a prepared container for the preview, provided as:
<section class='conlet conlet-preview'
data-conlet-type='...' data-conlet-id='...'
data-conlet-grid-columns='...' data-conlet-grid-rows=' '></section>
the supported conlet modes
the preview content as DOM received from the server, usually inserted into the container
true
if the preview (i.e. the overview
plane) is to be made the active tab
Called bythe Console to update the title of the conlet with the given id.
the conlet id
the new title
Called from the Console when a conlet type is removed.
The expected action of the renderer is to remove the conlet type from e.g. a menu that allows adding conlets. However, front-ends can also force a reload of the application.
the conlet type
the render modes
Called from the Console to update the view of the given conlet.
If the view is new (no view with the
given conlet id exists), the console provides DOM for the
container as a convenience. Implementations of this method
are free to extract the data from the conatiner
argument and
provide their own markup for a new container
true
if it is a new conlet view
the container for the view representation. Either the result from Renderer.findConletView, if an existing preview is updated, or a new container provided as:
<article class="conlet conlet-view
data-conlet-type='...' data-conlet-id='...'"></article>"
the supported conlet modes
the view content, usually inserted into the container
true
if the view
is to be made the active tab
Protected
wrapProtected
wrap
A base class for implementing a web console renderer. The renderer creates the DOM for the SPA, usually based on some initial DOM from the console page. It also provides methods for the management of the conlets' representations in the DOM tree.