diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-11-14 15:55:51 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-11-14 15:55:51 +0100 |
commit | a9ed479e148fe801df6c928a34d84438d9b68cf2 (patch) | |
tree | f1ec9a3cb8fc4774fd85af187f6ac30bcd41df60 /phpBB/includes/acp/acp_groups.php | |
parent | 79eea0ccac1bc6dd5d39b4d47e973ef522cf7781 (diff) | |
download | forums-a9ed479e148fe801df6c928a34d84438d9b68cf2.tar forums-a9ed479e148fe801df6c928a34d84438d9b68cf2.tar.gz forums-a9ed479e148fe801df6c928a34d84438d9b68cf2.tar.bz2 forums-a9ed479e148fe801df6c928a34d84438d9b68cf2.tar.xz forums-a9ed479e148fe801df6c928a34d84438d9b68cf2.zip |
[ticket/10411] Use AJAX to move items up/down and delete them
PHPBB3-10411
Diffstat (limited to 'phpBB/includes/acp/acp_groups.php')
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index e0ce456a62..d696b99680 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -899,6 +899,12 @@ class acp_groups } } + if (($action == 'move_up' || $action == 'move_down') && $request->is_ajax()) + { + $json_response = new phpbb_json_response; + $json_response->send(array('success' => true)); + } + $sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend FROM ' . GROUPS_TABLE . ' ORDER BY group_legend ASC, group_type DESC, group_name ASC'; @@ -911,13 +917,13 @@ class acp_groups if ($row['group_legend']) { $template->assign_block_vars('legend', array( - 'GROUP_NAME' => $group_name, - 'GROUP_COLOUR' => ($row['group_colour']) ? ' style="color: #' . $row['group_colour'] . '"' : '', - 'GROUP_TYPE' => $user->lang[phpbb_groupposition_legend::group_type_language($row['group_type'])], + 'GROUP_NAME' => $group_name, + 'GROUP_COLOUR' => ($row['group_colour']) ? ' style="color: #' . $row['group_colour'] . '"' : '', + 'GROUP_TYPE' => $user->lang[phpbb_groupposition_legend::group_type_language($row['group_type'])], - 'U_MOVE_DOWN' => "{$this->u_action}&field=legend&action=move_down&g=" . $row['group_id'], - 'U_MOVE_UP' => "{$this->u_action}&field=legend&action=move_up&g=" . $row['group_id'], - 'U_DELETE' => "{$this->u_action}&field=legend&action=delete&g=" . $row['group_id'], + 'U_MOVE_DOWN' => "{$this->u_action}&field=legend&action=move_down&g=" . $row['group_id'], + 'U_MOVE_UP' => "{$this->u_action}&field=legend&action=move_up&g=" . $row['group_id'], + 'U_DELETE' => "{$this->u_action}&field=legend&action=delete&g=" . $row['group_id'], )); } else |