Jump to content
uniGUI Discussion Forums
Sign in to follow this  
Freeman35

some question about TUniCalendarPanel

Recommended Posts

Hello,

I need some help about TUniCalendarPanel. Can someone help me?

 

1-) How to remove time info from events title in monthview

2-) How to change  on "x+ more" to "x+ daha"

3-) How to change form size? ( when click to "x+ more" link opened, detailed events titles )

4-) This opened form (Detail of events titles) not close when TUniCalendarPanel owner form closed. That still open. Maybe this is can bug.

5-) How to show hint, when mouse on cell or any event

 

 Regards

Share this post


Link to post
Share on other sites

Hi,

 

2-) How to change  on "x+ more" to "x+ daha"

 

Ok, can you try this approach for now ?!:

 

UniCalendarPanel -> ClientEvents -> ExtEvents -> function eventsrendered:

function eventsrendered(sender, eOpts)
{
    var me=sender;
    if (me.xtype == "monthview") {
        me.el.select('.ext-cal-ev-more a').elements.forEach(function(el) {
            el.innerHTML=el.innerHTML.replace(/more/gi, 'daha');
        });
    };
}

Share this post


Link to post
Share on other sites
3-) How to change form size? ( when click to "x+ more" link opened, detailed events titles )

 

Maybe like this... :

function eventsrendered(sender, eOpts)
{
    var me=sender;
    if (me.xtype == "monthview") {
        me.el.select('.ext-cal-ev-more a').elements.forEach(function(el){
            el.innerHTML=el.innerHTML.replace(/more/gi, 'daha');
            el.addEventListener('click', function(){
                Ext.defer(function() {
                    me.detailPanel.setTitle('');
                    me.detailPanel.setWidth(300);
                    me.detailPanel.setHeight(300);
                }, 10)
            });
        });
    };
}

Share this post


Link to post
Share on other sites
1-) How to remove time info from events title in monthview

 

Try this:

function eventsrendered(sender, eOpts)
{
    var me=sender;
    if (me.xtype == "monthview") {
        me.el.select('.ext-cal-ev-more a').elements.forEach(function(el){
            //2
            el.innerHTML=el.innerHTML.replace(/more/gi, 'daha');
            //3
            el.addEventListener('click', function(){
                Ext.defer(function() {
                    me.detailPanel.setTitle('');
                    me.detailPanel.setWidth(300);
                    me.detailPanel.setHeight(300);
                }, 10)
            });
        });
        //1
        me.el.select('.ext-cal-ev div').elements.forEach(function(el){
            el.innerHTML=el.innerHTML.substring(el.innerHTML.indexOf(" ") + 1);
        });
    };
}

Share this post


Link to post
Share on other sites

Perfect Delphi Developer.

Thank you so much.

1-) I need use this code in detailpanel too, but how to?

me.el.select('.ext-cal-ev div').elements.forEach(function(el){ el.innerHTML=el.innerHTML.substring(el.innerHTML.indexOf(" ") + 1);

2-) where can I find info,help about this JS ? I have to learn JS but this is not be easy after 50 years old :)

best regards

Share this post


Link to post
Share on other sites

Hello,

This codes not work in 1480, 'cos there is no "eventsrendered" event and need some definition update I think. Any help about this?

thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×