CC-4873: Airtime takes 7 seconds to load 32K (very small) from db
-we know what month will be the initial view for the user. -Provide this data ahead of time.
This commit is contained in:
parent
548b73db42
commit
091f5ff49f
3 changed files with 50 additions and 12 deletions
|
@ -96,6 +96,22 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->preloadShowForm = true;
|
||||
}
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
|
||||
$editable = true;
|
||||
} else {
|
||||
$editable = false;
|
||||
}
|
||||
|
||||
$calendar_interval = Application_Model_Preference::GetCalendarTimeInterval();
|
||||
if ($calendar_interval == "agendaDay") {
|
||||
} else if ($calendar_interval == "agendaWeek") {
|
||||
} else if ($calendar_interval == "month") {
|
||||
}
|
||||
list($start, $end) = Application_Model_Show::getStartEndCurrentMonthView();
|
||||
$events = &Application_Model_Show::getFullCalendarEvents($start, $end, $editable);
|
||||
|
||||
$this->view->headScript()->appendScript(
|
||||
"var calendarPref = {};\n".
|
||||
"calendarPref.weekStart = ".Application_Model_Preference::GetWeekStartDay().";\n".
|
||||
|
@ -103,7 +119,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
"calendarPref.timezoneOffset = ".date("Z").";\n".
|
||||
"calendarPref.timeScale = '".Application_Model_Preference::GetCalendarTimeScale()."';\n".
|
||||
"calendarPref.timeInterval = ".Application_Model_Preference::GetCalendarTimeInterval().";\n".
|
||||
"calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n"
|
||||
"calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n".
|
||||
"var calendarEvents = ".json_encode($events).";"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue