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');
|
||||
|
|
|
|||
|
|
@ -498,7 +498,6 @@
|
|||
</button>
|
||||
<ul class="_edit_menu">
|
||||
<li><a href="#layoutSetup" data-admin-show="#layoutSetup" data-param='{ "sLayoutSrl":"${LayoutSrl}"}'>{$lang->full_settings} <i class="x_icon-circle-arrow-right"></i></a></li>
|
||||
<li><a href="#layoutMarkupSetup" data-admin-show="#layoutMarkupSetup" data-param='{ "sLayoutSrl":"${LayoutSrl}"}'>HTML/CSS <i class="x_icon-circle-arrow-right"></i></a></li>
|
||||
<li><button type="button" class="_duplicateLayout">{$lang->make_copy}</button></li>
|
||||
<li><button type="button" class="_deleteLayout">{$lang->cmd_delete}</button></li>
|
||||
</ul>
|
||||
|
|
@ -523,16 +522,6 @@
|
|||
</section>
|
||||
<button type="button" class="x_close" data-admin-hide="#layoutSetup">×</button>
|
||||
</div>
|
||||
<div class="col layoutMarkupSetup" id="layoutMarkupSetup" style="display:none">
|
||||
<section>
|
||||
<h1>{$lang->layout_html_css_settings}</h1>
|
||||
<div class="cnt">
|
||||
<div class="_contents"></div>
|
||||
</div>
|
||||
</section>
|
||||
<button type="button" class="x_close" data-admin-hide="#layoutMarkupSetup">×</button>
|
||||
</div>
|
||||
|
||||
<div class="col download" id="downloadLayout" style="display:none">
|
||||
<section>
|
||||
<h1>{$lang->install_other_layouts}</h1>
|
||||
|
|
@ -3423,62 +3412,6 @@ jQuery(function($){
|
|||
top.refreshLayoutList = function(htData){
|
||||
$('#layout').show();
|
||||
}
|
||||
top.refreshLayoutMarkupSetup = function(htData){
|
||||
$('#layoutMarkupSetup').show();
|
||||
}
|
||||
$('#layoutMarkupSetup').on('show', function(ev){
|
||||
var sLayoutSrl = $._htMarkupActionParam.sLayoutSrl;
|
||||
$.exec_json("layout.getLayoutAdminSetHTMLCSS", {layout_srl: sLayoutSrl}, function(htData){
|
||||
//console.log(htData);
|
||||
$contents = $('#layoutMarkupSetup ._contents');
|
||||
$contents.html(htData.html);
|
||||
|
||||
$allForms = $('#layoutMarkupSetup form');
|
||||
|
||||
$fileChest = $contents.find('form[enctype="multipart/form-data"]');
|
||||
$markup = $contents.find('#fo_layout');
|
||||
|
||||
$fileDelete = $allForms.not($fileChest).not($markup);
|
||||
|
||||
/*
|
||||
$fileChest.append($("<INPUT>").attr("type", "hidden").attr("name", "xe_js_callback").attr("value", "top.refreshLayoutMarkupSetup"));
|
||||
$fileChest.attr('target', 'submitTarget');
|
||||
*/
|
||||
|
||||
$fileChest.add($fileDelete).append($("<INPUT>").attr("type", "hidden").attr("name", "xe_js_callback").attr("value", "top.refreshLayoutMarkupSetup"));
|
||||
$markup.append($("<INPUT>").attr("type", "hidden").attr("name", "xe_js_callback").attr("value", "top.refreshLayoutList"));
|
||||
|
||||
$allForms.attr('target', 'submitTarget');
|
||||
|
||||
var $configForm = $('#config_form');
|
||||
$configForm.on('submit', function(ev){
|
||||
var htData = {};
|
||||
var sKey, sValue;
|
||||
$(this).find('input').each(function(){
|
||||
sKey = $(this).attr('name');
|
||||
sValue = $(this).val();
|
||||
htData[sKey] = sValue;
|
||||
});
|
||||
|
||||
ev.preventDefault();
|
||||
|
||||
var sUrl = $('#config_form').attr('action');
|
||||
$.post( sUrl, htData,
|
||||
function( strRes ) {
|
||||
var htData = $.parseJSON(strRes);
|
||||
|
||||
$('#layoutSetup').hide();
|
||||
//console.log(999, strRes, htData);
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
scrollToRight();
|
||||
});
|
||||
});
|
||||
$('#layoutMarkupSetup').on('after-show', function(ev){
|
||||
scrollToRight();
|
||||
});
|
||||
|
||||
function doDelete(sMenuSrl, bForce, sSelectOnload, deleteModule){
|
||||
var params = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue