summaryrefslogtreecommitdiffstats
path: root/comm/calendar/base/content/dialogs/calendar-error-prompt.js
diff options
context:
space:
mode:
Diffstat (limited to 'comm/calendar/base/content/dialogs/calendar-error-prompt.js')
-rw-r--r--comm/calendar/base/content/dialogs/calendar-error-prompt.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/comm/calendar/base/content/dialogs/calendar-error-prompt.js b/comm/calendar/base/content/dialogs/calendar-error-prompt.js
new file mode 100644
index 0000000000..538d360a99
--- /dev/null
+++ b/comm/calendar/base/content/dialogs/calendar-error-prompt.js
@@ -0,0 +1,21 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+window.addEventListener("DOMContentLoaded", loadErrorPrompt);
+
+function loadErrorPrompt() {
+ let args = window.arguments[0].QueryInterface(Ci.nsIDialogParamBlock);
+ document.getElementById("general-text").value = args.GetString(0);
+ document.getElementById("error-code").value = args.GetString(1);
+ document.getElementById("error-description").value = args.GetString(2);
+}
+function toggleDetails() {
+ let options = document.getElementById("details-box");
+ options.collapsed = !options.collapsed;
+ // Grow the window height if the details overflow.
+ window.resizeTo(
+ window.outerWidth,
+ document.body.scrollHeight + window.outerHeight - window.innerHeight
+ );
+}