Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Event dialog: fix content editor and attendees dialog #11

Merged
merged 32 commits into from
Jun 10, 2017

Conversation

Trim
Copy link
Member

@Trim Trim commented Jun 7, 2017

This merge request try to resolve issue #5 and the "add attendees dialog":

  • Update the dialog overlay to current Thunderbird/Lightning dialog (lot of the overlay were moved from calendar-event-dialog.xul to lightning-item-iframe.xul to reflect the current window structure)
  • Remove the override of edit attendees and let Lightning manage that
  • Update the way the dialog initialize the HTML content editor (for Exchange Tasks) by using DOM to parse and set correct HTML code in the content

Some times, the HTML editor won't work: you'll be unable to see/edit content and toolbar buttons will be not responding. When the editor is in this state, a workaround is to close the window and open it again.

Trim added 21 commits May 30, 2017 15:07
This commit fix the overlay, but the JavaScript needs now fixes
to hide/display exchangecalendar items with the good context.
This code was the same than the original Lightening code contained in
chrome://messenger/content/messenger.xul

Exchangecalendar has nothing added and the overlay is bugged:
 * it didn't overlay the context menu in the attendee tab on the
bottom of the dialog
 * it didn't display days and times in the header of attendee dialog
…alizer

to get valid xhtml code (with XML tags well terminated)
This reverts commit 9f0aacb.

I'm reverting this change, since I use now correctly formatted xhtml which avoids exceptions while saving content to innerHTML.
…tead of capture

This is to be sure to be called after the Lightening onLoad() listener.
@advancingu
Copy link
Member

@Trim Thanks as well for the PR here.

Tested a bit and found the following:

In this PR, date and time input boxes are double-nested:
screenshot from 2017-06-07 21-12-38

In the ec-4.0 branch they look like this (correct):
screenshot from 2017-06-07 21-15-45

@Trim
Copy link
Member Author

Trim commented Jun 8, 2017

Thanks for the tests, I supposed that was because of the GTK3 migration of Thunderbrid, so I didn't take care. I'll check why we have such double nest.

@Trim
Copy link
Member Author

Trim commented Jun 8, 2017

Well, this commit fix the double nesting for the current TB release.

Although, for the current TB beta, it looses the new graphical datetime picker.

I'm looking to find a solution to have both working, but for now, this code works with TB release.

Edit: I've just seen you already have graphical datetime picker in your screen shots. I don't have them under Debian 9 even with a blank profile, strange...

Trim and others added 4 commits June 8, 2017 14:27
Fix javascript code to:
 * avoid removing event listener
 * avoid using try/catch without need
 * avoid to reset current set of items, but instead add back attachment
   if not already in toolbar and url attachment is there
@Trim
Copy link
Member Author

Trim commented Jun 8, 2017

I'll made a new branch to fix the entire event-dialog.

On this one, I've made a lot of experiments and they are more noise than really relevant.

I have to take time to read this documentation and make a plan before coding.

@Trim Trim closed this Jun 8, 2017
@Trim
Copy link
Member Author

Trim commented Jun 9, 2017

Ok, Lightning allows now to use window dialog or tabs to open event and tasks.

That's why the dialog is now defined in an iframe.

First step for us will be to correctly update the standard window dialog, then we could take in consideration for the tab view.

I didn't now, but the parent can modify its ifram child by use of contextWindow: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow

So, we should be able to use work in this branch.

Trim added 2 commits June 9, 2017 10:27
To reflect clearly the calendar event dialog has been moved to an iframe
by Lightning, we move all our stuff to the new name.
…t menu

Tabs have been replaced by spaces too as most of the file where replaced
too.
@advancingu
Copy link
Member

Great, that sounds like it will do the trick.

Trim added 4 commits June 9, 2017 14:37
…dow menu and toolbar

Now that the main dialog is included in an iframe, we have to communicate
with the iframe from the parent to give to the iframe the good commands.

The structure of sendMessage/receiveMessage come from the Lightning project.
Especially the sendMessage() function which send command with the good event id
(needed for tab view).
…commands

from parent using the receiveMessage() function.
As window menu and toolbar belong to the parent, the inner iframe can't
modify them.
@Trim Trim reopened this Jun 9, 2017
@Trim
Copy link
Member Author

Trim commented Jun 9, 2017

Ok, I've updated this branch as the work wasn't so big I thought yesterday.

Now attachment menus and attachment list works well (including context menu on right click).

I think I won't have the motivation to debug the issue with the HTML content editor.
But I can add a screen cast to display what happens some times: video illustrating the issue

@advancingu advancingu merged commit 76b8803 into ec-4.0 Jun 10, 2017
@advancingu
Copy link
Member

@Trim Great, this works fine now.

@advancingu advancingu deleted the wip-dialogs-event-attendees branch September 30, 2018 10:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants