Class Index | File Index

Classes


Class PanelControl

Identifies a panel, and provides a UI construction facility. Instances of this class are passed as arguments to the panel-* events from content-studio. It allows extensions to identify panel events, and to initialize a UI inside a particular panel.

Class Summary
Constructor Attributes Constructor Name and Description
 
This class is typically only instantiated by Content Studio.
Field Summary
Field Attributes Field Name and Description
 
uri
The (full) URI of the panel in question.
Method Summary
Method Attributes Method Name and Description
 
show(ui, options)
Initialize the panel with the specified type of UI and with the options provided in options.
Class Detail
PanelControl()
This class is typically only instantiated by Content Studio.
Field Detail
{String} uri
The (full) URI of the panel in question. Used to distinguish panel events from one another, and for cooperating extensions that share panels.
Method Detail
show(ui, options)
Initialize the panel with the specified type of UI and with the options provided in options.
Parameters:
{String} ui
The type of user interface to be shown. Currently "list" and "browser" are supported.
{Object} options
A map containing configuration options for the UI. For a "list" user interface, the following options are supported:
  • columns
  • span
The following example illustrates the correct structure of an options map:
  var options = {
    'columns': [
      {
        'title' : 'From',
        'property' : 'from'
      },
      {
        'title' : 'When',
        'property' : 'when'
      }
    ],
    'span' : {
      'rows' : 3,
      'property' : 'summary'
    }
  };

The columns option is an array of column definitions. Each column definition consists of two values: title (the column title) and property (the column's identifier, used when adding values to the list). The span option can be used to add a larger list entry that spans all the columns in the list. It consists of two values: rows (the maximum number of rows spanned entries can occupy) and property (the column's identifier, used when adding values to the list).

For a "browser" user interface, no options are required.

Returns:
An object representing the specified user interface:

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Jan 19 2017 11:25:10 GMT+0100 (CET)