shffle the event layout about a little?

Hi

I have set my calendar to be displayed as month by default.

Is there a way of showing the time and title of an event on differnet lines?
Is there also a way of wrapping the text in the month view?
Also, is there a way of showing ht end time in the month view?

A the moment an event with title “Best Abs, Jabs & Pads” looks like:

10.00 Best Abs, Jabs & (minus the ‘Pads’ due to no wrapping)

What I would like is:

10.00 - 11.00
Best Abs, Jabs & Pads

Many thanks for any help

Jeff

Hi.
Unfortunately there is no way to show events on two lines or to enable word-wrapping.
To show end-date in month-view events go to admin panel -> Templates and set event_bar_text parameter like here:

if (event._timed === true) 
return " - " + scheduler.templates.hour_scale(end) + " <span title=\""+event.text+"\">" + event.text + "</span>"; 
else 
return "<span title=\""+event.text+"\">" + event.text + "</span>";

Thank you Radyno

I did as you said, which seemed to break the plugin, showing the schedule empty. I re enterdreplaced it again with

return "<span title=\""+event.text+"\">" + event.text + "</span>";

which thankfully fixed it again.

Is there any way to show the time and the event title on 2 lines? With the time on top and the title below?

This would help with the no wrapping problem if my titles are a bit long.

Many thnaks again

Jeff

Hi. There is no way to show events in two lines.
About template, I setted it locally and checked - it works.
If you have problem with this template set this one in admin panel and send me a link to your scheduler page, please.

Make sure you have spaces in the end of lines. They are too important because this code will be parsed and joined in one line. So add spaces in the end of every line.
Tell me please if it still doesn’t work.

Thank you

That did it.

Although, as there is no way to move the title to a second line in the month view, this is obcsuring my title even more.

This looked really promising.

Many thanks again for your help Radyno.

Jeff

I’ve been having a dig about in the source code, but can’t find where the events are generated to try and do this myself.

I’m not sure if this is beyond support remit, but could you give me a rough pointer where in the source code I might be able to try and tackle this a little deeper myself?

Many thanks

Jeff

Hello, Jeff.

As you most likely saw events on the month view are simple divs with configurable text as content (through templates). What’s noteworthy here is the fact that their position is absolute and calculated somewhere in the code (as there are different cases - there maybe several events on a single day so they should have different ‘top’ position).
It’s possible to change scheduler.xy.bar_height option and now another value will be used in calculations. As a result additional space will be available for events so you could implement additional line through templates.

To check how events are rendered I suggest downloading our standalone package. There open event.js file and search for ‘scheduler.render_event_bar=’ line.

Best regards,
Ilya

Here’s the sample (for standalone version):

[code]

html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; } .dhx_cal_event_clear { height:26px; white-space: normal; } .dhx_cal_event_line { height:26px; }
 
 
[/code] Note that we need to change both xy.bar_height and height of div heights.

Best regards,
Ilya

Thank you for your time Ilya

I’ll give this a try tomorrow.

All the best

Jeff