public/javascripts/yui/calendar/calendar.js
function() {
        var root = this.oDomContainer,
            cal = this.parent || this,
            anchor = "a",
            click = "click";

        var linkLeft = Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root),
            linkRight = Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);

        if (linkLeft && linkLeft.length > 0) {
            this.linkLeft = linkLeft[0];
            Event.addListener(this.linkLeft, click, this.doPreviousMonthNav, cal, true);
        }

        if (linkRight && linkRight.length > 0) {
            this.linkRight = linkRight[0];
            Event.addListener(this.linkRight, click, this.doNextMonthNav, cal, true);
        }

        if (cal.cfg.getProperty("navigator") !== null) {
            this.applyNavListeners();
        }

        if (this.domEventMap) {
            var el,elements;
            for (var cls in this.domEventMap) { 
                if (Lang.hasOwnProperty(this.domEventMap, cls)) {
                    var items = this.domEventMap[cls];
    
                    if (! (items instanceof Array)) {
                        items = [items];
                    }
    
                    for (var i=0;i<items.length;i++) {
                        var item = items[i];
                        elements = Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
    
                        for (var c=0;c<elements.length;c++) {
                            el = elements[c];
                             Event.addListener(el, item.event, item.handler, item.scope, item.correct );
                        }
                    }
                }
            }
        }

        Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
        Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
        Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
    }
function() {
        var root = this.oDomContainer,
            cal = this.parent || this,
            anchor = "a",
            click = "click";

        var linkLeft = Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root),
            linkRight = Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);

        if (linkLeft && linkLeft.length > 0) {
            this.linkLeft = linkLeft[0];
            Event.addListener(this.linkLeft, click, this.doPreviousMonthNav, cal, true);
        }

        if (linkRight && linkRight.length > 0) {
            this.linkRight = linkRight[0];
            Event.addListener(this.linkRight, click, this.doNextMonthNav, cal, true);
        }

        if (cal.cfg.getProperty("navigator") !== null) {
            this.applyNavListeners();
        }

        if (this.domEventMap) {
            var el,elements;
            for (var cls in this.domEventMap) { 
                if (Lang.hasOwnProperty(this.domEventMap, cls)) {
                    var items = this.domEventMap[cls];
    
                    if (! (items instanceof Array)) {
                        items = [items];
                    }
    
                    for (var i=0;i<items.length;i++) {
                        var item = items[i];
                        elements = Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
    
                        for (var c=0;c<elements.length;c++) {
                            el = elements[c];
                             Event.addListener(el, item.event, item.handler, item.scope, item.correct );
                        }
                    }
                }
            }
        }

        Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
        Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
        Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
    }
function ( ) { var root = this . oDomContainer , cal = this . parent || this , anchor = "a" , click = "click" ; var linkLeft = Dom . getElementsByClassName ( this . Style . CSS_NAV_LEFT , anchor , root ) , linkRight = Dom . getElementsByClassName ( this . Style . CSS_NAV_RIGHT , anchor , root ) ; if ( linkLeft && linkLeft . length > 0 ) { this . linkLeft = linkLeft [ 0 ] ; Event . addListener ( this . linkLeft , click , this . doPreviousMonthNav , cal , true ) ; } if ( linkRight && linkRight . length > 0 ) { this . linkRight = linkRight [ 0 ] ; Event . addListener ( this . linkRight , click , this . doNextMonthNav , cal , true ) ; } if ( cal . cfg . getProperty ( "navigator" ) !== null ) { this . applyNavListeners ( ) ; } if ( this . domEventMap ) { var el , elements ; for ( var cls in this . domEventMap ) { if ( Lang . hasOwnProperty ( this . domEventMap , cls ) ) { var items = this . domEventMap [ cls ] ; if ( ! ( items instanceof Array ) ) { items = [ items ] ; } for ( var i = 0 ; i < items . length ; i ++ ) { var item = items [ i ] ; elements = Dom . getElementsByClassName ( cls , item . tag , this . oDomContainer ) ; for ( var c = 0 ; c < elements . length ; c ++ ) { el = elements [ c ] ; Event . addListener ( el , item . event , item . handler , item . scope , item . correct ) ; } } } } } Event . addListener ( this . oDomContainer , "click" , this . doSelectCell , this ) ; Event . addListener ( this . oDomContainer , "mouseover" , this . doCellMouseOver , this ) ; Event . addListener ( this . oDomContainer , "mouseout" , this . doCellMouseOut , this ) ; }
Applies the Calendar's DOM listeners to applicable elements.
@method applyListeners
Applies the Calendar s DOM listeners to applicable elements .