Commit fcadee6bf3fc466c7ed24bd9a4beac5fcf429499

Authored by Michael Joseph
1 parent 908bb68a

made candystriping consistent, aligned text


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2429 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
@@ -80,7 +80,7 @@ function renderCategoryResults($aResults) { @@ -80,7 +80,7 @@ function renderCategoryResults($aResults) {
80 if ($aResults["categories"][0] == "Categories") { 80 if ($aResults["categories"][0] == "Categories") {
81 // loop through categories and display them 81 // loop through categories and display them
82 for ($i=1; $i<count($aResults["categories"]); $i++) { 82 for ($i=1; $i<count($aResults["categories"]); $i++) {
83 - $sToRender .= "<tr bgcolor=\"" . getColour($i) . "\">"; 83 + $sToRender .= "<tr bgcolor=\"" . getColour($i-1) . "\">";
84 84
85 // category name 85 // category name
86 $sToRender .= "<td>" . displayCategoryLink($aResults["categories"][$i]) . "</td>"; 86 $sToRender .= "<td>" . displayCategoryLink($aResults["categories"][$i]) . "</td>";
@@ -149,7 +149,7 @@ function renderDocumentTypeResults($aResults) { @@ -149,7 +149,7 @@ function renderDocumentTypeResults($aResults) {
149 if ($aResults["documentTypes"][0]["name"] == "Document Types") { 149 if ($aResults["documentTypes"][0]["name"] == "Document Types") {
150 // loop through document types and display them 150 // loop through document types and display them
151 for ($i=1; $i<count($aResults["documentTypes"]); $i++) { 151 for ($i=1; $i<count($aResults["documentTypes"]); $i++) {
152 - $sToRender .= "<tr bgcolor=\"" . getColour($i) . "\">"; 152 + $sToRender .= "<tr bgcolor=\"" . getColour($i-1) . "\">";
153 // document type name 153 // document type name
154 $sToRender .= "<td>" . displayDocumentTypeLink($aResults["documentTypes"][$i]) . "</td>"; 154 $sToRender .= "<td>" . displayDocumentTypeLink($aResults["documentTypes"][$i]) . "</td>";
155 // blank filename 155 // blank filename
@@ -190,15 +190,15 @@ function renderFolderResults($aResults) { @@ -190,15 +190,15 @@ function renderFolderResults($aResults) {
190 // the first element of the array contains the current folder name 190 // the first element of the array contains the current folder name
191 $sToRender .= "<tr bgcolor=\"" . getColour($i-1) . "\">"; 191 $sToRender .= "<tr bgcolor=\"" . getColour($i-1) . "\">";
192 // folder name 192 // folder name
193 - $sToRender .= "<td>" . $sFolderLink . "</td>"; 193 + $sToRender .= "<td valign=\"bottom\">" . $sFolderLink . "</td>";
194 // blank filename (folder description?) 194 // blank filename (folder description?)
195 - $sToRender .= "<td>" . $aResults["folders"][$i]->getDescription() . "</td>"; 195 + $sToRender .= "<td valign=\"bottom\">" . $aResults["folders"][$i]->getDescription() . "</td>";
196 // creator name 196 // creator name
197 - $sToRender .= "<td>" . ($oCreator ? $oCreator->getName() : "&nbsp;") . "</td>"; 197 + $sToRender .= "<td valign=\"bottom\">" . ($oCreator ? $oCreator->getName() : "&nbsp;") . "</td>";
198 // modified date (TODO: add to db) 198 // modified date (TODO: add to db)
199 - $sToRender .= "<td>&nbsp;</td>"; 199 + $sToRender .= "<td valign=\"bottom\">&nbsp;</td>";
200 // document type (??: display one of the mapped document types?) 200 // document type (??: display one of the mapped document types?)
201 - $sToRender .= "<td>&nbsp;</td>"; 201 + $sToRender .= "<td valign=\"bottom\">&nbsp;</td>";
202 $sToRender .= "</tr>\n"; 202 $sToRender .= "</tr>\n";
203 } 203 }
204 } else { 204 } else {
@@ -271,15 +271,15 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa @@ -271,15 +271,15 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa
271 for ($i=0; $i<count($aResults["documents"]); $i++) { 271 for ($i=0; $i<count($aResults["documents"]); $i++) {
272 // in order for candy striping to work we need to take the number of folders 272 // in order for candy striping to work we need to take the number of folders
273 // into account when alternating 273 // into account when alternating
274 - $sToRender .= "<tr bgcolor=\"" . getColour($i+$iFolderCount) . "\" width=\"100%\"><td>" . displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath) . "</td>";  
275 - $sToRender .= "<td>" . $aResults["documents"][$i]->getFileName() . "</td>"; 274 + $sToRender .= "<tr bgcolor=\"" . getColour($i+$iFolderCount) . "\" width=\"100%\"><td valign=\"bottom\">" . displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath) . "</td>";
  275 + $sToRender .= "<td valign=\"bottom\">" . $aResults["documents"][$i]->getFileName() . "</td>";
276 $oCreator = User::get($aResults["documents"][$i]->getCreatorID()); 276 $oCreator = User::get($aResults["documents"][$i]->getCreatorID());
277 - $sToRender .= "<td>" . ($oCreator ? $oCreator->getName() : "") . "</td>"; 277 + $sToRender .= "<td valign=\"bottom\">" . ($oCreator ? $oCreator->getName() : "") . "</td>";
278 $aDocumentTransaction = DocumentTransaction::getList("transaction_id=1 AND document_id=" . $aResults["documents"][$i]->getID()); 278 $aDocumentTransaction = DocumentTransaction::getList("transaction_id=1 AND document_id=" . $aResults["documents"][$i]->getID());
279 - $sToRender .= "<td>" . $aDocumentTransaction[0]->dDateTime . "</td>"; 279 + $sToRender .= "<td valign=\"bottom\">" . $aDocumentTransaction[0]->dDateTime . "</td>";
280 $oDocumentType = DocumentType::get($aResults["documents"][$i]->getDocumentTypeID()); 280 $oDocumentType = DocumentType::get($aResults["documents"][$i]->getDocumentTypeID());
281 if ($oDocumentType) { 281 if ($oDocumentType) {
282 - $sToRender .= "<td>" . $oDocumentType->getName() . "</td>"; 282 + $sToRender .= "<td valign=\"bottom\">" . $oDocumentType->getName() . "</td>";
283 } 283 }
284 $sToRender .= "</tr>\n"; 284 $sToRender .= "</tr>\n";
285 } 285 }