Closed Bug 389952 Opened 17 years ago Closed 17 years ago

agenda-pane: Header of Agenda-pane should be improved

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: berend.cornelius09, Assigned: berend.cornelius09)

Details

Attachments

(1 file)

Along with the implementation of the new Today-pane the agenda-pane should be equipped with a "create new Agenda" button. See specification in http://wiki.mozilla.org/Calendar:Improving_the_Calendar_Views. It should be placed on the upper left corner of the agenda-pane, so that all controls in the header of the agenda pane are properly aligned
Attached patch patch that resolves the issue — — Splinter Review
mickey: Could you review?. 
You will most probably object to my use of a rule of todaypane.css inside the xul file of the agenda pane, but I found this necessary to align it properly with the miniday in the today-pane.
Attachment #274280 - Flags: review?(michael.buettner)
Comment on attachment 274280 [details] [diff] [review]
patch that resolves the issue

>+    <toolbarbutton id="calendar-new-event-button"
>+                         class="cal-toolbarbutton-1"
>+                         label="&calendar.newevent.button.label;"
>+                         tooltiptext="&calendar.newevent.button.tooltip;"
>+                         oncommand="createNewEvent();"
>+                         iconsize="small"
>+                         orient="horizontal"/>
Can't you just use a normal button? Is there anything that <toolbarbutton> buys us?

>+      <spacer flex="1"/>
>+      <label id="agenda-label" value="&agenda.treeview.label;"/>
>+      <spacer flex="1"/>
Why can't we just center the label instead of using spacers? The net effect would be the same with less elements.

>+function createNewEvent()
>+{
>+  var index = document.getElementById("calendarTree").currentIndex;
>+  var calendar = getCalendars()[index]; 
>+  createEventWithDialog(calendar, PanePeriod.start, PanePeriod.start);
>+}
PanePeriod probably refers to the object you're introducing in bug #388414. Obviously, this makes this patch depend on another one and since the other one has been denied, we can't go ahead with this one.

Stepping a bit back reveals that this approach has another major flaw. It makes a child control (or functionality) depend on the today pane. In other words, a lower level part of the application depends on higher level parts. That way you're introducing unnecessary dependencies. As there's no reason for this, I suggest to just avoid it. For example, you could use custom events to propagate the necessary information (see the attendee/freebusy control for how this can be done).
Attachment #274280 - Flags: review?(michael.buettner) → review-
OS: Solaris → All
Hardware: Sun → All
Target Milestone: 0.7 → ---
Version: Trunk → unspecified
This issue refers to the old agenda-pane that has meanwhile been removed from the cvs-repository.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: