Commit 8491d5a71045fb02f93f48916deb1a6e58eea0a6

Authored by Michael Joseph
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
lib/visualpatterns/PatternListFromQuery.inc
... ... @@ -73,15 +73,14 @@ class PatternListFromQuery {
73 73 global $default;
74 74 $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
75 75 $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
76   -
77 76  
78 77 $sql = $default->db;
79 78 $sql->query($this->sQuery);
80 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 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 86 if ($sql->num_rows() == 0) {
... ... @@ -97,7 +96,8 @@ class PatternListFromQuery {
97 96 switch ($this->aColumnTypes[$i]) {
98 97 //plain text field
99 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 101 break;
102 102 //text area
103 103 case 2:
... ...