diff --git a/mozilla/calendar/base/content/calendar-dialog-utils.js b/mozilla/calendar/base/content/calendar-dialog-utils.js
index fa0752f2bc6..b43ab46ece0 100644
--- a/mozilla/calendar/base/content/calendar-dialog-utils.js
+++ b/mozilla/calendar/base/content/calendar-dialog-utils.js
@@ -79,3 +79,13 @@ function disableElement(elementId)
{
setElementValue(elementId, "true", "disabled");
}
+
+/* use with textfields oninput to only allow integers */
+function validateIntegers(event)
+{
+ if (isNaN(Number(event.target.value))) {
+ var newValue = parseInt(event.target.value);
+ event.target.value = isNaN(newValue) ? "" : newValue;
+ event.preventDefault();
+ }
+}
diff --git a/mozilla/calendar/base/content/calendar-event-dialog.js b/mozilla/calendar/base/content/calendar-event-dialog.js
index ca569f8847c..d26b8653015 100644
--- a/mozilla/calendar/base/content/calendar-event-dialog.js
+++ b/mozilla/calendar/base/content/calendar-event-dialog.js
@@ -233,6 +233,7 @@ function saveDialog(event)
event.alarmTime = alarmTime;
}
+ dump(event.icalString + "\n");
}
@@ -319,6 +320,8 @@ function editRecurrence()
/* utility functions */
function setEventProperty(event, propertyName, value)
{
- if (value)
+ if (!value || value == "")
+ event.deleteProperty(propertyName);
+ else
event.setProperty(propertyName, value);
}
diff --git a/mozilla/calendar/base/content/calendar-event-dialog.xul b/mozilla/calendar/base/content/calendar-event-dialog.xul
index 0e2d3da7f85..f7b3a605d6a 100644
--- a/mozilla/calendar/base/content/calendar-event-dialog.xul
+++ b/mozilla/calendar/base/content/calendar-event-dialog.xul
@@ -116,15 +116,6 @@
-
-
-
-
-
-
-
-
-
@@ -153,7 +144,7 @@
-
+
@@ -172,7 +163,7 @@
-
+
diff --git a/mozilla/calendar/base/content/calendar-recurrence-dialog.xul b/mozilla/calendar/base/content/calendar-recurrence-dialog.xul
index 820ada3f3e6..586b3b0eeaa 100644
--- a/mozilla/calendar/base/content/calendar-recurrence-dialog.xul
+++ b/mozilla/calendar/base/content/calendar-recurrence-dialog.xul
@@ -85,7 +85,7 @@
-
+
@@ -127,7 +127,7 @@
-
+
@@ -156,7 +156,7 @@
-
+