Param to Delete Function on Lightbox

Hello,

i do use the scheduler for multiusers. Everything works find, expect the Deleting Function on the lightbox und the Drag Drop Function. Is it possible to do a userid param ?

thanx alot
Engin

Can you provide some more details - what is not working correctly.

Hello,

i have a dropdown menu above my schedule with id´s 1, 2, 3, 4…

the DB looks like this:
id event_start event_end event_text event_owner
7 2013-04-30 00:30:00 2013-04-30 00:45:00 come 2
8 2013-04-30 14:30:00 2013-04-30 14:33:00 go 2
9 2013-04-24 00:00:00 2013-04-24 00:05:00 come 1

scheduler.load(“data/connector.php?employ=1”)

$conn->render_sql(“select * from dxschedule where event_owner=”.$_GET[‘employ’],“id”,“event_start,event_end,event_text,event_owner”);

that works fine for Loading userspecific Data over DropDown.

My Problem is: IF somebody wants to delete an event, i confirm delete but the font gets red and struck out. After reload page its almost there.

Same at Dragging. Dragging is possible but after reload page its on its old timeplace

ok now i now how to read the logs :slight_smile:

Undefined index: employ at /homepages/44/d30629286/htdocs/wsc76941227/webshop/zeiterfassung/data/connector.php line 14

DataProcessor object initialized
22_id => 22
22_start_date => 2013-04-13 00:00
22_end_date => 2013-04-13 00:01
22_text => kommen
22_event_owner => 2
22_!nativeeditor_status => deleted
ids => 22

Row data [22]
id => 22
event_start => 2013-04-13 00:00
event_end => 2013-04-13 00:01
event_text => kommen
event_owner => 2
!nativeeditor_status => deleted

DELETE FROM dxschedule WHERE id=‘22’ AND (( event_owner=))

The event_owner id 2 is missing in the SQL Statement, although above its event_owner => 2

add one more line to reloading logic

scheduler.load("data/connector.php?employ=1") //set the same url, with employ parameter to dataprocessor dp.serverProcessor = "data/connector.php?employ=1";

Sorry for my bad english but reloading works. Only Problem is that when i want to delete he wants to have the event_owner.
DELETE FROM dxschedule WHERE id=‘22’ AND (( event_owner=))

I use this for create events
$conn->render_sql(“select * from dxschedule where event_owner=”.$_GET[‘employ’],“id”,“event_start,event_end,event_text,event_owner”);

Why does the delete event wants the event_owner ? How can i Post the event_owner or disable the Param at deleting or dragging.

The logging tells me that he knows the event_owner on delete
Row data [22]
id => 22
event_start => 2013-04-13 00:00
event_end => 2013-04-13 00:01
event_text => kommen
event_owner => 2
!nativeeditor_status => deleted

When you are using render_sql - code will use it as a base for constructing CRUD operation. If you have WHERE instruction in the sql , code will add it to UPDATE and DELETE operations.

So, you can add one command to reset dataprocessor path, as it was described above
Or, on serve side, define the logic for row deleting

$conn->sql->attach("DELETE", "delete from dxschedule where id={id}"); $conn->render_sql("select * ....

Stanislav, thanx for your great Job here, it works perfect with

$conn->sql->attach(“DELETE”, “delete from dxschedule where id={id}”);
$conn->sql->attach(“UPDATE”, “UPDATE dxschedule SET event_start=’{event_start}’,event_end=’{event_end}’,event_text=’{event_text}’,event_owner=’{event_owner}’ WHERE id={id}”);
$conn->render_sql(“select * from dxschedule where event_owner=”.$_GET[‘employ’],“id”,“event_start,event_end,event_text,event_owner”);