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:
parent
3e441dc72f
commit
d2fe46baf0
6 changed files with 135 additions and 9 deletions
|
@ -501,5 +501,37 @@ class Application_Model_Preference
|
|||
public static function GetCalendarTimeScale() {
|
||||
return self::GetValue("calendar_time_scale", true /* user specific */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of entries to show preference in library under Playlist Builder.
|
||||
*
|
||||
* @param $numEntries new number of entries to show
|
||||
*/
|
||||
public static function SetLibraryNumEntries($numEntries) {
|
||||
return self::SetValue("library_num_entries", $numEntries, true /* user specific */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the number of entries to show preference in library under Playlist Builder.
|
||||
*/
|
||||
public static function GetLibraryNumEntries() {
|
||||
return self::GetValue("library_num_entries", true /* user specific */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the time interval preference in Calendar.
|
||||
*
|
||||
* @param $timeInterval new time interval
|
||||
*/
|
||||
public static function SetCalendarTimeInterval($timeInterval) {
|
||||
return self::SetValue("calendar_time_interval", $timeInterval, true /* user specific */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the time interval preference for the current user.
|
||||
*/
|
||||
public static function GetCalendarTimeInterval() {
|
||||
return self::GetValue("calendar_time_interval", true /* user specific */);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue