Commit 9d8557607d64cdd92d8b5618137d0984edbe9938
1 parent
8bfcbc5c
Make CSS-based buttons work better in IE.
SF tracker: 1069404 Submitted by: Stefano Ciancio (sciancio) git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3018 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
8 additions
and
11 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -404,7 +404,7 @@ $aImageNameToLabel = array( |
| 404 | 404 | "dependentdoc" => "Link new doc", |
| 405 | 405 | ); |
| 406 | 406 | |
| 407 | -function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "") { | |
| 407 | +function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "", $sJS = "") { | |
| 408 | 408 | global $default; |
| 409 | 409 | global $aImageNameToLabel; |
| 410 | 410 | // the active is active if there is no disabled text |
| ... | ... | @@ -427,10 +427,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "" |
| 427 | 427 | $sLabel = strtoupper($sTranslatedWords); |
| 428 | 428 | if ($bActive) { |
| 429 | 429 | $sClass = "button"; |
| 430 | + $sJS = $sJS . " onMouseOver=\"javascript:this.style.backgroundColor='#EEEEEE';\" onMouseOut=\"javascript:this.style.backgroundColor='#FFFFFF';\""; | |
| 430 | 431 | } else { |
| 431 | 432 | $sClass = "disabledbutton"; |
| 432 | 433 | } |
| 433 | - $sImage = "<span class=\"$sClass\">$sLabel</span>"; | |
| 434 | + $sImage = "<span class=\"$sClass\" $sJS>$sLabel</span>"; | |
| 434 | 435 | } |
| 435 | 436 | if ($bActive) { |
| 436 | 437 | return generateControllerLink($sAction, $sQueryString, $sImage); |
| ... | ... | @@ -440,13 +441,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "" |
| 440 | 441 | } |
| 441 | 442 | |
| 442 | 443 | function displayViewButton($oDocument, $bEdit) { |
| 443 | - global $default; | |
| 444 | + $sQueryString = "fDocumentID=" . $oDocument->getID(); | |
| 444 | 445 | $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."); |
| 445 | - if ($default->useTextButtons === false) { | |
| 446 | - return "<tr><td align=\"left\"><a onClick=\"alert('$sViewAlert '); return true;\" href=\"" . generateControllerLink("downloadDocument", "fDocumentID=" . $oDocument->getID()) . "\"><img src=\"$default->graphicsUrl/widgets/docactions/view.gif\" border=\"0\" title=\"" . _("View the document") . "\"/></a></td></tr>\n"; | |
| 447 | - } else { | |
| 448 | - return "<a onClick=\"alert('$sViewAlert '); return true;\" href=\"" . generateControllerLink("downloadDocument", "fDocumentID=" . $oDocument->getID()) . "\"><span class=\"button\" title=\"" . _("View the document") . "\">" . strtoupper(_("View")) . "</span></a>\n"; | |
| 449 | - } | |
| 446 | + $sJS = "onClick=\"alert('$sViewAlert '); return true;\""; | |
| 447 | + return displayButton("downloadDocument", $sQueryString, "view", $sDisabledText, $sJS); | |
| 448 | + | |
| 450 | 449 | } |
| 451 | 450 | |
| 452 | 451 | function displayCheckInOutButton($oDocument, $bEdit) { | ... | ... |
presentation/lookAndFeel/knowledgeTree/stylesheet.php
| ... | ... | @@ -151,6 +151,7 @@ SELECT { |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | span.button { |
| 154 | + cursor: hand; | |
| 154 | 155 | font-size: 6pt; |
| 155 | 156 | width: 100%; |
| 156 | 157 | /* height: 20px; */ |
| ... | ... | @@ -161,9 +162,6 @@ span.button { |
| 161 | 162 | margin-top: 4px; |
| 162 | 163 | text-decoration: none; |
| 163 | 164 | } |
| 164 | -span.button:Hover { | |
| 165 | - background-color: #EEEEEE; | |
| 166 | -} | |
| 167 | 165 | span.disabledbutton { |
| 168 | 166 | font-size: 6pt; |
| 169 | 167 | background-color: #CCCCCC; | ... | ... |