Changed HTML editor processing, added TinyMCE
This commit is contained in:
@@ -20,13 +20,13 @@ abstract class lnApp_Table {
|
||||
private $po = NULL; // If we are paging the results, this is the page we are displaying
|
||||
private $page = FALSE; // If we should page the results
|
||||
private $page_rows = 0; // Number of rows per page
|
||||
private $prepend = array(); // Our datafomrating that we need to use
|
||||
private $prepend_vals = array(); // Our datafomrating that we need to use
|
||||
private $prepend = array(); // Our data formating that we need to use, prepended to the value
|
||||
private $postproc = array(); // Our data formating that we need to use after the value is determined
|
||||
private $select = array(); // Our select form details
|
||||
|
||||
public function __toString() {
|
||||
try {
|
||||
return (string) $this->render();
|
||||
return (string)$this->render();
|
||||
|
||||
} catch (Exception $e) {
|
||||
return $e->getMessage();
|
||||
@@ -97,6 +97,22 @@ abstract class lnApp_Table {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->postproc[$key]) and $x) {
|
||||
foreach ($this->postproc[$key] as $act => $data) {
|
||||
switch ($act) {
|
||||
case 'trim':
|
||||
if (strlen($x) > $data) {
|
||||
$x = sprintf('<abbr title="%s">%s</abbr>',$x,substr($x,0,$data-3).str_repeat('.',3));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
throw HTTP_Exception::factory(501,'Unknown action :action',array(':action'=>$act));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $x;
|
||||
}
|
||||
|
||||
@@ -132,6 +148,12 @@ abstract class lnApp_Table {
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function postproc($cols) {
|
||||
$this->postproc = $cols;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function process() {
|
||||
$result = array();
|
||||
|
||||
|
Reference in New Issue
Block a user