mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix #1882 add toggle to change if spamfilter rule applies to member
This commit is contained in:
parent
98f75ee4dd
commit
539b548509
7 changed files with 155 additions and 27 deletions
|
|
@ -24,7 +24,7 @@
|
|||
<tr loop="$ip_list => $ip_info">
|
||||
<td>{$ip_info->ipaddress}</td>
|
||||
<td>{$ip_info->description}</td>
|
||||
<td>{$ip_info->except_member}</td>
|
||||
<td><a class="denied_ip_toggle_except_member" href="#" data-ipaddress="{$ip_info->ipaddress}">{$ip_info->except_member}</a></td>
|
||||
<td><!--@if($ip_info->latest_hit)-->{zdate($ip_info->latest_hit,'Y-m-d H:i')}<!--@else-->-<!--@end--></td>
|
||||
<td>{$ip_info->hit}</td>
|
||||
<td>{zdate($ip_info->regdate,'Y-m-d')}</td>
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
<tr loop="$word_list => $word_info">
|
||||
<td>{$word_info->word} <!--@if(preg_match('#^/.+/$#', $word_info->word))--><span class="is_regexp">{$lang->cmd_spamfilter_is_regexp}</span><!--@end--></td>
|
||||
<td>{$word_info->description}</td>
|
||||
<td>{$word_info->except_member}</td>
|
||||
<td>{$word_info->filter_html}</td>
|
||||
<td><a class="denied_word_toggle_except_member" href="#" data-word="{$word_info->word}">{$word_info->except_member}</a></td>
|
||||
<td><a class="denied_word_toggle_filter_html" href="#" data-word="{$word_info->word}">{$word_info->filter_html}</a></td>
|
||||
<td><!--@if($word_info->latest_hit)-->{zdate($word_info->latest_hit,'Y-m-d H:i')}<!--@else-->-<!--@end--></td>
|
||||
<td>{$word_info->hit}</td>
|
||||
<td>{zdate($word_info->regdate,'Y-m-d')}</td>
|
||||
|
|
|
|||
|
|
@ -17,3 +17,45 @@ function doDeleteDeniedWord(word) {
|
|||
fo_obj.act.value = "procSpamfilterAdminDeleteDeniedWord";
|
||||
fo_obj.submit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle attributes.
|
||||
*/
|
||||
$(function() {
|
||||
|
||||
$('.denied_ip_toggle_except_member').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var that = $(this);
|
||||
var new_value = that.text() === 'Y' ? 'N' : 'Y';
|
||||
exec_json('spamfilter.procSpamfilterAdminUpdateDeniedIP', {
|
||||
ipaddress: that.data('ipaddress'),
|
||||
except_member: new_value
|
||||
}, function() {
|
||||
that.text(new_value);
|
||||
});
|
||||
});
|
||||
|
||||
$('.denied_word_toggle_except_member').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var that = $(this);
|
||||
var new_value = that.text() === 'Y' ? 'N' : 'Y';
|
||||
exec_json('spamfilter.procSpamfilterAdminUpdateDeniedWord', {
|
||||
word: that.data('word'),
|
||||
except_member: new_value
|
||||
}, function() {
|
||||
that.text(new_value);
|
||||
});
|
||||
});
|
||||
|
||||
$('.denied_word_toggle_filter_html').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var that = $(this);
|
||||
var new_value = that.text() === 'Y' ? 'N' : 'Y';
|
||||
exec_json('spamfilter.procSpamfilterAdminUpdateDeniedWord', {
|
||||
word: that.data('word'),
|
||||
filter_html: new_value
|
||||
}, function() {
|
||||
that.text(new_value);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue