michielvaneerd / privategooglecalendars

Private Google Calendars Wordpress plugin
https://michielvaneerd.github.io/privategooglecalendars/
8 stars 4 forks source link

Custom url #10

Closed LeLapinDeLaForet closed 2 years ago

LeLapinDeLaForet commented 4 years ago

Dear @michielvaneerd,

As I told you by email, I would like to use my proper information in event popup link. Please find this PR which use information stored in fields source.* to create a custom link.

Regards.

LeLapinDeLaForet commented 4 years ago

Now it seems to work, but unfortunately during the event creation, the source fields are not populated, there is some ticket in Google issue tracker around that.

My trouble is independent of this PR, I will check if I create properly the event.

michielvaneerd commented 4 years ago

Hi,

Thanks for the pull request. This looks like a good addition.

I tested it but got a "This block contains unexpected or invalid content." error in the Gutenberg block. This happens because of the 2 extra properties (eventsourcelink="false" eventlinktargetblank="false") that are now added to the HTML, while the previous version didn't know this two properties. You can see this error yourself if you first add a Gutenberg block with the previous version of this plugin, then update it with your changes and then try to edit the page.

I think you have to expand the deprecated section to solve it. If you could make this change, I'll be glad to merge it.

Best wishes, Michiel

LeLapinDeLaForet commented 4 years ago

OK, I take a fast look to deprecated section, which I think is in index.js file. But I do not understand what I have to tagged at deprecated, because I already filled the structure with new members.

May you give me some explanations?

LeLapinDeLaForet commented 4 years ago

@michielvaneerd I pushed new commit, where I fix source fields query and I add new behavior: custom JS callback. This behavior is much easier to implement on more powerful to do custom action!

Hope you will like it