Jump to content


Photo

some question about TUniCalendarPanel


  • Please log in to reply
4 replies to this topic

#1 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 179 posts

Posted 11 November 2017 - 11:48 AM

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


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 11 November 2017 - 05:30 PM

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

  • 0

#3 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 11 November 2017 - 06:13 PM

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

  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 11 November 2017 - 06:56 PM

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

  • 0

#5 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 179 posts

Posted 13 November 2017 - 06:08 AM

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


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users