Jump to content

some question about TUniCalendarPanel


Freeman35

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

Link to comment
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');
        });
    };
}
Link to comment
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)
            });
        });
    };
}
Link to comment
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);
        });
    };
}
Link to comment
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

Link to comment
Share on other sites

  • 11 months later...
On 11/11/2017 at 10:30 PM, Sherzod said:

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');
        });
    };
}

Can you try this approach for now?!:

MainForm -> Script:

if (Ext.calendar) {
    Ext.calendar.view.Weeks.prototype.defaultConfig.overflowText='+{0} daha';
}

 

Link to comment
Share on other sites

1 hour ago, Freeman35 said:

Hello,

Thank you very much, this solution fixed my problem "more" text.

much importend problem is, and I'm sure many user wanna this.

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

 

Maybe like this, as one of the possible solution

1. CustomCSS:

.customCalendarPanel .x-calendar-event-time-start {
    display: none;
}

2. beforeInit fn:

function beforeInit(sender, config)
{
    config.cls='customCalendarPanel';
}

 

Link to comment
Share on other sites

Bad news,

This solution remove time info from events on Calenderpanel. If show "more" link, when click More link, Tooltip open and time info still there.

My solution. I'll not use time info for this project so, complete remove time info like this.
 

.x-calendar-event-time{
display:none !important;
}

try only one time likte this ".test .x-calendar-event-time{display:none !important;}" and use .text class, its not worked. Then I will not use time info all project so override directly main css.

Thank you

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...