new delete event

My english is broken… :confused:

When an event is deleted from the schedule, it is still visible on the schedule. How can I trigger for it to be removed without reloading the schedule?


Can you provide link where we can check this issue?
Is some javascript error occur? Normally event would be deleted automatically.

Kind regards,

in my database,i have nine table.

    $cross = new CrossOptionsConnector($res);
$sql = "SELECT m_en as value,m_e_name as label FROM management WHERE m_dep ='".$a->getAuthData('m_dep')."'";
$cross->options->render_sql($sql,"m_en","m_en(value)","m_e_name(label)", "", "");
$cross->link->render_table("event_management","event_id", "m_en,event_id");

$fruitCross = new CrossOptionsConnector($res);
$sql_1 = "SELECT *,sj_id as value,sj_name as label FROM subject";
$fruitCross->options->render_sql($sql_1,"sj_id","sj_id(value),sj_name(label)", "", "");
$fruitCross->link->render_table("event_subject","event_id", "sj_id,event_id");

$combo_1 = new CrossOptionsConnector($res);
$sql_c = "SELECT cus_id as value,cus_name as label FROM beauty_customer";
$combo_1->options->render_sql($sql_c,"cus_id","cus_id(value),cus_name(label)", "", "");
$combo_1->link->render_table("event_customer","event_id", "cus_id,event_id");

$abolish = new CrossOptionsConnector($res);
$sql_a = "SELECT al_id as value,al_name as label FROM abolish";
$abolish->options->render_sql($sql_a,"al_id","al_id(value),al_name(label)", "", "");
$abolish->link->render_table("event_abolish","event_id", "al_id,event_id");

$scheduler = new SchedulerConnector($res);

$scheduler->set_options("m_en", $cross->options);
$scheduler->set_options("sj_id", $fruitCross->options);
$scheduler->set_options("cus_id", $combo_1->options);
$scheduler->set_options("al_id", $abolish->options);

    $scheduler->sql->attach("delete","update events_ms set event_name='deleted' where event_id='{event_id}'");

when i delete,i updat events_ms.event_name=daleted.
And,i don’t want event_subject,event_management,event_customer,event_abolish these data to be delete…

User fire-but or dev-tools of browser and check response text from server side for deleting operation.
It must be valid xml similar to

<?xml version='1.0'> <data> <action type="delete" sid='id' tid='id'> </data>

it possible that you have some php|mysql level error which breaks logic, and corrupts response, as result client side code doesn’t recognize message and does not remove event from the scheduler.

Maybe is my english too broken…

What I mean is I want to keep these tabel’s data.
I do not want to delete the associated information

You can use render_sql instead of render table, to load not all event but only ones which are not marked as deleted

$scheduler->sql->attach("delete","update events_ms set event_deleted='1' where event_id='{event_id}'"); $scheduler->render_sql("select * from events_ms where event_deleted <> 1","event_id","start_date,end_date,event_name,details,rec_date")

I change



$scheduler->sql->attach("delete","update events_ms set event_deleted = '1' where event_id='{event_id}'"); $scheduler->render_sql("select * from events_ms where event_deleted <> '1'","event_id","start_date,end_date,event_name,details,rec_date");

But event_subject、event_management、event_customer
These data are still being removed

If you have “$scheduler->sql->attach(“delete”” the sql code must be executed instead of the default logic, so only data updating must occur.

Can you enable logging, and provide log content for invalid operation. … tor:errors

This is log content

Log started, 19/06/2012 01:06:10

any text here

DataProcessor object initialized
43_id => 43
43_start_date => 2012-06-20 14:20
43_end_date => 2012-06-20 14:25
43_text => 輸入客戶編號或姓名
43_details =>
43_rec_date => 2012-06-19 09:34:00
43_event_completed => 0
43_event_abolish => 0
43_m_en => 1074
43_sj_id => 40302
43_cus_id => 6000000004
43_!nativeeditor_status => deleted
ids => 43

Row data [43]
event_id => 43
start_date => 2012-06-20 14:20
end_date => 2012-06-20 14:25
event_name => 輸入客戶編號或姓名
details =>
rec_date => 2012-06-19 09:34:00
event_completed => 0
event_abolish => 0
m_en => 1074
sj_id => 40302
cus_id => 6000000004
!nativeeditor_status => deleted

update events_ms set event_deleted=‘1’ where event_id=‘43’

DELETE FROM event_management WHERE event_id=‘43’

DELETE FROM event_subject WHERE event_id=‘43’

DELETE FROM event_customer WHERE event_id=‘43’

Edit operation finished
0 => action:deleted; sid:43; tid:43;

Done in 0.0895957946777s

Problem confirmed, unfortunately there is no way to fix it by API
You can

a) comment lines 108-110 in crosslink_connector.php
b) create custom php class based on CrossOptionsConnector, in which redefine afterProcessing handle with logic which will ignore delete action, and for other action types will call same method of base class.