Yahoo! UI Library

Diary widget  1.4

Yahoo! UI Library > diary > DiaryDay
Search:
 
Filters

Class DiaryDay - extends YAHOO.util.Element

A days worth of diary items. Contains none or more DiaryBlocks.

Properties

_blocks - protected Array

Holds blocks of items

_dataEl - protected HTMLElement

HTMLElement holding the HTMLElements for the DiaryItems

Methods

_addItemToBlock

protected void _addItemToBlock ( DiaryItem )
Works out which of existing blocks to add this item to, or create a new block if needed.
Parameters:
DiaryItem <Object>
Returns: void

_rebuildBlocks

protected void _rebuildBlocks ( )
Gets current items and rebuilds blocks in case some have changed.
Returns: void

_renderBlocks

protected void _renderBlocks ( )
Loops through the items in the block and renders them
Returns: void

_renderColumn

protected void _renderColumn ( )
Draws a column for the day
Returns: void

addItem

Object addItem ( Object )
Adds the item to the day
Parameters:
Object <Object> literal of data for the new DiaryItem
Returns: Object
DiaryItem

destroy

void destroy ( )
Destructor
Returns: void

next

next ( )
Get the next column, or null if it's the last.

previous

previous ( )
Gets the previous column, or null if it's the first

removeItemFromBlock

Boolean removeItemFromBlock ( item )
Removes an item from its block
Parameters:
item <DiaryItem>
Returns: Boolean
Whether it was successfully removed

render

void render ( )
Renders the day view.
Returns: void

Events

beforeColdateChange

beforeColdateChange ( event )
Fires before the value for the configuration attribute 'coldate' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDiaryChange

beforeDiaryChange ( event )
Fires before the value for the configuration attribute 'diary' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeWidthChange

beforeWidthChange ( event )
Fires before the value for the configuration attribute 'width' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

coldateChange

coldateChange ( event )
Fires when the value for the configuration attribute 'coldate' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

diaryChange

diaryChange ( event )
Fires when the value for the configuration attribute 'diary' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

widthChange

widthChange ( event )
Fires when the value for the configuration attribute 'width' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

Configuration Attributes

coldate - {Object}

Date object for this column

diary - YAHOO.util.Diary

reference to the Diary object holding this DiayDay

width - {Int}

Width of the column (as an integer) in pixels.
Default Value: 150


Copyright © 2010 Yahoo! Inc. All rights reserved.