Lightbox on Singleclick problems

Hi Again,

Please help me with this new issue:

I have to open the lightbox for insert/update on single click instead of double click…
i used the following modification in dhtmlxscheduler.js

this._obj.onclick=function(e){//ondblclick scheduler._on_dbl_click(e||event); };

inside scheduler.set_actions function.
and it works fine… but when i single click on an event, the selection menus are displaying at the left side of event box at the same time, light box also opens…i have read , we can disable selection menus using,

scheduler.config.details_on_dblclick = true; scheduler.attachEvent("onClick",function(){ return false; }); scheduler.xy.menu_width = 0;

but if i use the above code, the lightbox on single click will never work…

also if i press delete on the selection menu, it will ask for confirmation of delete and deletes the event, but the lightbox is in opened state and hangs…

  1. I want to have proper solution for creating/updating events using lightbox on Single Click
  2. if i should remove selection menus for (1) to work, i can do that…pls provide solution for that
  3. i have to permanently delete the event from the calendar if it is deleted… now it is deleting from the table, but striking out inside the calendar…only after refreshing, the event disappearing from the calendar…please suggest a soln for this

Thanks for helping!

From here
viewtopic.php?f=6&t=17343&p=53687&hilit=single+click#p53687
i used the solution suggested by Stanislav

scheduler._click.dhx_cal_data = function(e){ scheduler._on_dbl_click(e); };

the single click works fine, But when dragging and dropping…clicking on cancel on the lightbox… the overlay div not disappearing …but the lightbox is closed correctly.

is it possible to give a workaround for this?

Hello,

scheduler.attachEvent("onClick",function(id){ // when clicked.. scheduler.showLightbox(id); // show lightbox return false; // don't show menu }); scheduler.xy.menu_width = 0; // to regain space which was reserved for menu
And delete your modification in dhtmlxscheduler.js

Kind regards,
Ilya

hi,

the code you gave is working for existing events only…

i need to create new events also by single clicking. without any problems in drag and drop event creation. Can you please suggest solution for that?

Thanks for helping!

Hello,

You are right, that would only help for existing events.

I am reluctant to hack through it right now as in the upcoming version it would be so much easier to do so using implemented functionality.

You can either wait with the current version or contact us (sales [at] dhtmlx.com) to send you dev version of dhtmlxscheduler.js, but please note that will be not final version.

Kind regards,
Ilya