Bug 412202 - Long text strings in reminder should use line breaks and not scroll horizontally. r=philipp
--- 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");