public function ChangeState($info) { $response = Project::getAjaxResponse(); $this->set($info); $this->setTemplate($this->_dir, 'city_list.tpl.php'); $response->block('city_div', true, $this->parse()); }
function AjaxChangeBranch($info = array()) { $response = Project::getAjaxResponse(); $this->set($info); $this->setTemplate($this->_dir, 'post_tag.tpl.php'); $response->block('tag_list', true, $this->parse()); }
public function AjaxAddPage($data) { $this->setTemplate(null, 'page_article.tpl.php'); $this->set($data); $response = Project::getAjaxResponse(); $response->block('pages', true, $this->parse()); //TODO: addBlock }
public function AjaxSectionList($data) { $response = Project::getAjaxResponse(); $this->setTemplate($this->_dir, 'tree.tpl.php'); $response->clearBlock('edit_block'); $response->hide('edit_block'); $this->set($data); $response->block('list_block', true, $this->parse()); }
public function EditQuestion($data) { $response = Project::getAjaxResponse(); $response->save(); $response->clearBlock($this->_flesh_messages_block); $response->hide('edit_block'); $response->enable('list_block'); $data['cancel_param'] = $response->getResponse(); $response->restore(); $this->set($data); $this->setTemplate($this->_dir, 'edit_question.tpl.php'); $response->block('edit_block', true, $this->parse()); $response->disable('list_block'); }
public function ReloadDropDowns($depends) { $response = Project::getAjaxResponse(); if (in_array('country', $depends)) { $response->block('country_block', true, $this->_dropdown('country', 'выберите тип', '- выберите страну -', $this->countries)); } if (in_array('city', $depends)) { $response->block('city_block', true, $this->_dropdown('city', 'выберите страну', '- выберите город -', $this->cities)); } if (in_array('geo_subtype', $depends)) { $response->block('geo_subtype_block', true, $this->_dropdown('geo_subtype', 'выберите город', '- выберите тип -', $this->geo_subtypes)); } if (in_array('geo_place', $depends)) { $response->block('geo_place_block', true, $this->_dropdown('geo_place', 'выберите тип', '- выберите место -', $this->geo_places)); } }
function AjaxActionList($info) { $response = Project::getAjaxResponse(); $response->save(); $response->hide('action_list_' . $info['controller_id']); //$response -> enable('list_block'); $info['cancel_param'] = $response->getResponse(); $response->restore(); $number = 1; foreach ($info['actions_list'] as &$item) { $item['number'] = $number; $item['change_access_link'] = AjaxRequest::getJsonParam($info['change_access_controller'], $info['change_access_action'], array('id' => $item['id'], 'gid' => $info['user_type_id'], 'cid' => $info['controller_id'])); $number++; } $this->set($info); $this->setTemplate($this->_dir, 'action_list.tpl.php'); $response->block('action_list_' . $info['controller_id'], true, $this->parse()); //$response -> disable('list_block'); }
function clearFlashMessages() { Project::getAjaxResponse()->clearBlock($this->_flesh_messages_block); }
function returnCorrespondentPage($message) { $response = Project::getAjaxResponse(); $htmlMess = ""; $i = 1; foreach ($message['aMessages'] as $userMessage) { if ($i / 2 == 1) { $i = 1; } else { $i++; } $htmlMess .= ' <div class="cmod_tab' . $i . '"> <h3>' . $userMessage['author_login'] . '</h3>, <h3>' . $userMessage['header'] . '</h3>, ' . $userMessage['send_date'] . ' '; if ($userMessage['author_id'] != $this->user_id) { $htmlMess .= ' <a href="' . Project::getRequest()->createUrl('Messages', 'SendMessage') . '/message_action:reply/mess_id:' . $userMessage['id'] . '"><b>написать сообщение</b></a> | <a onclick="return DelMessageCorrespondence(' . $userMessage['messages_id'] . ', ' . $message['corr_user_id'] . ');" href="javascript: void(0);"><b>удалить</b></a>'; } $htmlMess .= ' <p> ' . $userMessage['m_text'] . ' </p> </div>'; } $response->block('cmod_messages', true, $htmlMess); }
public function ChangeStatesAction() { $request = Project::getRequest(); $state_id = $request->getKeyByNumber(0); if ($state_id) { $info = array(); $state_model = new CityModel(); $info['city_list'] = $state_model->loadByState($state_id); $this->_view->ChangeState($info); $this->_view->ajax(); } else { $response = Project::getAjaxResponse(); $response->block('city_div', true, ''); $this->_view->ajax(); } }
function returnTabs($message) { $response = Project::getAjaxResponse(); $tabs_map = $message['tabs_map']; $htmlTopTabs = $this->getTabsNames($tabs_map, $message['user_id']); $htmlInputs = $this->getAddTabsInputs($tabs_map); $response->block('top_tabs', true, $htmlTopTabs); $response->block('AddTabsInputs', true, $htmlInputs); $response->runFunction('CloseAllTabs(1)'); }
function ChangeNewsFavorite($message) { $response = Project::getAjaxResponse(); if ($message['val']) { $starGif = "star_on.gif"; } else { $starGif = "star_off.gif"; } $response->attribute('imgstar' . $message['newsId'], 'src', $message['imgUrl'] . $starGif); //print_r($response -> getResponse()); }
/** * AJAX Functions * */ function returnArbitrationAdded($message) { $response = Project::getAjaxResponse(); $response->block('complaintArbitration' . $message['item_id'], true, "Жалоба отправлена"); }
function Change($info = array()) { $response = Project::getAjaxResponse(); $response->effect("ch_" . $info['id'], 'revert'); }
function helperCansay($message) { $response = Project::getAjaxResponse(); $response->hide($message['elementId']); }
function CheckEmail($message) { $response = Project::getAjaxResponse(); $response->block('email_check_result', true, $message); }