aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-02-08 19:52:04 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-03-31 02:09:24 +0200
commit1fc26eb1d57ab2e6d49c5121414090b596ba2f8d (patch)
treec9b523a9e1d80763e36b0c6596a5870f1dc27da9 /phpBB
parentd96b07a745f8bebce55a93bbeaa61c07f7c5332a (diff)
downloadforums-1fc26eb1d57ab2e6d49c5121414090b596ba2f8d.tar
forums-1fc26eb1d57ab2e6d49c5121414090b596ba2f8d.tar.gz
forums-1fc26eb1d57ab2e6d49c5121414090b596ba2f8d.tar.bz2
forums-1fc26eb1d57ab2e6d49c5121414090b596ba2f8d.tar.xz
forums-1fc26eb1d57ab2e6d49c5121414090b596ba2f8d.zip
[feature/ajax] Make quick-mod tools "exception" handling more explicit
PHPBB3-10270
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 3e431a0c6e..53dc8e1124 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -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);