Changeset feac485 in github
- Timestamp:
- Jun 15, 2011 7:34:51 AM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 3f3ec14
- Parents:
- ca7dda4
- File:
-
- 1 edited
-
program/include/html.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/html.php
r7fc056c3 rfeac485 563 563 protected $tagname = 'table'; 564 564 protected $allowed = array('id','class','style','width','summary', 565 'cellpadding','cellspacing','border');565 'cellpadding','cellspacing','border'); 566 566 567 567 private $header = array(); … … 630 630 { 631 631 // Remove the header 632 foreach ($this->header as $index=>$header){633 if ($header->attrib['class'] == $class){632 foreach ($this->header as $index=>$header){ 633 if ($header->attrib['class'] == $class){ 634 634 unset($this->header[$index]); 635 635 break; … … 638 638 639 639 // Remove cells from rows 640 foreach ($this->rows as $i=>$row){641 foreach ($row->cells as $j=>$cell){642 if ($cell->attrib['class'] == $class){640 foreach ($this->rows as $i=>$row){ 641 foreach ($row->cells as $j=>$cell){ 642 if ($cell->attrib['class'] == $class){ 643 643 unset($this->rows[$i]->cells[$j]); 644 644 break; … … 663 663 664 664 /** 665 * Set current row attrib 666 * 667 * @param array $attr Row attributes 668 */ 669 public function set_row_attribs($attr = array()) 665 * Set row attributes 666 * 667 * @param array $attr Row attributes 668 * @param int $index Optional row index (default current row index) 669 */ 670 public function set_row_attribs($attr = array(), $index = null) 670 671 { 671 672 if (is_string($attr)) 672 673 $attr = array('class' => $attr); 673 674 674 $this->rows[$this->rowindex]->attrib = $attr; 675 if ($index === null) 676 $index = $this->rowindex; 677 678 if ($this->rows[$index]) 679 $this->rows[$index]->attrib = $attr; 680 } 681 682 /** 683 * Get row attributes 684 * 685 * @param int $index Row index 686 * 687 * @return array Row attributes 688 */ 689 public function get_row_attribs($index = null) 690 { 691 if ($index === null) 692 $index = $this->rowindex; 693 694 return $this->rows[$index] ? $this->rows[$index]->attrib : null; 675 695 } 676 696 … … 685 705 if (is_array($attrib)) 686 706 $this->attrib = array_merge($this->attrib, $attrib); 687 707 688 708 $thead = $tbody = ""; 689 709 … … 718 738 return parent::show(); 719 739 } 720 740 721 741 /** 722 742 * Count number of rows
Note: See TracChangeset
for help on using the changeset viewer.
