[OPEN-282] CalendarList Tooltip

Request new features or modifications for Extensible components

[OPEN-282] CalendarList Tooltip

Postby senacle » Thu Jan 19, 2012 5:09 am

To have tooltip for CalendarList, i use this :

"Description" is defined in Ext.ensible.cal.CalendarMappings.

Ext.ensible.cal.CalendarList

Code: Select all
Ext.ensible.cal.CalendarList = Ext.extend(Ext.Panel, {
...
    getListTemplate : function(){
        if(!this.tpl){
            this.tpl = !(Ext.isIE || Ext.isOpera) ?
                new Ext.XTemplate(
                    '<ul class="x-unselectable"><tpl for=".">',
*****************Change here***************************
                       '<li id="{cmpId}" class="ext-cal-evr {colorCls} {hiddenCls}" ext:qtip="{description}">{title}<em>&#160;</em></li>',
**********************************************************
                    '</tpl></ul>'
                )
                : new Ext.XTemplate(
                    '<ul class="x-unselectable"><tpl for=".">',
                        '<li id="{cmpId}" class="ext-cal-evo {colorCls} {hiddenCls}">',
                            '<div class="ext-cal-evm">',
*****************Change here***************************
                                '<div class="ext-cal-evi" ext:qtip="{description}">{title}<em>&#160;</em></div>',
**********************************************************
                            '</div>',
                        '</li>',
                    '</tpl></ul>'
                );
            this.tpl.compile();
        }
        return this.tpl;
    },
...
    refresh: function(){
        if(this.skipRefresh){
            return;
        }
        var data = [], i = 0, o = null,
            CM = Ext.ensible.cal.CalendarMappings,
            recs = this.store.getRange(),
            len = recs.length;
           
        for(; i < len; i++){
            o = {
                cmpId: this.id + '__' + recs[i].data[CM.CalendarId.name],
                title: recs[i].data[CM.Title.name],
*****************Add description here***************************
                description: recs[i].data[CM.Description.name],
********************************************************************
                colorCls: this.getColorCls(recs[i].data[CM.ColorId.name])
            };
            if(recs[i].data[CM.IsHidden.name] === true){
                o.hiddenCls = 'ext-cal-hidden';
            }
            data[data.length] = o;
        }
        this.getListTemplate().overwrite(this.body, data);
    },
...
})
Attachments
calendarlist qtip.PNG
calendarlist qtip.PNG (8.34 KiB) Viewed 3302 times
senacle
 
Posts: 22
Joined: Wed Dec 14, 2011 4:01 am

Re: [OPEN-282] CalendarList Tooltip

Postby brian.moeskau » Tue Jan 24, 2012 8:35 pm

Thanks, I'll take a look at this for a future release.
Personal Blog: Extraneous / Twitter: @bmoeskau / Meetup: Austin Bleeding Edge Web
User avatar
brian.moeskau
Site Admin
Site Admin
 
Posts: 1344
Joined: Sat Sep 18, 2010 5:00 pm
Location: Austin, Texas


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron