CC-3620 : Calendar -> Unresponsive script warning when trying to add 300 ogg files

improving speed of js rendering,
datatables config is loaded from localstorage,
removed aggregate propel behaviour on cc_show_instances time_filled.
This commit is contained in:
Naomi Aro 2012-04-16 16:33:32 +02:00
parent ef908ee894
commit c96c60dc5a
16 changed files with 210 additions and 235 deletions

View file

@ -680,7 +680,10 @@ class ScheduleController extends Zend_Controller_Action
$this->view->entries = 5;
}
public function getFormAction(){
public function getFormAction() {
$user = Application_Model_User::GetCurrentUser();
if($user->isUserType(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)){
Application_Model_Schedule::createNewFormSections($this->view);
$this->view->form = $this->view->render('schedule/add-show-form.phtml');

View file

@ -23,6 +23,24 @@ class ShowbuilderController extends Zend_Controller_Action
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$data = Application_Model_Preference::GetValue("library_datatable", true);
if ($data != "") {
$libraryTable = json_encode(unserialize($data));
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', JSON.stringify($libraryTable) );");
}
else {
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', '' );");
}
$data = Application_Model_Preference::GetValue("timeline_datatable", true);
if ($data != "") {
$timelineTable = json_encode(unserialize($data));
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', JSON.stringify($timelineTable) );");
}
else {
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );");
}
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
@ -239,6 +257,8 @@ class ShowbuilderController extends Zend_Controller_Action
public function builderFeedAction() {
$start = microtime(true);
$request = $this->getRequest();
$current_time = time();
@ -257,6 +277,11 @@ class ShowbuilderController extends Zend_Controller_Action
$this->view->schedule = $showBuilder->GetItems();
$this->view->timestamp = $current_time;
$end = microtime(true);
Logging::debug("getting builder feed info took:");
Logging::debug(floatval($end) - floatval($start));
}
public function scheduleAddAction() {

View file

@ -53,19 +53,33 @@ class UsersettingsController extends Zend_Controller_Action
public function setTimelineDatatableAction() {
$start = microtime(true);
$request = $this->getRequest();
$settings = $request->getParam("settings");
$data = serialize($settings);
Application_Model_Preference::SetValue("timeline_datatable", $data, true);
$end = microtime(true);
Logging::debug("saving timeline datatables info took:");
Logging::debug(floatval($end) - floatval($start));
}
public function getTimelineDatatableAction() {
$start = microtime(true);
$data = Application_Model_Preference::GetValue("timeline_datatable", true);
if ($data != "") {
$this->view->settings = unserialize($data);
}
$end = microtime(true);
Logging::debug("getting timeline datatables info took:");
Logging::debug(floatval($end) - floatval($start));
}
public function remindmeAction()