Class
caplin.popout

Popout

Creates a popout window. The opened window may contain any content, with the caveat that it references caplin.popout.PopoutService. Typically this content will be a representation of a component "popped out" of the main application's window. A Popout may have properties set on it, and events fired on it, both of which will be reflected on the caplin.popout.PopoutService in the popout window, allowing communication between the opening window and the popout window. This class uses emitr, and fires the following events:
caplin.popout.Popout.EVENTS.POPOUT_READY
Fired after #_onPopoutWindowReady has completed.
caplin.popout.Popout.EVENTS.POPOUT_BLOCKED
Fired if the browser blocks the popout window from opening.
caplin.popout.Popout.EVENTS.POPOUT_TIMEOUT
Fired if the popped out window takes longer than a given time to open. This is 10000ms by default, and can be set using the 'CAPLIN.POPOUT.TIMEOUT.LOAD' property on caplin.config-service.
caplin.popout.Popout.EVENTS.POPOUT_CLOSED
Fired when the popped out window is closed.
caplin.popout.Popout.EVENTS.PROPERTIES_CHANGED
Fired when the properties of this Popout are changed. Event args: {map} properties A map of the new values of the changed properties.
caplin.popout.Popout.EVENTS.POPOUT_RESIZED
Fired when the popped out window is resized. Event args: {int} width The new width of the popped out window, {int} height The new height of the popped out window.

Constructor Summary

Attributes Name and Description
caplin.popout.Popout(string relativeUrl, object windowParameters)

Method Summary

Attributes Name and Description
void close()

Closes the popout window.

void fireEvent(string name, Object properties)

Fires the given event both on this object and on the caplin.popout.PopoutService in the popout window.

map getProperties()

Gets the properties for this Popout.

var getProperty(String propertyName)

Gets the value for a given property.

map getWindowGeometrics()

Returns the current position and dimensions of the popout window.

void open(int width, int height)

Opens the popout window with the given width and height.

void setProperties(Object properties)

Sets properties for this Popout that can be accessed in the popped out window using the PopoutService's getProperty and getProperties methods.

Constructor Detail

caplin.popout.Popout(string relativeUrl, object windowParameters)

Parameters
string relativeUrl The relative URL that the popped out window will use.
object windowParameters Parameters to be passed to the window.open call.

Method Detail

void close()

Closes the popout window.

void fireEvent(string name, Object properties)

Fires the given event both on this object and on the caplin.popout.PopoutService in the popout window.

Parameters
string name The name of the event.
Object properties A map of properties to be passed along with the event.

map getProperties()

Gets the properties for this Popout.

Returns
{map} properties The map of properties for this popout.

var getProperty(String propertyName)

Gets the value for a given property.

Parameters
String propertyName The name of the property to get.
Returns
{var} The value of the property.

map getWindowGeometrics()

Returns the current position and dimensions of the popout window.

Returns
{map} Contains geometric properties with integer values. Included properties are: 'width', 'height', 'left' and 'top'.

void open(int width, int height)

Opens the popout window with the given width and height.

Parameters
int width The desired width for the opened window.
int height The desired height for the opened window.

void setProperties(Object properties)

Sets properties for this Popout that can be accessed in the popped out window using the PopoutService's getProperty and getProperties methods.

Parameters
Object properties The map of properties to set.