| @@ 1716-1733 (lines=18) @@ | ||
| 1713 | * @param string $column |
|
| 1714 | * @return void |
|
| 1715 | */ |
|
| 1716 | public function handleShowColumn($column) |
|
| 1717 | { |
|
| 1718 | $columns = $this->getSessionData('_grid_hidden_columns'); |
|
| 1719 | ||
| 1720 | if (!empty($columns)) { |
|
| 1721 | $pos = array_search($column, $columns); |
|
| 1722 | ||
| 1723 | if ($pos !== FALSE) { |
|
| 1724 | unset($columns[$pos]); |
|
| 1725 | } |
|
| 1726 | } |
|
| 1727 | ||
| 1728 | $this->saveSessionData('_grid_hidden_columns', $columns); |
|
| 1729 | ||
| 1730 | $this->redrawControl(); |
|
| 1731 | ||
| 1732 | $this->onRedraw(); |
|
| 1733 | } |
|
| 1734 | ||
| 1735 | ||
| 1736 | /** |
|
| @@ 1741-1759 (lines=19) @@ | ||
| 1738 | * @param string $column |
|
| 1739 | * @return void |
|
| 1740 | */ |
|
| 1741 | public function handleHideColumn($column) |
|
| 1742 | { |
|
| 1743 | /** |
|
| 1744 | * Store info about hiding a column to session |
|
| 1745 | */ |
|
| 1746 | $columns = $this->getSessionData('_grid_hidden_columns'); |
|
| 1747 | ||
| 1748 | if (empty($columns)) { |
|
| 1749 | $columns = [$column]; |
|
| 1750 | } else if (!in_array($column, $columns)) { |
|
| 1751 | array_push($columns, $column); |
|
| 1752 | } |
|
| 1753 | ||
| 1754 | $this->saveSessionData('_grid_hidden_columns', $columns); |
|
| 1755 | ||
| 1756 | $this->redrawControl(); |
|
| 1757 | ||
| 1758 | $this->onRedraw(); |
|
| 1759 | } |
|
| 1760 | ||
| 1761 | ||
| 1762 | public function handleActionCallback($__key, $__id) |
|