From d08d7d95cfb5813b08f4c0bbc50cc435f6cf275c Mon Sep 17 00:00:00 2001
From: "jkeiser%netscape.com" <>
Date: Wed, 20 Aug 2003 07:45:39 +0000
Subject: Check for PatchReader as a part of the installation and disable the
"Diff" links if it is not there (bug 215268)
---
template/en/default/attachment/edit.html.tmpl | 16 +++++++++++++++-
template/en/default/attachment/list.html.tmpl | 2 +-
2 files changed, 16 insertions(+), 2 deletions(-)
(limited to 'template/en/default')
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 2cfc0e088..3de65766a 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -90,6 +90,7 @@
{
switchToMode('edit');
}
+[% IF patchviewerinstalled %]
function viewDiff()
{
switchToMode('diff');
@@ -102,6 +103,7 @@
has_viewed_as_diff = 1;
}
}
+[% END %]
function viewRaw()
{
switchToMode('raw');
@@ -120,11 +122,15 @@
hideElementById('undoEditButton');
} else if (current_mode == 'raw') {
hideElementById('viewFrame');
+[% IF patchviewerinstalled %]
hideElementById('viewDiffButton');
+[% END %]
hideElementById(has_edited ? 'redoEditButton' : 'editButton');
hideElementById('smallCommentFrame');
} else if (current_mode == 'diff') {
+[% IF patchviewerinstalled %]
hideElementById('viewDiffFrame');
+[% END %]
hideElementById('viewRawButton');
hideElementById(has_edited ? 'redoEditButton' : 'editButton');
hideElementById('smallCommentFrame');
@@ -136,11 +142,15 @@
showElementById('undoEditButton');
} else if (mode == 'raw') {
showElementById('viewFrame');
+[% IF patchviewerinstalled %]
showElementById('viewDiffButton');
+[% END %]
showElementById(has_edited ? 'redoEditButton' : 'editButton');
showElementById('smallCommentFrame');
} else if (mode == 'diff') {
+[% IF patchviewerinstalled %]
showElementById('viewDiffFrame');
+[% END %]
showElementById('viewRawButton');
showElementById(has_edited ? 'redoEditButton' : 'editButton');
showElementById('smallCommentFrame');
@@ -227,7 +237,7 @@
Actions: View
- [% IF ispatch %]
+ [% IF ispatch && patchviewerinstalled %]
| Diff
[% END %]
@@ -243,11 +253,15 @@