#944 포인트 모듈 비활성화 방법 추가

포인트 모듈을 켜고 끌 수 있게 하여서 트리거를 거치지 않을 수 있도록 하는 방법 추가.
https://github.com/xpressengine/xe-core/issues/944
This commit is contained in:
MinSoo Kim 2015-02-16 15:01:50 +09:00
parent c5893358d5
commit b1dadd21c4
6 changed files with 188 additions and 78 deletions

View file

@ -2,12 +2,19 @@
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/point/tpl/config/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal">
<form ruleset="insertConfig" action="./" method="post" id="point_module_config_form" class="x_form-horizontal">
<input type="hidden" name="module" value="point" />
<input type="hidden" name="act" value="procPointAdminInsertConfig" />
<input type="hidden" name="xe_validator_id" value="modules/point/tpl/config/1" />
<section class="section">
<section class="section default">
<h1>{$lang->is_default}</h1>
<div class="x_control-group module_io">
<label for="able_module" class="x_control-label">{$lang->point_io}</label>
<div class="x_controls" style="padding-top:3px">
<input type="checkbox" name="able_module" id="able_module" value="Y" checked="checked"|cond="!$config->able_module||$config->able_module=='Y'" />
<span class="x_help-inline">{$lang->about_point_io}</span>
</div>
</div>
<div class="x_control-group">
<label for="max_level" class="x_control-label">{$lang->max_level}</label>
<div class="x_controls">
@ -167,3 +174,20 @@
<p id="pointReCal"></p>
</section>
</form>
<script>
jQuery(function($){
var point_module_cfg = $('#point_module_config_form .default .x_control-group:not(.module_io), #point_module_config_form .section:not(.default),.x_nav-tabs>li:not(.x_active)');
if(!$('#able_module').is(':checked'))
{
point_module_cfg.hide();
}
$('#able_module').change(function(){
if($(this).is(':checked')){
point_module_cfg.slideDown(200);
} else {
point_module_cfg.slideUp(200);
}
});
});
</script>