From e7c1850247b48e8446c144d835fe6a4a1a67d9c3 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 15 May 2013 23:34:22 +0800 Subject: Bug 821889: Make it so that Splinter shouts loudly when a patch introduces Windows line endings --- extensions/Splinter/web/splinter.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'extensions/Splinter/web/splinter.js') 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'); -- cgit v1.2.3-24-g4f1b