Bug 1565992 - attendees dialog recipients area needs scrollbars when adding many invitees. r=darktrojan a=regression-fix
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Tue, 16 Jul 2019 09:19:14 +0300
changeset 36113 5f9e6bc285fda009d417329525d4fbe80e15bf0d
parent 36112 decf19e35114551a2f9f5d6296db0e602c83cd4e
child 36114 0cb3f49224430ab6e0d656f22ff07ec97d3ba8ce
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersdarktrojan, regression-fix
bugs1565992
Bug 1565992 - attendees dialog recipients area needs scrollbars when adding many invitees. r=darktrojan a=regression-fix
calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.xul
calendar/base/themes/common/dialogs/calendar-event-dialog.css
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
@@ -1402,22 +1402,23 @@ class MozCalendarEventFreebusyRow extend
             this.appendChild(this.containerNodeElem);
         }
 
         this.state = null;
         this.Entries = null;
         this.offset = 0;
         this.mStartDate = null;
         this.mEndDate = null;
-        this.range = 0;
         this.startHour = 0;
         this.endHour = 24;
         this.mForce24Hours = false;
         this.mZoomFactor = 100;
         this.initTimeRange();
+        // XXX: range should not be taken from an element by id.
+        // Move the range attribute to calendar-event-freebusy-row?
         this.range = Number(document.getElementById("freebusy-grid").getAttribute("range"));
         this.onLoad();
     }
 
     /**
      * Gets node representing hours.
      *
      * @returns {Element}       Box element inside scroll-container
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xul
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xul
@@ -67,17 +67,17 @@
     </menulist>
     <toolbarbutton id="zoom-in-button"
                    class="zoom-in-icon"
                    oncommand="zoomWithButtons(false);"/>
   </hbox>
   <hbox flex="1">
     <vbox id="attendees-container" flex="1" width="250" persist="width">
       <box class="attendee-spacer-top"/>
-      <calendar-event-attendees-list flex="1" id="attendees-list" class="listbox-noborder">
+      <calendar-event-attendees-list flex="1" id="attendees-list" class="listbox-noborder" orient="vertical">
         <richlistitem class="addressingWidgetItem" allowevents="true">
           <hbox class="addressingWidgetCell" width="27" align="center" pack="center">
             <image class="status-icon"/>
           </hbox>
           <hbox class="addressingWidgetCell" width="16">
             <image class="usertype-icon"/>
           </hbox>
           <hbox class="addressingWidgetCell" flex="1">
@@ -116,22 +116,22 @@
                           allowevents="true">
               <hbox flex="1">
                 <calendar-event-scroll-container flex="1">
                   <calendar-event-freebusy-day/>
                 </calendar-event-scroll-container>
               </hbox>
             </richlistitem>
           </calendar-event-freebusy-timebar>
-          <calendar-event-freebusy-grid flex="1"
-                                        id="freebusy-grid"
+          <calendar-event-freebusy-grid id="freebusy-grid"
+                                        flex="1"
+                                        orient="vertical"
                                         range="16"
                                         class="listbox-noborder"
                                         seltype="multiple"
-                                        rows="-1"
                                         disabled="true">
             <richlistitem class="addressingWidgetItem"
                           allowevents="true">
               <hbox class="addressingWidgetCell">
                 <calendar-event-freebusy-row dirty="true"/>
               </hbox>
             </richlistitem>
           </calendar-event-freebusy-grid>
--- a/calendar/base/themes/common/dialogs/calendar-event-dialog.css
+++ b/calendar/base/themes/common/dialogs/calendar-event-dialog.css
@@ -293,19 +293,16 @@ label.label {
 #freebusy-container {
     overflow: hidden;
     min-width: 100px;
 }
 
 #freebusy-grid {
     min-width: 1px;
     -moz-user-focus: normal;
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
     overflow: hidden;
 }
 
 #freebusy-grid > .dummy-row, #freebusy-grid .dummy-row-cell {
     width: 100%;
 }
 
 #calendar-summary-dialog {
@@ -621,18 +618,16 @@ calendar-event-freebusy-day > box {
     min-width: 10px;
     min-height: 10px;
     height: 400px;
 }
 
 #attendees-list {
     -moz-user-focus: normal;
     overflow: hidden;
-    display: flex;
-    flex-direction: column;
 }
 
 #attendees-list > richlistitem {
     max-height: 17px;
     min-height: 17px;
     flex: 1;
     display: flex;
 }
@@ -646,20 +641,16 @@ calendar-event-freebusy-day > box {
     flex: 1;
     text-align: left;
 }
 
 #attendees-list hbox textbox {
     width: 100%;
 }
 
-.attendees-list-listbox > listboxbody {
-    overflow-y: hidden !important;
-}
-
 .selection-bar-left {
     width: 3px;
     cursor: w-resize;
 }
 
 .selection-bar-right {
     width: 3px;
     cursor: e-resize;