Menu
Welcome, Guest
Username: Password: Secret Key Remember me
Welcome to the Developer forum!
Get all your questions answered here. Learn to integrate calendar in your application.
  • Page:
  • 1

TOPIC: Right click

Right click 13 years 6 months ago #366

  • inbit
  • inbit's Avatar Topic Author
  • Visitor
  • Visitor
Hi

I\'d like to know if it is possible to bind a different action to right mouse click, or simply disable the default web2cal right click action.

The thing i\'d like to do, is when a user right clicks on any event, a custom div would pop up, offering a bunch of custom made options/links.

I\'m using contextmenu plugin for jquery ( abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/ ). And i can successfuly bind it to any other element on the page, but when i try to bind id with dayEvent (which is a class for daily event divs), it fails. As if web2cal would override any rightclick bindings.

Any help would be greatly appreciated.
Thank you.

Please Log in to join the conversation.

Re:Right click 13 years 6 months ago #367

  • inbit
  • inbit's Avatar Topic Author
  • Visitor
  • Visitor
i figured out i can use web2cal onPreview events.

ical = new Web2Cal(\'calendarContainer\', {
weekOnPreview: onPreview,
monthOnPreview: onPreview,

...

function onPreview(evt, dataObj, html) {
...

but function onPreview is called on both mouse clicks, right and left. How do i figure out which mouse button was pressed? evt object that is passed in is not the regular javascript event, or is somehow missing evt.button property..

any help appreciated

Please Log in to join the conversation.

Re:Right click 13 years 6 months ago #368

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 143
  • Karma: 1
  • Thank you received: 1
Inbit,

What version of calendar are you using? If you using premium version, there is a flag to flip and a callback function to control the behavior of right click.

Thanks

Please Log in to join the conversation.


Team Web2Cal.

Re:Right click 13 years 6 months ago #369

  • inbit
  • inbit's Avatar Topic Author
  • Visitor
  • Visitor
Hi

I\'m using premium version 2.0.14.

How do i do that?
I mean how do i set the flag, and what\'s the callback function?


thank you for a fast response.

Please Log in to join the conversation.

Re:Right click 13 years 6 months ago #370

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 143
  • Karma: 1
  • Thank you received: 1
Please download the latest version of calendar. 2.0.49.

disableRightClick is the option, that will disable all right clicks on calendar. If you want a callback invoked, do specify a function for onRightClickCallBack

Thanks,

Please Log in to join the conversation.


Team Web2Cal.

Re:Right click 13 years 5 months ago #371

  • inbit
  • inbit's Avatar Topic Author
  • Visitor
  • Visitor
I forgot to say thanks.

So thank you, i solved the problem with latest version.

Please Log in to join the conversation.

  • Page:
  • 1
Time to create page: 0.110 seconds
Powered by Kunena Forum

LATEST IN FORUM

  • No posts to display.

ABOUT US