diff options
| author | Callum Macrae <callum@lynxphp.com> | 2011-08-24 15:45:51 +0100 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2012-03-31 02:09:15 +0200 |
| commit | 1cb3b595ec70730429a9c8654b248fc6d50cf1b3 (patch) | |
| tree | 505b6171c128ad99b206182164406cced10b5ad6 /phpBB/includes/acp | |
| parent | 11112314f757f4a6c65852817fba0f1a2f4526d2 (diff) | |
| download | forums-1cb3b595ec70730429a9c8654b248fc6d50cf1b3.tar forums-1cb3b595ec70730429a9c8654b248fc6d50cf1b3.tar.gz forums-1cb3b595ec70730429a9c8654b248fc6d50cf1b3.tar.bz2 forums-1cb3b595ec70730429a9c8654b248fc6d50cf1b3.tar.xz forums-1cb3b595ec70730429a9c8654b248fc6d50cf1b3.zip | |
[ticket/10271] AJAXified the styles tab in the ACP.
PHPBB3-10271
Diffstat (limited to 'phpBB/includes/acp')
| -rw-r--r-- | phpBB/includes/acp/acp_styles.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 7b449d3b35..a241dd3d10 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -28,7 +28,7 @@ class acp_styles function main($id, $mode) { - global $db, $user, $auth, $template, $cache; + global $db, $user, $auth, $template, $cache, $request; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; // Hardcoded template bitfield to add for new templates @@ -185,6 +185,18 @@ inherit_from = {INHERIT_FROM} WHERE forum_style = ' . $style_id; $db->sql_query($sql); } + if ($request->is_ajax()) + { + $json_response = new phpbb_json_response; + $json_response->send(array( + 'text' => $user->lang['STYLE_' . (($action == 'activate') ? 'DE' : '') . 'ACTIVATE'], + 'MESSAGE_TITLE' => $user->lang['INFORMATION'], + 'MESSAGE_TEXT' => $user->lang['STYLE_' . strtoupper($action) . 'D'], + 'REFRESH_DATA' => array( + 'time' => 3 + ) + )); + } } else if ($action == 'deactivate') { @@ -335,7 +347,8 @@ inherit_from = {INHERIT_FROM} $s_actions = array(); foreach ($actions as $option) { - $s_actions[] = '<a href="' . $this->u_action . "&action=$option&id=" . $row[$mode . '_id'] . '">' . $user->lang[strtoupper($option)] . '</a>'; + $data_ajax = ($option == 'refresh') ? ' data-ajax="true"' : ''; + $s_actions[] = '<a href="' . $this->u_action . "&action=$option&id=" . $row[$mode . '_id'] . '"' . $data_ajax . '>' . $user->lang[strtoupper($option)] . '</a>'; } $template->assign_block_vars('installed', array( |
