mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
#18592109 레이아웃 저장시 메인 페이지로 이동하는 버그 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7121 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
17b757f4e2
commit
46a95d2aa7
3 changed files with 21 additions and 3 deletions
|
|
@ -208,7 +208,9 @@
|
|||
function procLayoutAdminCodeUpdate() {
|
||||
$layout_srl = Context::get('layout_srl');
|
||||
$code = Context::get('code');
|
||||
$code_css = Context::get('code_css');
|
||||
$code_css = Context::get('code_css');
|
||||
$return_url = Context::get('_return_url');
|
||||
$is_post = (Context::getRequestMethod() == 'POST');
|
||||
if(!$layout_srl || !$code) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
|
|
@ -217,7 +219,13 @@
|
|||
|
||||
$layout_css_file = $oLayoutModel->getUserLayoutCss($layout_srl);
|
||||
FileHandler::writeFile($layout_css_file, $code_css);
|
||||
$this->setMessage('success_updated');
|
||||
|
||||
if($is_post) {
|
||||
if(!$return_url) $return_url = getUrl('module','admin','act','dispLayoutAdminEdit', 'layout_srl', $layout_srl);
|
||||
header('Location: '.$return_url);
|
||||
} else {
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -65,4 +65,13 @@ function doResetLayoutCode(layout_srl) {
|
|||
}
|
||||
window.doResetLayoutCode = doResetLayoutCode;
|
||||
|
||||
var validator = xe.getApp('validator')[0];
|
||||
validator.cast('ADD_CALLBACK', ['update_layout_code', function(form) {
|
||||
var params={},data=$(form).serializeArray();
|
||||
$.each(data, function(i,field){ params[field.name] = field.value });
|
||||
|
||||
exec_xml('layout', 'procLayoutAdminCodeUpdate', params, filterAlertMessage, ['error','message'], params, form);
|
||||
return false;
|
||||
}]);
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -84,10 +84,11 @@
|
|||
<!--@end-->
|
||||
|
||||
|
||||
<form id="fo_layout" action="./" method="post">
|
||||
<form id="fo_layout" action="{getUrl('','module','admin')}" method="post">
|
||||
<input type="hidden" name="layout_srl" value="{$layout_srl}" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminCodeUpdate" />
|
||||
<input type="hidden" name="_filter" value="update_layout_code" />
|
||||
<input type="hidden" name="_return_url" value="{htmlspecialchars($current_url)}" />
|
||||
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue