summaryrefslogtreecommitdiffstats
path: root/extensions/Splinter/web
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-05-15 17:34:22 +0200
committerByron Jones <bjones@mozilla.com>2013-05-15 17:34:22 +0200
commite7c1850247b48e8446c144d835fe6a4a1a67d9c3 (patch)
treecb53657ceea66d60f99525aed26a97299531ffa3 /extensions/Splinter/web
parentb29e02fc461d92a33679a3d7d1407d14185cb7f5 (diff)
downloadbugzilla-e7c1850247b48e8446c144d835fe6a4a1a67d9c3.tar.gz
bugzilla-e7c1850247b48e8446c144d835fe6a4a1a67d9c3.tar.xz
Bug 821889: Make it so that Splinter shouts loudly when a patch introduces Windows line endings
Diffstat (limited to 'extensions/Splinter/web')
-rw-r--r--extensions/Splinter/web/splinter.css2
-rw-r--r--extensions/Splinter/web/splinter.js10
2 files changed, 8 insertions, 4 deletions
diff --git a/extensions/Splinter/web/splinter.css b/extensions/Splinter/web/splinter.css
index e43dff8fa..7e27372b3 100644
--- a/extensions/Splinter/web/splinter.css
+++ b/extensions/Splinter/web/splinter.css
@@ -34,7 +34,7 @@ textarea:focus {
margin-bottom: 1em;
}
-#attachObsolete {
+#attachWarning {
font-weight: bold;
color: #c00000;
}
diff --git a/extensions/Splinter/web/splinter.js b/extensions/Splinter/web/splinter.js
index a3220a158..b43ad0736 100644
--- a/extensions/Splinter/web/splinter.js
+++ b/extensions/Splinter/web/splinter.js
@@ -2620,9 +2620,13 @@ Splinter.init = function () {
Dom.get("attachCreator").appendChild(document.createTextNode(Splinter.Bug._formatWho(Splinter.theAttachment.whoName,
Splinter.theAttachment.whoEmail)));
Dom.get("attachDate").innerHTML = Splinter.Utils.formatDate(Splinter.theAttachment.date);
- if (Splinter.theAttachment.isObsolete) {
- Dom.get("attachObsolete").innerHTML = 'OBSOLETE';
- }
+ var warnings = [];
+ if (Splinter.theAttachment.isObsolete)
+ warnings.push('OBSOLETE');
+ if (Splinter.theAttachment.isCRLF)
+ warnings.push('WINDOWS PATCH');
+ if (warnings.length > 0)
+ Dom.get("attachWarning").innerHTML = warnings.join(', ');
Dom.setStyle('attachInfo', 'display', 'block');
Dom.setStyle('quickHelpShow', 'display', 'block');