section_id in Mobile Version

Hi,

I am trying to set up the mobile version.

I have the following on my normal side;

var timeline_options = scheduler.serverList("section_id");

And then I use this to create my y_unit in Timeline view;

y_unit: timeline_options, y_property: "section_id",

Now I am trying to set up the Mobile side. When I use this;

scheduler.templates.month_event_title = function(obj,type){ var html = obj.work_desc + " " + obj.section_id; ...
The ‘section_id’ returns just the number (the ‘value’). How can I retrieve the ‘label’ associated with this ‘value’? When the page loads, the call to events.php returns the data that I need;

<coll_options for="section_id"> <item value="9" label="Bob Dylan"></item> <item value="7" label="Donald Duck"></item> <item value="10" label="Gusthoff Grey"></item> <item value="5" label="Humpty Dumpty"></item> <item value="8" label="Jackie Chan"></item> <item value="6" label="Minnie Mouse"></item> </coll_options>

Thoughts?

Hi,

mobile version of a scheduler doesn’t support units and does not parse <coll_options for=“section_id”> tag.

You may load options using dhx.ajax:

docs.dhtmlx.com/touch/doku.php?id=ajax

and then apply them in the template:

scheduler.templates.month_event_title = function(obj,type){
var html = obj.work_desc + " " +getOptionLabel(obj.section_id);

Here getOptionLabel is your function that will return option label by its value.