1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

[ticket/12013] Use new dropdown for quickmod tools and jumpbox.

PHPBB3-12013
This commit is contained in:
Cesar G
2013-11-09 22:06:20 -08:00
parent c1627ef52e
commit 90a8c7e29a
6 changed files with 53 additions and 65 deletions

View File

@@ -356,37 +356,6 @@ $('.display_post').click(function(e) {
$('#post_hidden' + post_id).hide();
});
/**
* This AJAXifies the quick-mod tools. The reason it cannot be a standard
* callback / data attribute is that it requires filtering - some of the options
* can be ajaxified, while others cannot.
*/
phpbb.ajaxify({
selector: '#quickmodform',
refresh: true,
filter: function (data) {
var action = $('#quick-mod-select').val();
if (action === 'make_normal') {
return $(this).find('select option[value="make_global"]').length > 0;
} else if (action === 'lock' || action === 'unlock') {
return true;
}
if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') {
return true;
}
return false;
}
});
$('#quick-mod-select').change(function () {
$('#quickmodform').submit();
});
$('#delete_permanent').click(function () {
if ($(this).prop('checked')) {
$('#delete_reason').hide();