From 328f43027d0fb95f8b37ada7e673c838652ca80c Mon Sep 17 00:00:00 2001 From: nbm Date: Mon, 29 Nov 2004 20:21:05 +0000 Subject: [PATCH] Make CSS-based buttons work better in IE. --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc | 15 +++++++-------- presentation/lookAndFeel/knowledgeTree/stylesheet.php | 4 +--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc index 0e6e850..5931012 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc @@ -404,7 +404,7 @@ $aImageNameToLabel = array( "dependentdoc" => "Link new doc", ); -function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "") { +function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "", $sJS = "") { global $default; global $aImageNameToLabel; // the active is active if there is no disabled text @@ -427,10 +427,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "" $sLabel = strtoupper($sTranslatedWords); if ($bActive) { $sClass = "button"; + $sJS = $sJS . " onMouseOver=\"javascript:this.style.backgroundColor='#EEEEEE';\" onMouseOut=\"javascript:this.style.backgroundColor='#FFFFFF';\""; } else { $sClass = "disabledbutton"; } - $sImage = "$sLabel"; + $sImage = "$sLabel"; } if ($bActive) { return generateControllerLink($sAction, $sQueryString, $sImage); @@ -440,13 +441,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "" } function displayViewButton($oDocument, $bEdit) { - global $default; + $sQueryString = "fDocumentID=" . $oDocument->getID(); $sViewAlert = _("This will download a copy of the document and is not the same as Checking Out a document. Changes to this downloaded file will not be managed in the DMS."); - if ($default->useTextButtons === false) { - return "graphicsUrl/widgets/docactions/view.gif\" border=\"0\" title=\"" . _("View the document") . "\"/>\n"; - } else { - return "" . strtoupper(_("View")) . "\n"; - } + $sJS = "onClick=\"alert('$sViewAlert '); return true;\""; + return displayButton("downloadDocument", $sQueryString, "view", $sDisabledText, $sJS); + } function displayCheckInOutButton($oDocument, $bEdit) { diff --git a/presentation/lookAndFeel/knowledgeTree/stylesheet.php b/presentation/lookAndFeel/knowledgeTree/stylesheet.php index 17f8a7d..b0a77b8 100644 --- a/presentation/lookAndFeel/knowledgeTree/stylesheet.php +++ b/presentation/lookAndFeel/knowledgeTree/stylesheet.php @@ -151,6 +151,7 @@ SELECT { } span.button { + cursor: hand; font-size: 6pt; width: 100%; /* height: 20px; */ @@ -161,9 +162,6 @@ span.button { margin-top: 4px; text-decoration: none; } -span.button:Hover { - background-color: #EEEEEE; -} span.disabledbutton { font-size: 6pt; background-color: #CCCCCC; -- libgit2 0.21.4