%DeepSee.Component.coverView
Class %DeepSee.Component.coverView Extends (%ZEN.Component.component, %ZEN.Component.dataView) [ System = 3 ]
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.
Parameters
NAMESPACE
Parameter NAMESPACE = "http://www.intersystems.com/deepsee";
DEFAULTENCLOSINGCLASS
Parameter DEFAULTENCLOSINGCLASS = "dsCoverDiv";
Properties
onselect
Property onselect As %ZEN.Datatype.eventHandler;
onselect event handler: If defined, this event is fired when the user clicks on a cover.
onactivate
Property onactivate As %ZEN.Datatype.eventHandler;
onactivate event handler: If defined, this event is fired when the user invokes an action on a cover.
ongetdetails
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.
selectedIndex
Property selectedIndex As %ZEN.Datatype.integer [ InitialExpression = -1 ];
Index (0-based) of selected cover.
designMode
Property designMode As %ZEN.Datatype.boolean [ InitialExpression = 0 ];
True for cover editor page.
defaultCategory
Property defaultCategory As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Others","%DeepSee")} ];
Category to use for items with no category.
zoomLevel
Property zoomLevel As %ZEN.Datatype.integer(XMLPROJECTION = "none", ZENSETTING = 0) [ InitialExpression = 1 ];
Zoom level (1,2 or 3).
selectedElement
Property selectedElement As %ZEN.Datatype.string(ZENSETTING = 0);
Used by cover editor.
onselectelement
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.
ongetdata
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.
ongetitemcontext
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.
backgroundStyle
Property backgroundStyle As %ZEN.Datatype.style;
Style applied to coverView background and category labels.
XDatas
Style
XData Style
defines style sheet used by this component
Methods
%DrawHTML
Method %DrawHTML()
renderContents
ClientMethod renderContents() [ Language = javascript ]
Client-side method to render this control.
getCoverArt
ClientMethod 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.
getText
ClientMethod getText(text, context) [ Internal, Language = javascript ]
Get text to display. Resolve any $vars using the context array if present.
itemClick
ClientMethod itemClick(idx) [ Internal, Language = javascript ]
User click on an item.
getCoverObject
ClientMethod getCoverObject(index) [ Language = javascript ]
Given its index (0-based), return the book object for a cover.
setCoverObject
ClientMethod setCoverObject(index, book) [ Language = javascript ]
Given its index (0-based), set the book object for a cover.
selectCover
ClientMethod selectCover(index, force) [ Language = javascript ]
Select a cover given its index (0-based).
activateCover
ClientMethod activateCover(evt, index, action) [ Language = javascript ]
Invoke the given action for the given cover.
evalSpec
ClientMethod evalSpec(spec) [ Language = javascript ]
Convert a spec string into a spec object.
specToString
ClientMethod specToString(specObj) [ Language = javascript ]
Convert a display spec back into a json string.
setProperty
ClientMethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
notifyViewHandler
ClientMethod notifyViewHandler(reason, data1, data2, data3) [ Language = javascript ]
Notification that the dataController associated with this dataView has raised an event.
selectElement
ClientMethod selectElement(which, notify) [ Language = javascript ]
Select an element within the cover.
moveSelector
ClientMethod moveSelector(targetDiv) [ Internal, Language = javascript ]
Move the element selector.
selectorMouseDown
ClientMethod selectorMouseDown(evt) [ Language = javascript ]
User has clicked on the element selector.
escapeJS
ClientMethod escapeJS(str) [ Language = javascript ]
Utility method. Escape a javascript string.
getModel
ClientMethod getModel() [ Language = javascript ]
Get the model used to drive the view.
showPopup
ClientMethod showPopup(index) [ Internal, Language = javascript ]
Show a popup info box for the current item.
hidePopup
ClientMethod hidePopup() [ Internal, Language = javascript ]
Show a popup info box for the current item.
showActivateButton
ClientMethod showActivateButton(index) [ Internal, Language = javascript ]
Show the activate button for the given cover.
hideActivateButton
ClientMethod hideActivateButton(index) [ Internal, Language = javascript ]
Hide the activate button for the given cover.
parseStyle
ClientMethod parseStyle(style) [ Language = javascript ]
Utility method. Split a css value into individual style values. Return an object containing these values.