CC-2436: Save pulldown settings

For week and day views under Calendar page, save the change to pref db table when
user updates the interval dropdown. Same thing goes for the "show XXX entries"
dropdown found under Playlist Builder page.

When visiting these pages, we retrieves the entry from database for current user
and use those values. Defaults to 30m for interval and 10 entries for "show xxx entries"
if values were never set.
This commit is contained in:
Yuchen Wang 2011-10-18 10:10:35 -04:00
parent 3e441dc72f
commit d2fe46baf0
6 changed files with 135 additions and 9 deletions

View file

@ -29,6 +29,7 @@ class ScheduleController extends Zend_Controller_Action
->addActionContext('upload-to-sound-cloud', 'json')
->addActionContext('content-context-menu', 'json')
->addActionContext('set-time-scale', 'json')
->addActionContext('set-time-interval', 'json')
->initContext();
$this->sched_sess = new Zend_Session_Namespace("schedule");
@ -737,6 +738,14 @@ class ScheduleController extends Zend_Controller_Action
public function setTimeScaleAction() {
Application_Model_Preference::SetCalendarTimeScale($this->_getParam('timeScale'));
}
/**
* Sets the user specific preference for which time interval to use in Calendar.
* This is only being used by schedule.js at the moment.
*/
public function setTimeIntervalAction() {
Application_Model_Preference::SetCalendarTimeInterval($this->_getParam('timeInterval'));
}
}