Fix too many simultaneous requests on agreement edit screen

약관 에디터 iframe을 동시에 5개 띄우면서 과부하가 발생하는 문제 수정
This commit is contained in:
Kijin Sung 2017-11-30 23:23:07 +09:00
parent 04fbcdd514
commit e19c196a67
6 changed files with 65 additions and 23 deletions

View file

@ -164,24 +164,25 @@ class memberAdminView extends member
*/
public function dispMemberAdminAgreementsEdit()
{
$agreement_id = intval(Context::get('id'));
Context::set('agreement_id', $agreement_id);
Context::set('agreement_content', getModel('member')->getMemberConfig()->agreements[$agreement_id]->content);
// Check parent input ID
$parent_input_id = Context::get('parent_input_id');
Context::addBodyClass('disable_debug_panel');
// Load editor
$oEditorModel = getModel('editor');
$option = $oEditorModel->getEditorConfig();
$option->primary_key_name = 'agreement_id';
$option->content_key_name = 'agreement_content';
$option->primary_key_name = 'primary_key';
$option->content_key_name = 'content';
$option->allow_fileupload = FALSE;
$option->enable_autosave = FALSE;
$option->enable_default_component = TRUE;
$option->enable_component = FALSE;
$option->height = 300;
$option->editor_focus = 'N';
$editor = $oEditorModel->getEditor($logged_info->member_srl, $option);
$option->editor_focus = 'Y';
$editor = $oEditorModel->getEditor(0, $option);
Context::set('editor', $editor);
// Set template
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("default_layout");
$this->setTemplateFile('agreements_edit');