Move board collapse/expand mode to server side to avoid board flickering

This commit is contained in:
Frederic Guillot
2015-07-07 20:19:57 -04:00
parent 4807f3e8a0
commit 2f8beda6af
8 changed files with 136 additions and 133 deletions

View File

@@ -310,4 +310,28 @@ class Board extends Base
'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
)));
}
/**
* Enable collapsed mode
*
* @access public
*/
public function collapse()
{
$project_id = $this->request->getIntegerParam('project_id');
$this->userSession->setBoardDisplayMode($project_id, true);
$this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $project_id)));
}
/**
* Enable expanded mode
*
* @access public
*/
public function expand()
{
$project_id = $this->request->getIntegerParam('project_id');
$this->userSession->setBoardDisplayMode($project_id, false);
$this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $project_id)));
}
}