class %DeepSee.Component.coverView
extends %ZEN.Component.component, %ZEN.Component.dataView
Cover view component.
This provides an way to display a set of options as "book covers".
Each cover is defined by a javaScript object or its string equivalent in JSON format.
parameter DEFAULTENCLOSINGCLASS = "dsCoverDiv";
Subclasses can set this to change default enclosingClass used for this
component.
parameter NAMESPACE = "http://www.intersystems.com/deepsee";
This is the XML namespace used for library components.
property backgroundStyle
as %ZEN.Datatype.style;
Style applied to coverView background and category labels.
property defaultCategory
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Others","%DeepSee") ];
Category to use for items with no category.
property designMode
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
True for cover editor page.
property onactivate
as %ZEN.Datatype.eventHandler;
onactivate event handler:
If defined, this event is fired when the user invokes an action on a cover.
property ongetdata
as %ZEN.Datatype.eventHandler;
ongetdata event handler:
If defined, this event is returns an array of items to be displayed within this component.
property ongetdetails
as %ZEN.Datatype.eventHandler;
ongetdetails event handler:
If defined, this event is fired in order to get a list of popup details for a cover.
property ongetitemcontext
as %ZEN.Datatype.eventHandler;
ongetitemcontext event handler:
If defined, this returns a context object for the given cover. This is used to resolve $var
references within covers.
property onselect
as %ZEN.Datatype.eventHandler;
onselect event handler:
If defined, this event is fired when the user clicks on a cover.
property onselectelement
as %ZEN.Datatype.eventHandler;
onselectelement event handler:
Design mode only. If defined, this event is fired when the user clicks on a cover element.
property selectedElement
as %ZEN.Datatype.string(ZENSETTING=0);
Used by cover editor.
property selectedIndex
as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Index (0-based) of selected cover.
property zoomLevel
as %ZEN.Datatype.integer(XMLPROJECTION="none",ZENSETTING=0) [ InitialExpression = 1 ];
Zoom level (1,2 or 3).
method %DrawHTML()
Static HTML display method: draw the BODY of this component
as HTML.
Subclasses implement this in order to render the static HTML
contents of a component.
method activateCover(evt, index, action)
[ Language = javascript ]
Invoke the given action for the given cover.
method escapeJS(str)
[ Language = javascript ]
Utility method. Escape a javascript string.
method evalSpec(spec)
[ Language = javascript ]
Convert a spec string into a spec object.
method getCoverArt(index, book, popupMode)
[ Language = javascript ]
Get HTML for one book cover.
A spec is a ^-delimited string of rendering instructions.
Each piece takes the form: "type:header;text:ABC;style:prop:val;"
style is always at the end.
method getCoverObject(index)
[ Language = javascript ]
Given its index (0-based), return the book object for a cover.
method getModel()
[ Language = javascript ]
Get the model used to drive the view.
method notifyViewHandler(reason, data1, data2, data3)
[ Language = javascript ]
Notification that the dataController associated with this dataView
has raised an event.
method parseStyle(style)
[ Language = javascript ]
Utility method. Split a css value into individual style values.
Return an object containing these values.
method renderContents()
[ Language = javascript ]
Client-side method to render this control.
method selectCover(index, force)
[ Language = javascript ]
Select a cover given its index (0-based).
method selectElement(which, notify)
[ Language = javascript ]
Select an element within the cover.
method selectorMouseDown(evt)
[ Language = javascript ]
User has clicked on the element selector.
method setCoverObject(index, book)
[ Language = javascript ]
Given its index (0-based), set the book object for a cover.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method specToString(specObj)
[ Language = javascript ]
Convert a display spec back into a json string.