rhymix/modules/widget/widget.admin.view.php
Min-Soo Kim a16670c6f6
기본 팝업창 스타일 수정. (#1075)
# 기본 팝업창 스타일 수정.

- 바뀐 관리자 페이지 스타일과 통일성 유지.
 - 임시 저장 글 불러오는 팝업 창 스타일 조정
- 팝업창 크기 계산 함수 조정
 - 폭을 먼저 확정한 다음 높이를 계산하도록 순서 조정
 - 위젯 수정 페이지 팝업 창 크기 계산 수정
 - 창 너비를 자유롭게 바꿀 수 있기 때문에, `.popup` 클래스를 가진 객체의 가로 폭을 자바스크립트가 강제로 변경하지 않도록 수정. (초기 가로 폭은 정확히 계산하여서 기존과 동일하게 맞춤)
- 라이믹스 문법에 맞춤
 - `jQuery` 를 `$` 로 쓸 수 있으므로 생략 가능한 구문 수정
2018-08-19 16:50:00 +09:00

87 lines
2.3 KiB
PHP

<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @class widgetAdminView
* @author NAVER (developers@xpressengine.com)
* @brief admin view class for widget modules
*/
class widgetAdminView extends widget
{
/**
* @brief Initialization
*/
function init()
{
$this->setTemplatePath($this->module_path.'tpl');
}
/**
* @brief Showing a list of widgets
*/
function dispWidgetAdminDownloadedList()
{
// Set widget list
$oWidgetModel = getModel('widget');
$widget_list = $oWidgetModel->getDownloadedWidgetList();
$security = new Security($widget_list);
$widget_list = $security->encodeHTML('..', '..author..');
foreach($widget_list as $no => $widget)
{
if($widget->widget)
{
$widget_list[$no]->description = nl2br(trim($widget->description));
}
else
{
unset($widget_list[$no]);
}
}
Context::set('widget_list', $widget_list);
Context::set('tCount', count($widget_list));
$this->setTemplateFile('downloaded_widget_list');
}
function dispWidgetAdminGenerateCode()
{
$oView = getView('widget');
Context::set('in_admin', true);
$this->setTemplateFile('widget_generate_code');
return $oView->dispWidgetGenerateCode();
}
/**
* @brief For information on direct entry widget popup kkuhim
*/
function dispWidgetAdminAddContent()
{
$module_srl = Context::get('module_srl');
if(!$module_srl) return $this->stop("msg_invalid_request");
$document_srl = Context::get('document_srl');
$oDocumentModel = getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl);
Context::set('oDocument', $oDocument);
$oModuleModel = getModel('module');
$columnList = array('module_srl', 'mid');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
Context::set('module_info', $module_info);
// Editors settings of the module by calling getEditor
$oEditorModel = getModel('editor');
$editor = $oEditorModel->getModuleEditor('document',$module_srl, $module_srl,'module_srl','content');
Context::set('editor', $editor);
$security = new Security();
$security->encodeHTML('member_config..');
$this->setLayoutPath('./common/tpl');
$this->setLayoutFile("popup_layout");
$this->setTemplateFile('add_content_widget');
}
}
/* End of file widget.admin.view.php */
/* Location: ./modules/widget/widget.admin.view.php */