mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-04 07:14:02 +01:00
Merged branch devel-api (from r2208 to r2387) back into trunk (omitting some sample plugins)
This commit is contained in:
@@ -33,7 +33,7 @@ class html
|
||||
protected $content;
|
||||
|
||||
public static $common_attrib = array('id','class','style','title','align');
|
||||
public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','tr','th','td','style');
|
||||
public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','tr','th','td','style','script');
|
||||
public static $lc_tags = true;
|
||||
|
||||
/**
|
||||
@@ -599,6 +599,34 @@ class html_table extends html
|
||||
$this->header[] = $cell;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a column from a table
|
||||
* Useful for plugins making alterations
|
||||
*
|
||||
* @param string $class
|
||||
*/
|
||||
public function remove_column($class)
|
||||
{
|
||||
// Remove the header
|
||||
foreach($this->header as $index=>$header){
|
||||
if($header->attrib['class'] == $class){
|
||||
unset($this->header[$index]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove cells from rows
|
||||
foreach($this->rows as $i=>$row){
|
||||
foreach($row->cells as $j=>$cell){
|
||||
if($cell->attrib['class'] == $class){
|
||||
unset($this->rows[$i]->cells[$j]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Jump to next row
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user