#17865135, #17865030, #17855027 모듈별 포인트 설정시 초기화 버튼을 두어서 초기화시에 해당 모듈의 포인트 설정을 사라지게 하고 기본 설정을 따르도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6333 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-05-19 03:49:20 +00:00
parent e8476eba00
commit 5f4e8752bf
4 changed files with 39 additions and 1 deletions

View file

@ -12,6 +12,7 @@
<action name="procPointAdminUpdatePoint" type="controller" standalone="true" />
<action name="procPointAdminInsertPointModuleConfig" type="controller" standalone="true" />
<action name="procPointAdminApplyPoint" type="controller" standalone="true" />
<action name="procPointAdminReset" type="controller" standalone="true" />
<action name="procPointAdminReCal" type="controller" standalone="true" />
</actions>

View file

@ -274,6 +274,31 @@
}
/**
* @brief 개별 모듈의 포인트 리셋
**/
function procPointAdminReset() {
$module_srl = Context::get('module_srls');
if(!$module_srl) return new Object(-1, 'msg_invalid_request');
// 여러개의 모듈 일괄 설정일 경우
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
else $module_srl = array($module_srl);
// 설정 저장
$oModuleController = &getController('module');
for($i=0;$i<count($module_srl);$i++) {
$srl = trim($module_srl[$i]);
if(!$srl) continue;
unset($args);
$args->module = 'point';
$args->module_srl = $srl;
executeQuery('module.deleteModulePartConfig', $args);
}
$this->setMessage('success_updated');
}
/**
* @brief 캐시파일 저장
**/

View file

@ -60,3 +60,11 @@ function updatePoint(member_srl, action)
procFilter(hF, update_point);
}
function doPointReset(module_srls) {
var params = new Array();
var response_tags = new Array('error','message');
params['module_srls'] = module_srls;
exec_xml('point','procPointAdminReset',params,function(ret_obj) {alert(ret_obj['message']);}, response_tags);
}

View file

@ -1,4 +1,5 @@
<!--%import("filter/insert_point_module_config.xml")-->
<!--%import("js/point_admin.js")-->
<form action="./" method="get" onsubmit="return procFilter(this, insert_point_module_config);" id="fo_point">
<input type="hidden" name="target_module_srl" value="{$module_config['module_srl']?$module_config['module_srl']:$module_srls}" />
@ -26,7 +27,10 @@
<td><input type="text" name="read_document" value="{$module_config['read_document']}" class="inputTypeText w80" /> {$module_config['point_name']}</td>
</tr>
<tr>
<th colspan="2" class="button"><span class="button strong black"><input type="submit" value="{$lang->cmd_save}" /></span></th>
<th colspan="2" class="button">
<span class="button strong black"><input type="submit" value="{$lang->cmd_save}" /></span>
<span class="button"><input type="button" value="{$lang->cmd_reset}" onclick="doPointReset('{$module_config['module_srl']?$module_config['module_srl']:$module_srls}'); return false"/></span>
</th>
</tr>
</table>