Bug 412202 - Long text strings in reminder should use line breaks and not scroll horizontally. r=philipp
authorMerike Sell <merike.sell@eesti.ee>
Fri, 07 Aug 2015 11:56:53 +0200
changeset 23047 848a5a66fd8729c677668dd32d4e3674eda28df7
parent 23046 9512b7020e0a3cdf095b84b55b08c649549e03f1
child 23048 54bb1dd1f272ba7d69b5530c82eb5224eaabdfff
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs412202
Bug 412202 - Long text strings in reminder should use line breaks and not scroll horizontally. r=philipp
calendar/base/content/widgets/calendar-alarm-widget.xml
--- a/calendar/base/content/widgets/calendar-alarm-widget.xml
+++ b/calendar/base/content/widgets/calendar-alarm-widget.xml
@@ -19,23 +19,26 @@
       <stylesheet src="chrome://global/skin/button.css"/>
       <stylesheet src="chrome://calendar/skin/calendar-alarm-dialog.css"/>
     </resources>
 
     <content orient="horizontal">
       <xul:vbox pack="start">
         <xul:image class="alarm-calendar-image"/>
       </xul:vbox>
-      <xul:vbox>
+      <xul:vbox flex="1">
         <xul:label anonid="alarm-title-label" class="alarm-title-label" crop="end"/>
         <xul:vbox class="additional-information-box">
           <xul:label anonid="alarm-date-label" class="alarm-date-label"/>
           <xul:hbox>
             <xul:label anonid="alarm-location-label" class="location-label">&calendar.alarm.location.label;</xul:label>
-            <xul:description anonid="alarm-location-description" class="alarm-location-description" crop="end"/>
+            <xul:description anonid="alarm-location-description"
+                             class="alarm-location-description"
+                             crop="end"
+                             flex="1"/>
           </xul:hbox>
           <xul:hbox pack="start">
             <xul:label class="text-link alarm-details-label"
                    value="&calendar.alarm.details.label;"
                    onclick="showDetails(event)"
                    onkeypress="showDetails(event)"/>
           </xul:hbox>
         </xul:vbox>
@@ -102,22 +105,22 @@
           } else {
               throw Components.results.NS_ERROR_ILLEGAL_VALUE;
           }
 
           // Relative date
           this.updateRelativeDateLabel();
 
           // Title, location
-          titleLabel.value = this.mItem.title || "";
-          locationDescription.value = this.mItem.getProperty("LOCATION") || "";
-          locationDescription.hidden = (locationDescription.value.length < 1);
+          titleLabel.textContent = this.mItem.title || "";
+          locationDescription.textContent = this.mItem.getProperty("LOCATION") || "";
+          locationDescription.hidden = (locationDescription.textContent.length < 1);
 
           document.getAnonymousElementByAttribute(this, "anonid", "alarm-location-label").hidden =
-              (locationDescription.value.length < 1);
+              (locationDescription.textContent.length < 1);
         ]]></body>
       </method>
 
       <method name="updateRelativeDateLabel">
         <body><![CDATA[
           let formatter = cal.getDateFormatter();
           let item = this.mItem;
           let relativeDateLabel = document.getAnonymousElementByAttribute(this, "anonid", "alarm-relative-date-label");