Bug 1596938 - Replace <text> with <label> in invite attendees dialog; r=pmorris
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 28 Nov 2019 14:20:45 +1300
changeset 37700 d68773e96e3e57ea5525ebee96ad97d9f373f76e
parent 37699 cf982e0a8b1ba0e45b3f2de6084ed9eb799e74c1
child 37701 b56719530ba2a011a12720b5964624e8a582776e
push id397
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:16:13 +0000
reviewerspmorris
bugs1596938
Bug 1596938 - Replace <text> with <label> in invite attendees dialog; r=pmorris
calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
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
@@ -1528,17 +1528,17 @@
       let step_in_minutes = Math.floor((60 * this.zoomFactor) / 100);
       let formatter = Cc["@mozilla.org/calendar/datetime-formatter;1"].getService(
         Ci.calIDateTimeFormatter
       );
       let date = cal.dtz.jsDateToDateTime(new Date());
       date.hour = this.startHour;
       date.minute = 0;
       if (this.hoursNode.children.length <= 0) {
-        let template = document.createXULElement("text");
+        let template = document.createXULElement("label");
         template.className = "freebusy-grid";
         // TODO: hardcoded value
         let num_days = Math.max(2, (4 * this.zoomFactor) / 100);
         let count = Math.ceil(((this.endHour - this.startHour) * 60) / step_in_minutes);
         let remain = count;
         for (let day = 1; day <= num_days; day++) {
           let first = true;
           while (remain--) {
@@ -1763,17 +1763,17 @@
    * @extends {MozXULElement}
    */
   class MozCalendarEventFreebusyDay extends MozXULElement {
     connectedCallback() {
       if (!this.hasChildNodes()) {
         const wrapper = document.createXULElement("box");
         wrapper.setAttribute("orient", "vertical");
 
-        this.text = document.createXULElement("text");
+        this.text = document.createXULElement("label");
         this.text.classList.add("freebusy-timebar-title");
         this.text.style.fontWeight = "bold";
 
         this.box = document.createXULElement("box");
         wrapper.appendChild(this.text);
         wrapper.appendChild(this.box);
         this.appendChild(wrapper);
       }
@@ -1923,17 +1923,17 @@
           : this.dateFormatter.formatDateLong(date);
       this.text.setAttribute("value", dateValue);
 
       // Now create as many 'hour' elements as needed
       let step_in_minutes = Math.floor((60 * this.zoomFactor) / 100);
       let hours = this.box;
       date.hour = this.startHour;
       if (hours.children.length <= 0) {
-        let template = document.createXULElement("text");
+        let template = document.createXULElement("label");
         template.className = "freebusy-timebar-hour";
         let count = Math.ceil(((this.endHour - this.startHour) * 60) / step_in_minutes);
         let remain = count;
         let first = true;
         while (remain--) {
           let newNode = template.cloneNode(false);
           let value = this.dateFormatter.formatTime(date);
           if (first) {
--- a/calendar/base/themes/common/dialogs/calendar-event-dialog.css
+++ b/calendar/base/themes/common/dialogs/calendar-event-dialog.css
@@ -525,23 +525,26 @@ calendar-event-freebusy-day > box {
 
 .freebusy-content {
   overflow: hidden;
   clip: rect(0px 0px 0px 0px);
 }
 
 /* margin-inline-end 2px is needed to take border-right from the grid elements into account */
 .freebusy-timebar-title {
+  margin: 0;
   margin-inline-end: 2px;
+  padding: 0;
   padding-inline-start: 2px;
 }
 
 .freebusy-timebar-hour {
   margin-top: 2px;
   margin-bottom: 3px;
+  margin-inline: 0;
   border-inline-start: 1px solid transparent;
   padding-inline: 2px;
 }
 
 .freebusy-timebar-hour.last-in-day {
   border-inline-end: 1px solid transparent;
 }
 
@@ -551,16 +554,17 @@ calendar-event-freebusy-day > box {
      since we added the selection-bar this is no longer necessary
      but we keep the possibity to decorate those hours if it should
      become beneficial.
      text-decoration: underline;
   */
 }
 
 .freebusy-grid {
+  margin: 0;
   border-inline-start: 1px solid var(--eventGridStartBorderColor);
   padding-inline: 2px;
   background-color: #E09EBD;
   color: #E09EBD;
   min-height: 16px;
 }
 
 .freebusy-grid[state="busy"] {