mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Remove HTML/CSS editing function from site design setup
This commit is contained in:
parent
311a35c955
commit
cec158ba41
3 changed files with 3 additions and 138 deletions
|
|
@ -5,7 +5,7 @@
|
|||
<action name="dispLayoutPreview" type="view" permission="root" meta-noindex="true" />
|
||||
<action name="dispLayoutPreviewWithModule" type="view" permission="root" meta-noindex="true" />
|
||||
<action name="getLayoutInstanceListForJSONP" type="model" permission="root" />
|
||||
|
||||
|
||||
<action name="dispLayoutAdminInstalledList" type="view" admin_index="true" menu_name="installedLayout" menu_index="true" />
|
||||
<action name="dispLayoutAdminAllInstanceList" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminInstanceList" type="view" menu_name="installedLayout" />
|
||||
|
|
@ -14,11 +14,10 @@
|
|||
<action name="dispLayoutAdminEdit" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminCopyLayout" type="view" />
|
||||
<action name="dispLayoutAdminLayoutModify" type="view" />
|
||||
|
||||
|
||||
<action name="getLayoutAdminSetInfoView" type="model" />
|
||||
<action name="getLayoutAdminSetHTMLCSS" type="model" />
|
||||
<action name="getLayoutAdminSiteDefaultLayout" type="model" />
|
||||
|
||||
|
||||
<action name="procLayoutAdminInsert" type="controller" ruleset="insertLayout" />
|
||||
<action name="procLayoutAdminUpdate" type="controller" ruleset="updateLayout" />
|
||||
<action name="procLayoutAdminDelete" type="controller" ruleset="deleteLayout" />
|
||||
|
|
|
|||
|
|
@ -92,73 +92,6 @@ class LayoutAdminModel extends Layout
|
|||
Context::set('selected_layout', $layout_info);
|
||||
}
|
||||
|
||||
public function getLayoutAdminSetHTMLCSS()
|
||||
{
|
||||
// Set the layout with its information
|
||||
$layout_srl = Context::get('layout_srl');
|
||||
// Get layout information
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
||||
// Error appears if there is no layout information is registered
|
||||
if(!$layout_info)
|
||||
{
|
||||
return $this->dispLayoutAdminInstalledList();
|
||||
}
|
||||
|
||||
// Get Layout Code
|
||||
if($oLayoutModel->useDefaultLayout($layout_info->layout_srl))
|
||||
{
|
||||
$layout_file = $oLayoutModel->getDefaultLayoutHtml($layout_info->layout);
|
||||
$layout_css_file = $oLayoutModel->getDefaultLayoutCss($layout_info->layout);
|
||||
}
|
||||
else
|
||||
{
|
||||
$layout_file = $oLayoutModel->getUserLayoutHtml($layout_info->layout_srl);
|
||||
$layout_css_file = $oLayoutModel->getUserLayoutCss($layout_info->layout_srl);
|
||||
|
||||
if(!file_exists($layout_file)) $layout_file = $layout_info->path . 'layout.html';
|
||||
if(!file_exists($layout_css_file)) $layout_css_file = $layout_info->path . 'layout.css';
|
||||
}
|
||||
|
||||
if(file_exists($layout_css_file))
|
||||
{
|
||||
$layout_code_css = FileHandler::readFile($layout_css_file);
|
||||
Context::set('layout_code_css', $layout_code_css);
|
||||
}
|
||||
|
||||
$layout_code = FileHandler::readFile($layout_file);
|
||||
Context::set('layout_code', $layout_code);
|
||||
|
||||
// set User Images
|
||||
$layout_image_list = $oLayoutModel->getUserLayoutImageList($layout_info->layout_srl);
|
||||
Context::set('layout_image_list', $layout_image_list);
|
||||
|
||||
$layout_image_path = $oLayoutModel->getUserLayoutImagePath($layout_info->layout_srl);
|
||||
Context::set('layout_image_path', $layout_image_path);
|
||||
// Set widget list
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widget_list = $oWidgetModel->getDownloadedWidgetList();
|
||||
Context::set('widget_list', $widget_list);
|
||||
|
||||
$security = new Security($layout_info);
|
||||
$layout_info = $security->encodeHTML('.', '.author..');
|
||||
Context::set('selected_layout', $layout_info);
|
||||
|
||||
//Security
|
||||
$security = new Security();
|
||||
$security->encodeHTML('layout_list..');
|
||||
$security->encodeHTML('layout_list..author..');
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('layout_code_css', 'layout_code', 'widget_list..title');
|
||||
|
||||
$script = '<script src="./modules/layout/tpl/js/layout_admin_set_html.js"></script>';
|
||||
$oTemplate = TemplateHandler::getInstance();
|
||||
$html = $oTemplate->compile($this->module_path.'tpl/', 'layout_html_css_view');
|
||||
|
||||
$this->add('html', $script.$html);
|
||||
}
|
||||
|
||||
public function getLayoutAdminSiteDefaultLayout()
|
||||
{
|
||||
$type = Context::get('type');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue