updateCollection(collection_name, new_collection)

Required library edition:

updates specified collection with the new options

  • name of the collection to update
  • new collection to use

Return true in case of successful update or false if collection was not found.

Note: function also calls onOptionsLoad event and resets lightbox.
Note: collection can be created with the serverList function.

Examples:
1. Lightbox was configured following way:

scheduler.config.lightbox.sections=[   
	{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
	{name:"items", height:23, type:"select", options:serverList("goods", goods_array) , map_to:"section_id" }, 
	{name:"time", height:72, type:"time", map_to:"auto"}
];

To update list of items use:

scheduler.updateCollection("goods", new_goods_array);


2. Units view was created with following options:

scheduler.createUnitsView({
	name:"unit",
	property:"section_id",
	list:scheduler.serverList("units", sections),
	size:20,
	step:1
});

To update list of the displayed units use:

scheduler.updateCollection("units", new_sections_array);