diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index b42870f466..488b095b47 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -338,7 +338,7 @@ phpbb.ajaxify = function(options) { { action = $this.attr('action').replace('&', '&'); data = $this.serializeArray(); - method = $this.attr('method'); + method = $this.attr('method') || 'GET'; } else { @@ -347,7 +347,7 @@ phpbb.ajaxify = function(options) { method = 'GET'; } - // If filter function returns true, cancel the AJAX functionality, + // If filter function returns false, cancel the AJAX functionality, // and return true (meaning that the HTTP request will be sent normally). if (run_filter && options.filter.call(this, data)) { diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 4360dc645f..f82da9f70e 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -73,25 +73,25 @@ $('[data-ajax]').each(function() { */ phpbb.ajaxify({ selector: '#quickmodform', - filter: function(data) { + refresh: true, + filter: function (data) { var action = $('#quick-mod-select').val(); if (action === 'make_normal') { - return !($(this).find('select option[value="make_global"]').length); + return $(this).find('select option[value="make_global"]').length > 0; } else if (action === 'lock' || action === 'unlock') { - return false; + return true; } if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') { - return false; + return true; } - return true; - }, - refresh: true + return false; + } });