12.07.2015 Views

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Schedule CalendarSet pInfo(day,time,n) =$LISTBUILD(duration,id,text,type,style)Where:– duration is an integer specifying the number of minutes to reserve for this time slot in the schedule.– id is an integer that the onselectitem event handler will use to uniquely identify this time slot when it is selectedin the schedule.– text is the text description to display in this time slot in the schedule.– type is either 0 or 1:• 0 is an unavailable time slot• 1 is a scheduled time slot– style is a CSS style to apply to this time slot in the schedule. This value overrides any competing styles that mightotherwise apply to this time slot.The following example sets up a 60-minute staff meeting at 9 a.m. on the given start date, designates it as a scheduled timeslot, and colors its background green on the schedule calendar display:ClassMethod GetScheduleInfo(ByRef pParms As %String,pStartDate As %Date,pEndDate As %Date,ByRef pInfo As %List)As %Boolean{Set pInfo(pStartDate,9*60,1)= $LB(60,1,"Staff Meeting",1,"background: green;")Quit 1}You can also provide a style that applies to all of the time slots in a particular day by setting a top node of the pInfo arrayto a CSS style value. For example:Set pInfo(day) = "background: yellow;"9.8.2 AttributesThis topic has already described the OnGetScheduleInfo attribute in detail. The following table lists all the attributes.Attribute<strong>Zen</strong> componentattributesDescription has the same general-purpose attributes as any <strong>Zen</strong> component.For descriptions, see these sections:• “Behavior” in the “<strong>Zen</strong> Component Concepts” chapter of <strong>Using</strong> <strong>Zen</strong>• “Component Style Attributes” in the “<strong>Zen</strong> Style” chapter of <strong>Using</strong> <strong>Zen</strong><strong>Using</strong> <strong>Zen</strong> <strong>Components</strong> 253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!