Modernizing Tabulator
This commit is contained in:
parent
63e894fc3b
commit
6a45a50955
2 changed files with 21 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue