'title ASC'); protected function _addListItem(Qs_ViewController_List $list = null, $template = 'list.tpl') { parent::_addListItem(); $this->_getDataObj()->addFilter(array('madaMember' => 'y')); $this->_addMapScripts($this->_getDataObj()->resetListLimit()->getList()); return $this; } protected function _addMapScripts($mapOptionsList) { $googleMapsJs = $this->getConfig('googleMapsJs'); $this->_doc->addScript($googleMapsJs); $this->_doc->addScript('js/app/dealer/searchDealer.js'); $this->_doc->addInitObject( 'App_Dealer_Map', array($this->_getDataObj()->getMapOptions((array)$mapOptionsList)), 'appDealerMap' ); return $this; } protected function _doList() { $this->_saveBackUrl(); if ($this->_getDataObj()->hasFilter()) { $form = $this->_getFilterForm(); if ($form->validate()) { $form->setDefault('__idItem', $this->getIdItem()); $filter = $form->getValues(); $this->_getList()->addUrlVariables(array_keys($filter)); $this->_getDataObj()->addFilter($filter); $this->_renderForm($form, Qs_Constant::get(array($this, 'FILTER_TEMPLATE'))); $this->_addLinksItem(); $value = Qs_Request::getGetValue('centerType'); if (isset($value)) { $this->_addListItem(); } else { $this->_addMapScripts(array()); $this->_doc->addItem(array('tpl' => 'Dealer/list.tpl', 'mapHeight' => 600, 'list' => array())); } } else { $this->_renderForm($form, Qs_Constant::get(array($this, 'FILTER_TEMPLATE'))); } } return $this; } protected function _doListAjax() { $form = $this->_getFilterForm(); $this->_validateAjax($form); exit; } protected function _getBlockType() { return $this->getConfig('blockType', App_Dealer_Obj::TYPE_DEALER); } protected function _renderForm($form, $template = null, $item = array()) { if (null !== $template && false !== ($item['tpl'] = $this->getTemplate($template, false))) { $form->initRender(); $form->removeContainers(); $item['form'] = $form; } else { $item['tpl'] = $this->getTemplate('text.tpl'); $item['text'] = $form->render(); } $this->_addItem($item); return $this; } }