diff --git a/site/js/dev/ponymail_assign_vars.js b/site/js/dev/ponymail_assign_vars.js
index 068a5639..dbeed72e 100644
--- a/site/js/dev/ponymail_assign_vars.js
+++ b/site/js/dev/ponymail_assign_vars.js
@@ -60,6 +60,7 @@ var pending_urls = {} // URL list for GetAsync's support functions (such as the
var pb_refresh = 0
var treeview_guard = {}
var mbox_month = null
+var max_nesting = 12
var URL_BASE = pm_config.URLBase ? pm_config.URLBase.replace(/\/+/g, "/") : ""
diff --git a/site/js/dev/ponymail_email_displays.js b/site/js/dev/ponymail_email_displays.js
index b4403992..76d56992 100644
--- a/site/js/dev/ponymail_email_displays.js
+++ b/site/js/dev/ponymail_email_displays.js
@@ -144,7 +144,18 @@ function displayEmail(json, id, level) {
}
// Default theme
else {
- thread.setAttribute("class", "reply bs-callout bs-callout-" + cols[parseInt(Math.random() * cols.length - 0.01)])
+ tclass = "reply bs-callout bs-callout-" + cols[parseInt(Math.random() * cols.length - 0.01)]
+ // If we hit max_nesting levels, discard nesting display further down.
+ // Otherwise, we risk squeezing it into oblivion.
+ thread.style.padding = "5px"
+ thread.style.fontFamily = "Hack"
+
+ if (level >= max_nesting) {
+ tclass = "reply" // No bs-callout if we nest too deep.
+ thread.style.paddingLeft = "0px"; // remove padding, left and right
+ thread.style.paddingRight = "0px";
+ }
+ thread.setAttribute("class", tclass)
thread.style.background = estyle
thread.style.marginTop = "30px"
thread.innerHTML += ' '
@@ -156,9 +167,6 @@ function displayEmail(json, id, level) {
thread.innerHTML += "
"
- //thread.style.border = "1px dotted #666"
- thread.style.padding = "5px"
- thread.style.fontFamily = "Hack"
var fields = ['From', 'To', 'CC', 'Subject', 'Date']
for (var i in fields) {
diff --git a/site/js/ponymail.js b/site/js/ponymail.js
index 84fa8eb6..2b4be050 100644
--- a/site/js/ponymail.js
+++ b/site/js/ponymail.js
@@ -68,6 +68,7 @@ var pending_urls = {} // URL list for GetAsync's support functions (such as the
var pb_refresh = 0
var treeview_guard = {}
var mbox_month = null
+var max_nesting = 12
var URL_BASE = pm_config.URLBase ? pm_config.URLBase.replace(/\/+/g, "/") : ""
@@ -1506,7 +1507,18 @@ function displayEmail(json, id, level) {
}
// Default theme
else {
- thread.setAttribute("class", "reply bs-callout bs-callout-" + cols[parseInt(Math.random() * cols.length - 0.01)])
+ tclass = "reply bs-callout bs-callout-" + cols[parseInt(Math.random() * cols.length - 0.01)]
+ // If we hit max_nesting levels, discard nesting display further down.
+ // Otherwise, we risk squeezing it into oblivion.
+ thread.style.padding = "5px"
+ thread.style.fontFamily = "Hack"
+
+ if (level >= max_nesting) {
+ tclass = "reply" // No bs-callout if we nest too deep.
+ thread.style.paddingLeft = "0px"; // remove padding, left and right
+ thread.style.paddingRight = "0px";
+ }
+ thread.setAttribute("class", tclass)
thread.style.background = estyle
thread.style.marginTop = "30px"
thread.innerHTML += ' '
@@ -1518,9 +1530,6 @@ function displayEmail(json, id, level) {
thread.innerHTML += "
"
- //thread.style.border = "1px dotted #666"
- thread.style.padding = "5px"
- thread.style.fontFamily = "Hack"
var fields = ['From', 'To', 'CC', 'Subject', 'Date']
for (var i in fields) {