| @@ 2080-2094 (lines=15) @@ | ||
| 2077 | * @param mixed $id |
|
| 2078 | * @return void |
|
| 2079 | */ |
|
| 2080 | public function handleGetItemDetail($id) |
|
| 2081 | { |
|
| 2082 | $this->getTemplate()->add('toggle_detail', $id); |
|
| 2083 | $this->redraw_item = [$this->items_detail->getPrimaryWhereColumn() => $id]; |
|
| 2084 | ||
| 2085 | if ($this->getPresenter()->isAjax()) { |
|
| 2086 | $this->getPresenter()->payload->_datagrid_toggle_detail = $id; |
|
| 2087 | $this->redrawControl('items'); |
|
| 2088 | $this->redrawControl('gridSnippets'); |
|
| 2089 | ||
| 2090 | $this->onRedraw(); |
|
| 2091 | } else { |
|
| 2092 | $this->getPresenter()->redirect('this'); |
|
| 2093 | } |
|
| 2094 | } |
|
| 2095 | ||
| 2096 | ||
| 2097 | /** |
|
| @@ 2116-2138 (lines=23) @@ | ||
| 2113 | * Redraw $this |
|
| 2114 | * @return void |
|
| 2115 | */ |
|
| 2116 | public function reload($snippets = []) |
|
| 2117 | { |
|
| 2118 | if ($this->getPresenter()->isAjax()) { |
|
| 2119 | $this->redrawControl('tbody'); |
|
| 2120 | $this->redrawControl('pagination'); |
|
| 2121 | ||
| 2122 | /** |
|
| 2123 | * manualy reset exports links... |
|
| 2124 | */ |
|
| 2125 | $this->resetExportsLinks(); |
|
| 2126 | $this->redrawControl('exports'); |
|
| 2127 | ||
| 2128 | foreach ($snippets as $snippet) { |
|
| 2129 | $this->redrawControl($snippet); |
|
| 2130 | } |
|
| 2131 | ||
| 2132 | $this->getPresenter()->payload->_datagrid_url = $this->refresh_url; |
|
| 2133 | ||
| 2134 | $this->onRedraw(); |
|
| 2135 | } else { |
|
| 2136 | $this->getPresenter()->redirect('this'); |
|
| 2137 | } |
|
| 2138 | } |
|
| 2139 | ||
| 2140 | ||
| 2141 | /** |
|