CC2646: Set a calendar view default (Day/week/month) that's remembered
Updated the calendar page so that when user chooses a different time scale to display(day/week/month), the new setting is stored in the pref database. Each user id has its own entry in the database. When visiting the calendar, we retrieves the entry from database for current user and show that time scale; defaults to monthly view if no entry found.
This commit is contained in:
parent
5a83c5b81e
commit
8b2a23b88a
4 changed files with 116 additions and 23 deletions
|
@ -28,6 +28,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
->addActionContext('get-form', 'json')
|
||||
->addActionContext('upload-to-sound-cloud', 'json')
|
||||
->addActionContext('content-context-menu', 'json')
|
||||
->addActionContext('set-time-scale', 'json')
|
||||
->initContext();
|
||||
|
||||
$this->sched_sess = new Zend_Session_Namespace("schedule");
|
||||
|
@ -728,6 +729,14 @@ class ScheduleController extends Zend_Controller_Action
|
|||
//returns format jjmenu is looking for.
|
||||
die(json_encode($menu));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user specific preference for which time scale to use in Calendar.
|
||||
* This is only being used by schedule.js at the moment.
|
||||
*/
|
||||
public function setTimeScaleAction() {
|
||||
Application_Model_Preference::SetCalendarTimeScale($this->_getParam('timeScale'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue