summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/html.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-04-19 17:44:29 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-04-19 17:44:29 +0000
commitc4185d03cfb5c4e9df4c004b2c13a9b3c3196eac (patch)
tree4f7ca23360a62cf181bb23a0f2264d69481cac03 /roundcubemail/program/include/html.php
parent137ee56eda15ecccb6a619a906ac532fc5d6c042 (diff)
Merged branch devel-api (from r2208 to r2387) back into trunk (omitting some sample plugins)
git-svn-id: https://svn.roundcube.net/trunk@2401 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/html.php')
-rw-r--r--roundcubemail/program/include/html.php30
1 files changed, 29 insertions, 1 deletions
diff --git a/roundcubemail/program/include/html.php b/roundcubemail/program/include/html.php
index 01ad41544..78e696cb6 100644
--- a/roundcubemail/program/include/html.php
+++ b/roundcubemail/program/include/html.php
@@ -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
*