Commit 9d8557607d64cdd92d8b5618137d0984edbe9938

Authored by Neil Blakey-Milner
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
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
@@ -404,7 +404,7 @@ $aImageNameToLabel = array( @@ -404,7 +404,7 @@ $aImageNameToLabel = array(
404 "dependentdoc" => "Link new doc", 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 global $default; 408 global $default;
409 global $aImageNameToLabel; 409 global $aImageNameToLabel;
410 // the active is active if there is no disabled text 410 // the active is active if there is no disabled text
@@ -427,10 +427,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = "" @@ -427,10 +427,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = ""
427 $sLabel = strtoupper($sTranslatedWords); 427 $sLabel = strtoupper($sTranslatedWords);
428 if ($bActive) { 428 if ($bActive) {
429 $sClass = "button"; 429 $sClass = "button";
  430 + $sJS = $sJS . " onMouseOver=\"javascript:this.style.backgroundColor='#EEEEEE';\" onMouseOut=\"javascript:this.style.backgroundColor='#FFFFFF';\"";
430 } else { 431 } else {
431 $sClass = "disabledbutton"; 432 $sClass = "disabledbutton";
432 } 433 }
433 - $sImage = "<span class=\"$sClass\">$sLabel</span>"; 434 + $sImage = "<span class=\"$sClass\" $sJS>$sLabel</span>";
434 } 435 }
435 if ($bActive) { 436 if ($bActive) {
436 return generateControllerLink($sAction, $sQueryString, $sImage); 437 return generateControllerLink($sAction, $sQueryString, $sImage);
@@ -440,13 +441,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = &quot;&quot; @@ -440,13 +441,11 @@ function displayButton($sAction, $sQueryString, $sImageName, $sDisabledText = &quot;&quot;
440 } 441 }
441 442
442 function displayViewButton($oDocument, $bEdit) { 443 function displayViewButton($oDocument, $bEdit) {
443 - global $default; 444 + $sQueryString = "fDocumentID=" . $oDocument->getID();
444 $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 $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 function displayCheckInOutButton($oDocument, $bEdit) { 451 function displayCheckInOutButton($oDocument, $bEdit) {
presentation/lookAndFeel/knowledgeTree/stylesheet.php
@@ -151,6 +151,7 @@ SELECT { @@ -151,6 +151,7 @@ SELECT {
151 } 151 }
152 152
153 span.button { 153 span.button {
  154 + cursor: hand;
154 font-size: 6pt; 155 font-size: 6pt;
155 width: 100%; 156 width: 100%;
156 /* height: 20px; */ 157 /* height: 20px; */
@@ -161,9 +162,6 @@ span.button { @@ -161,9 +162,6 @@ span.button {
161 margin-top: 4px; 162 margin-top: 4px;
162 text-decoration: none; 163 text-decoration: none;
163 } 164 }
164 -span.button:Hover {  
165 - background-color: #EEEEEE;  
166 -}  
167 span.disabledbutton { 165 span.disabledbutton {
168 font-size: 6pt; 166 font-size: 6pt;
169 background-color: #CCCCCC; 167 background-color: #CCCCCC;