Closed Bug 413326 Opened 17 years ago Closed 16 years ago

Read only calendar, use 'Click Here to Add a New Task' text field -> nothing happens

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: andreas.treumann, Assigned: Fallen)

References

Details

(Keywords: polish)

Attachments

(2 files, 2 obsolete files)

STEPS TO REPRODUCE:
===================

- set your home calendar read only
- switch to Task Mode
- use the 'Click Here to Add a New Task' text field to create a new task 

RESULT:
=======

- nothing happens

EXPECTED RESULT:
================

- the user should get the information that a task creation isn't possible because the calendar is read only.

REPRODUCIBLE:
=============

- always
Flags: wanted-calendar0.8?
Flags: wanted-calendar0.8? → wanted-calendar0.8-
Keywords: polish
> - the user should get the information that a task creation isn't possible
> because the calendar is read only.
or even be more friendly and allow him to choose non read-only calendar (if user used "Today Pane" to do this he can't quickly change default calendar)

error console:
Error: '<error>' when calling method: [calICalendar::adoptItem] = <unknown>
Source file: file:///extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/js/calCachedCalendar.js
Line: 381
I have the same failure (XP, TB 2.0.0.12, LT 0.8) if the currently selected calendar is a google calendar (I don't believe google calendar supports tasks). Possibly the same issue? Or should I file a separate bug? The silent failure could lead to data loss for anyone adding tasks if they weren't checking as they were adding them, or frustration if they don't realise what's going on...
Flags: wanted-calendar0.8- → wanted-calendar0.9?
Same issue, no new bug needed. If the click here... field values the tasks capabilities, then everything will be fine for Google Calendar.
Same issue here. Since I have installed the extension ThunderbirthDay, the automatically added calendar "Birthdays from Thunderbird" was selected as default calendar. Since this calendar is readonly, I had the same problem as described here. After just switching to Calendar "private" the problem was solved. However, I needed to search Bugzilla to find that solution....
(In reply to comment #2)
> I have the same failure (XP, TB 2.0.0.12, LT 0.8) if the currently selected
> calendar is a google calendar (I don't believe google calendar supports tasks).
> Possibly the same issue? Or should I file a separate bug? The silent failure
> could lead to data loss for anyone adding tasks if they weren't checking as
> they were adding them, or frustration if they don't realise what's going on...
> 
 
Such a bug had already been filed (bug 423871).

Should they be considered as duplicates (maybe by updating the title of this one as "Read-only or non task-enabled calendar, use 'Click Here...' ...") or not?

Flags: wanted-calendar0.9? → wanted-calendar0.9+
A different scenario after checkin of bug 434092:

- open the properties dialog of a calendar in the calendar list
- deselect 'Switch this calendar on'
- select this calendar in the calendar list
- use the 'Click Here to Add a New Task' text field to create a new task

Result:

- a new task is visible in the task list
- double mouse clicking this task -> readonly dialog comes up
- restart thunderbird -> task is gone 
Assignee: christian.jansen → philipp
Attached patch Handle Readonly/Disabled case - v1 (obsolete) β€” β€” Splinter Review
If the currently selected calendar is not writable, then a message is displayed in all task quickadd textboxes, which are also marked as readonly (to still allow tabbing to the textbox) and marked as disabled for screen readers.
Attachment #323382 - Flags: review?(Berend.Cornelius)
Attachment #323382 - Flags: ui-review?(daniel.boelzle)
Comment on attachment 323382 [details] [diff] [review]
Handle Readonly/Disabled case - v1

ui=dbo, I like that behaviour.

However, the patch has some oddities:
uncheck (visibility) a calendar in task mode:
- selection of the title still stays "Select a writable calendar"
- mark the invisible one read-only, title selection doesn't switch to diabled
I think this results due to observing composite only.
Attachment #323382 - Flags: ui-review?(daniel.boelzle)
Attachment #323382 - Flags: ui-review+
Attachment #323382 - Flags: review?(Berend.Cornelius)
Attachment #323382 - Flags: review-
Thanks for catching that! I also added task capability support in this patch version.
Attachment #323382 - Attachment is obsolete: true
Attachment #323543 - Flags: review?(Berend.Cornelius)
patch looks good and works fine, especially as you already had in my to provide accessibility for the edit control.

you could probably consolidate the following sections:
>+        var calendar = getSelectedCalendar();
>+
>+        if (calendar.getProperty("capabilities.tasks.supported") === false) {
>+            taskEdit.setupTaskField(edit, true, calGetString("calendar", >"taskEditInstructionsCapability"));
>+        } else if (!isCalendarWritable(calendar)) {
>+            taskEdit.setupTaskField(edit, true, calGetString("calendar", >"taskEditInstructionsReadonly"));
>+        } else {
>+            taskEdit.setupTaskField(edit, false, edit.savedValue || "");
>         }

and

>        var calendar = getSelectedCalendar();
>+
>+        if (calendar.getProperty("capabilities.tasks.supported") === false) {
>+            taskEdit.setupTaskField(edit, true, calGetString("calendar", >"taskEditInstructionsCapability"));
>+        } else if (!isCalendarWritable(getSelectedCalendar())) {
>+            taskEdit.setupTaskField(edit, true, calGetString("calendar", >"taskEditInstructionsReadonly"));
>+        } else {
>+            edit.savedValue = edit.value;
>+            taskEdit.setupTaskField(edit, false, calGetString("calendar", >"taskEditInstructions"));
>+        }

However I am not insisting, since both sections vary in detail...
Comment on attachment 323543 [details] [diff] [review]
Handle Readonly/Disabled case - v2

r=berend.
Attachment #323543 - Flags: review?(Berend.Cornelius) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH

-> FIXED
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.9
I checked this issue and it does not work as expected.

STR:

- select a readonly calendar
- text in the 'add new task' control changed to 'Please Select a Writable Calendar'
- select a writable calendar -> text changed to 'Click Here to Add a New Task'
- after selecting the control box with the mouse the text changed back to 'Please Select a Writable Calendar' -> But a writable calendar is selected (Step 3)!   
Resolution: FIXED → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Attached patch Additional fix - v1 (obsolete) β€” β€” Splinter Review
This bug was quite aggravating. There are some timing issues that cause the selected calendar to be changed before onBlur is processed.

This fixes.
Attachment #324456 - Flags: review?(Berend.Cornelius)
In "OnBlur" you set 
>+        edit.showsInstructions = true;
and on the following lines you set

>+            if (!edit.showsInstructions) {
>+                edit.savedValue = edit.value || "";
>+            }

This way you will always have a savedValue of "" as far as I see.
Comment on attachment 324456 [details] [diff] [review]
Additional fix - v1

r=- based on my previous comment.
Attachment #324456 - Flags: review?(Berend.Cornelius) → review-
Attached patch Additional fix - v2 β€” β€” Splinter Review
Sorry, must have lacked coffee when uploading v1 ;-) I also tested entering text into the box, changing focus (instruction shows), then changing back (old text shows). I hope everything works as expected now.
Attachment #324456 - Attachment is obsolete: true
Attachment #324589 - Flags: review?(Berend.Cornelius)
Comment on attachment 324589 [details] [diff] [review]
Additional fix - v2

r=berend
Attachment #324589 - Flags: review?(Berend.Cornelius) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH

-> FIXED
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Checked in lightning build 2008061203 -> VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: