Commit 8491d5a71045fb02f93f48916deb1a6e58eea0a6
1 parent
d1d82de9
corrected syntax, made tds nowrap
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2159 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
4 deletions
lib/visualpatterns/PatternListFromQuery.inc
| @@ -73,15 +73,14 @@ class PatternListFromQuery { | @@ -73,15 +73,14 @@ class PatternListFromQuery { | ||
| 73 | global $default; | 73 | global $default; |
| 74 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); | 74 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); |
| 75 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); | 75 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); |
| 76 | - | ||
| 77 | 76 | ||
| 78 | $sql = $default->db; | 77 | $sql = $default->db; |
| 79 | $sql->query($this->sQuery); | 78 | $sql->query($this->sQuery); |
| 80 | $sToRender = ""; | 79 | $sToRender = ""; |
| 81 | - $sToRender .= "<table border = 0, cellpadding = 5 " . (isset($this->iTableWidth) ? ", width = $this->iTableWidth" : "") . " >\n"; | 80 | + $sToRender .= "<table border=\"0\" cellpadding=\"5\" " . (isset($this->iTableWidth) ? " width=\"$this->iTableWidth\"" : "") . " >\n"; |
| 82 | 81 | ||
| 83 | if (isset($this->sTableHeading)) { | 82 | if (isset($this->sTableHeading)) { |
| 84 | - $sToRender .= "<caption colspan=\"" . count($this->aColumns) . "\" align=\"top\"><b>$this->sTableHeading</b></caption>\n"; | 83 | + $sToRender .= "<caption colspan=\"" . count($this->aColumns) . "\" align=\"top\"><b>$this->sTableHeading</b></caption>\n"; |
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | if ($sql->num_rows() == 0) { | 86 | if ($sql->num_rows() == 0) { |
| @@ -97,7 +96,8 @@ class PatternListFromQuery { | @@ -97,7 +96,8 @@ class PatternListFromQuery { | ||
| 97 | switch ($this->aColumnTypes[$i]) { | 96 | switch ($this->aColumnTypes[$i]) { |
| 98 | //plain text field | 97 | //plain text field |
| 99 | case 1: | 98 | case 1: |
| 100 | - $sToRender .= "<td bgcolor=\"$sTDBGColour\">" . $this->aColumnNames[$i] . "</td><td bgcolor=\"" . getColour($iColour) ."\">" . stripslashes($sql->f($this->aColumns[$i])) . "</td>\n"; | 99 | + // TODO: make nowrap optional |
| 100 | + $sToRender .= "<td nowrap bgcolor=\"$sTDBGColour\">" . $this->aColumnNames[$i] . "</td><td width=\"100%\" nowrap bgcolor=\"" . getColour($iColour) ."\">" . stripslashes($sql->f($this->aColumns[$i])) . "</td>\n"; | ||
| 101 | break; | 101 | break; |
| 102 | //text area | 102 | //text area |
| 103 | case 2: | 103 | case 2: |