Categories | Question details Back To List | ||
Only the person who schedules events can modify corresponding schedules Hi, We are studying the features of dhtmlxscheduler. 1. We need to customize the calendar as, public users can create schedules in the calendar. Only the person who schedules events can modify corresponding schedules. We were able to add/remove fields in the schduling screen (event window). We need to restrict the “Save” and “Delete” options in the scheduling screen (by clicking on an event in the calendar), only for person who create the corresponding schedule. General public can view all schedules. To meet the purpose, we need to pass the logged user’s ID into the schdeduling screen (event window). The logged user’s ID can be keep in a session variable. But we need to pass this ID into the following JavaScript Function _on_dbl_click() (when an event is clicked) in the dhtmlxscheduler.js 2. If an event is added to calendar with no details(ie, description) , the event gets saved with no description value. how to make a validation to check whether an event is added with description value? Please let us know how we can meet the requirement. Since we are not able to understand most of the logic, will u provide any help required to customize the calendar after we purchase the License? Regards Answer posted by Alex (support) on Nov 23, 2009 08:09 Hello, regarding the first question - please, see the example in the scheduler package dhtmlxScheduler/samples/02_customization/shared_events/ To validate details you can try to use the following method: dp.attachEvent("onBeforeDataSending",function(id){ var details = scheduler.getEvent(id).details; /*your code here.. (to disable data sending the event should return false)*/ return true;}) Answer posted by Stanislav (support) on Nov 23, 2009 08:37 >> If an event is added to calendar with no details(ie, description) Oncoming update ( version 2.1 ) will have onEventSave handler, which will allow to block the light-box form until data is not filled correctly. If you need such update ASAP - please contact us directly at support@dhtmlx.com Answer posted by rencin on Nov 23, 2009 22:26 hi, edit only own user event in shared events got worked. thank you 1. But the user should view the event window (on an event click) with start_date,end_date, re_type and details all disabled or not editable .For this what all modifications are required in javascript? 2. To vallidate details , the function dp.attachEvent("onBeforeDataSending",function(id) given is not working . var id= scheduler._select_id is returning null value. what does scheduler._select_id means ? regards
Answer posted by Alex (support) on Nov 24, 2009 07:27 Hello, sorry, there was a mistake in my previous answer. Try to use the following approach to get an id of last edited event: dp.attachEvent("onBeforeDataSending",function(){ ... |