mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/ajax] Make quick-mod tools "exception" handling more explicit
PHPBB3-10270
This commit is contained in:
parent
d96b07a745
commit
1fc26eb1d5
1 changed files with 9 additions and 5 deletions
|
@ -70,18 +70,22 @@ $('[data-ajax]').each(function() {
|
|||
phpbb.ajaxify({
|
||||
selector: '#quickmodform',
|
||||
exception: function(act, data) {
|
||||
var action = $('#quick-mod-select').val()
|
||||
var action = $('#quick-mod-select').val();
|
||||
|
||||
if (action === 'make_normal')
|
||||
{
|
||||
return !($(this).find('select option[value="make_global"]').length);
|
||||
}
|
||||
else if (action.slice(-4) === 'lock')
|
||||
else if (action === 'lock' || action === 'unlock')
|
||||
{
|
||||
// Return false for both lock and unlock
|
||||
return false;
|
||||
}
|
||||
// make_sticky, make_announce and make_global all use AJAX.
|
||||
return !(action === 'delete_topic' || action.slice(0, 5) === 'make_');
|
||||
|
||||
if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}, true);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue