Modernizing Tabulator

This commit is contained in:
Jérôme Schneider 2012-03-20 21:06:33 +01:00
parent 63e894fc3b
commit 6a45a50955
2 changed files with 21 additions and 3 deletions

View file

@ -40,12 +40,18 @@ class TabulatorColumnCli extends TabulatorColumn {
class TabulatorCli extends Tabulator {
public $iRepeatHeadersEvery = 20;
public function getSep() {
return " ";
}
public function repeatHeadersEvery() {
return 10;
public function repeatHeadersEvery($iNum = FALSE) {
if(intval($iNum) > 0) {
$this->iRepeatHeadersEvery = intval($iNum);
}
return $this->iRepeatHeadersEvery;
}
protected function wrapHeaders($sHeaders) {

View file

@ -23,6 +23,12 @@ class TabulatorColumnHtml extends TabulatorColumn {
class TabulatorHtml extends Tabulator {
private $sCssClass = FALSE;
public function __construct($sCssClass = FALSE) {
$this->sCssClass = $sCssClass;
}
public function getSep() {
return "";
}
@ -37,7 +43,13 @@ class TabulatorHtml extends Tabulator {
}
function renderOpen() {
return "<table class=\"books\">";
$sClass = "tabulator";
if($this->sCssClass !== FALSE) {
$sClass .= " " . trim($this->sCssClass);
}
return "<table class=\"{$sClass}\">";
}
function renderClose() {