I’ve been working on editing this system to make it work for booking different rooms of a building.
You can see what I’ve got here: shul.co.uk/diary/
Basically, when you create an event, you can choose the rooms you want to use.
If you click ‘Filters’ at the top, you can then filter the results by selecting the rooms you want to see usage of.
But I’ve got a really strange bug, where moving/resizing an event causes it to remove the location data from the database. This only happens the first time on a page load though.
So if I load the page, and resize the event, it loses the location data. If I add the data back in, and on the same page load, I resize it again, the data doesn’t get removed.
I’ve spent hours looking through every single function called when triggering a move/resize click, but I couldn’t find anything that would cause this bug.
I’m really struggling with this. I’ve spent hours looking and couldn’t find anything.
Not sure if it’s my lack of using this library previously, or if it’s actually really hard to fix.
[code]<?php
include (’…/codebase/connector/scheduler_connector.php’);
include (’…/codebase/connector/crosslink_connector.php’);
require_once (‘config.php’);
$cross = new CrossOptionsConnector($res, $dbtype);
$cross->dynamic_loading(true);
$cross->options->render_table("user","user_id","user_id(value),username(label)");
$cross->link->render_table("event_user","event_id", "user_id,event_id");
$spaceCross = new CrossOptionsConnector($res, $dbtype);
$spaceCross->dynamic_loading(true);
$spaceCross->options->render_table("space","space_id","space_id(value),space_name(label)");
$spaceCross->link->render_table("event_space","event_id","space_id,event_id");
$scheduler = new SchedulerConnector($res, $dbtype);
$scheduler->set_options("user_id", $cross->options);
$scheduler->set_options("space_id", $spaceCross->options);
$scheduler->render_table("events_ms","event_id","start_date,end_date,event_name,rec_type,event_pid,event_length,details");
In your case, multiselect options are loaded dynamically, only when related lightbox is opened (which is a valid use-case). When item moved it triggers data update operation, but do not provide info about mutliselect options ( as they was not loaded yet ) and server side code do recognize it as “all unchecked” situation.
With fixed file, server side code will be able to correcty recognize “options not loaded yet” case, and will preserve existing options.