[Today Pane] Create new event/task from agenda list box by double click is not covered by command controller

RESOLVED FIXED in 3.3

Status

Calendar
Lightning Only
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: MakeMyDay, Assigned: MakeMyDay)

Tracking

Lightning 2.6.3

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131205075310

Steps to reproduce:

1. Go to calendar tab select a calendar and mark is readonly
2. Switch to Mail tab with today Pane enabled
3. Double click in agenda list box (either events or tasks)


Actual results:

A new item dialog opens on double click, while the according menu controls (new event butoon and task text input field) are disabled.


Expected results:

The double click command should handled the same way as the respective control element.
(Assignee)

Comment 1

5 years ago
Created attachment 8348724 [details] [diff] [review]
CheckCommandStateBeforeCreateEventInAgendaListbox-V1.patch

To solve this, it may either require 

1) a check on commandController's isCommandEnabled before firing the createEventWithDialog in agenda-listbox.js (see http://mxr.mozilla.org/comm-central/source/calendar/base/content/agenda-listbox.js#569) or 

2) - probably better - implement doCommandWithParams (see http://mxr.mozilla.org/comm-central/source/mozilla/content/xul/document/public/nsIController.idl#29) and use this in agenda-list.js instead of firing the createEventWithDialog directly

The attached  patch takes the introduces the check as in 1), even though the second would be the more elegant way. Double click into todo part of today pane is not yet covered, because I just have not figured out from where the dialog is launched. Any hint is appreciated.

For notice: there are some more places where the createNewEventDialog is launched (see http://mxr.mozilla.org/comm-central/ident?i=createEventWithDialog&tree=comm-central), so it may require to patch it in the same way to reflect the CommandEnabled status consequently throughout the calendar, but I have not investigated this so far.
Attachment #8348724 - Flags: review?(philipp)
Assignee: nobody → makemyday
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8348724 [details] [diff] [review]
CheckCommandStateBeforeCreateEventInAgendaListbox-V1.patch

Review of attachment 8348724 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r=philipp
Attachment #8348724 - Flags: review?(philipp) → review+
Created attachment 8392459 [details] [diff] [review]
Fix - v2

Some minor whitespace cleanup and patch header ready for checkin.
Attachment #8348724 - Attachment is obsolete: true
Attachment #8392459 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/297a405a9c85
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 3.1
Target Milestone: 3.1 → 3.3
You need to log in before you can comment on or make changes to this bug.