Closed
Bug 417241
Opened 16 years ago
Closed 13 years ago
Delete button should be disabled when focus is on agenda pane and selected Event is readonly
Categories
(Calendar :: General, defect)
Calendar
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: berend.cornelius09, Unassigned)
Details
Attachments
(1 file)
6.07 KB,
patch
|
Details | Diff | Splinter Review |
When I tried to implement a solution for this in calendar-common-sets.js. I found out that although my code was seemingly executed correctly I would not toggle the delete-button correctly I debugged into
Thunderbird's Code in "_getControllerForCommand" in globalOverlay.js and I
could clearly see that the wrong commandcontroller was returned when the
command is disabled. To solve the problem one would have to implement an own
command updater:
> _getControllerForCommand: function(command) {
> try {
> var controller =
> top.document.commandDispatcher.getControllerForCommand(command);
> if (controller && controller.isCommandEnabled(command))
> return controller;
> }
> catch(e) {
> }
> var controllerCount = window.controllers.getControllerCount();
> for (var i = 0; i < controllerCount; ++i) {
> var current = window.controllers.getControllerAt(i);
> try {
> if (current.supportsCommand(command) && >current.isCommandEnabled(command))
> return current;
> }
> catch (e) {
> }
> }
> return controller || window.controllers.getControllerForCommand(command);
> },
Reporter | ||
Comment 1•16 years ago
|
||
The patch attached shows the current state of my implementation about this problem. It will not apply anymore
Comment 2•13 years ago
|
||
WFM in latest code, the selection code will soon be revised anyways.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•