mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10271] AJAXified various deletions in the ACP.
The following places have had deletion AJAXified: * Smilies and icons * Word censors * BBCodes * Attachment groups * Groups * Admin / User / Moderator / Forum roles * Report / denial reasons * Module management * Custom profile fields PHPBB3-10271
This commit is contained in:
parent
7a933bdb5a
commit
11112314f7
15 changed files with 53 additions and 13 deletions
|
@ -248,7 +248,7 @@
|
||||||
<!-- ELSE --><br /><span>» {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF -->
|
<!-- ELSE --><br /><span>» {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF -->
|
||||||
</td>
|
</td>
|
||||||
<td>{groups.CATEGORY}</td>
|
<td>{groups.CATEGORY}</td>
|
||||||
<td align="center" valign="middle" style="white-space: nowrap;"> <a href="{groups.U_EDIT}">{ICON_EDIT}</a> <a href="{groups.U_DELETE}">{ICON_DELETE}</a> </td>
|
<td align="center" valign="middle" style="white-space: nowrap;"> <a href="{groups.U_EDIT}">{ICON_EDIT}</a> <a href="{groups.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END groups -->
|
<!-- END groups -->
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
<!-- BEGIN bbcodes -->
|
<!-- BEGIN bbcodes -->
|
||||||
<!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
<!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
|
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
|
||||||
<td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
|
<td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- BEGINELSE -->
|
<!-- BEGINELSE -->
|
||||||
<tr class="row3">
|
<tr class="row3">
|
||||||
|
|
|
@ -350,7 +350,7 @@
|
||||||
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
|
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
|
||||||
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
|
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
|
||||||
<td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
|
<td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
|
||||||
<td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
|
<td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- END groups -->
|
<!-- END groups -->
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
<td style="text-align: right; white-space: nowrap;">
|
<td style="text-align: right; white-space: nowrap;">
|
||||||
<!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
<!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
||||||
<!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
<!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
||||||
<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
|
<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- BEGINELSE -->
|
<!-- BEGINELSE -->
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
{ICON_MOVE_DOWN_DISABLED}
|
{ICON_MOVE_DOWN_DISABLED}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
|
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
|
||||||
<a href="{modules.U_DELETE}">{ICON_DELETE}</a>
|
<a href="{modules.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END modules -->
|
<!-- END modules -->
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
{ICON_MOVE_DOWN_DISABLED}
|
{ICON_MOVE_DOWN_DISABLED}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
|
<a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
|
||||||
<a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a>
|
<a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}" data-ajax="row_delete">{ICON_DELETE}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END roles -->
|
<!-- END roles -->
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
|
|
||||||
<td>{fields.FIELD_IDENT}</td>
|
<td>{fields.FIELD_IDENT}</td>
|
||||||
<td>{fields.FIELD_TYPE}</td>
|
<td>{fields.FIELD_TYPE}</td>
|
||||||
<td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
|
<td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}" data-ajax="style_act_deact">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
|
||||||
|
|
||||||
<td style="width: 80px; text-align: right; white-space: nowrap;">
|
<td style="width: 80px; text-align: right; white-space: nowrap;">
|
||||||
<!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
|
<!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
{ICON_EDIT_DISABLED}
|
{ICON_EDIT_DISABLED}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<a href="{fields.U_DELETE}">{ICON_DELETE}</a>
|
<a href="{fields.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE --> - <!-- ENDIF --></td>
|
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE --> - <!-- ENDIF --></td>
|
||||||
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
|
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
|
||||||
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK --> - <!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
|
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK --> - <!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
|
||||||
<td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}">{ICON_DELETE}</a></td>
|
<td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END ranks -->
|
<!-- END ranks -->
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
|
<a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
|
||||||
<!-- IF reasons.U_DELETE -->
|
<!-- IF reasons.U_DELETE -->
|
||||||
<a href="{reasons.U_DELETE}">{ICON_DELETE}</a>
|
<a href="{reasons.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
{ICON_DELETE_DISABLED}
|
{ICON_DELETE_DISABLED}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
<!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
<td style="text-align: center;">{words.WORD}</td>
|
<td style="text-align: center;">{words.WORD}</td>
|
||||||
<td style="text-align: center;">{words.REPLACEMENT}</td>
|
<td style="text-align: center;">{words.REPLACEMENT}</td>
|
||||||
<td> <a href="{words.U_EDIT}">{ICON_EDIT}</a> <a href="{words.U_DELETE}">{ICON_DELETE}</a> </td>
|
<td> <a href="{words.U_EDIT}">{ICON_EDIT}</a> <a href="{words.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- BEGINELSE -->
|
<!-- BEGINELSE -->
|
||||||
<tr class="row3">
|
<tr class="row3">
|
||||||
|
|
|
@ -24,7 +24,7 @@ class acp_bbcodes
|
||||||
|
|
||||||
function main($id, $mode)
|
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;
|
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
@ -272,6 +272,18 @@ class acp_bbcodes
|
||||||
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||||
$cache->destroy('sql', BBCODES_TABLE);
|
$cache->destroy('sql', BBCODES_TABLE);
|
||||||
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
|
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
|
||||||
|
|
||||||
|
if ($request->is_ajax())
|
||||||
|
{
|
||||||
|
$json_response = new phpbb_json_response;
|
||||||
|
$json_response->send(array(
|
||||||
|
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||||
|
'MESSAGE_TEXT' => $user->lang['BBCODE_DELETED'],
|
||||||
|
'REFRESH_DATA' => array(
|
||||||
|
'time' => 3
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -782,6 +782,18 @@ class acp_icons
|
||||||
|
|
||||||
$cache->destroy('_icons');
|
$cache->destroy('_icons');
|
||||||
$cache->destroy('sql', $table);
|
$cache->destroy('sql', $table);
|
||||||
|
|
||||||
|
if ($request->is_ajax())
|
||||||
|
{
|
||||||
|
$json_response = new phpbb_json_response;
|
||||||
|
$json_response->send(array(
|
||||||
|
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||||
|
'MESSAGE_TEXT' => $notice,
|
||||||
|
'REFRESH_DATA' => array(
|
||||||
|
'time' => 3
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@ class acp_ranks
|
||||||
|
|
||||||
function main($id, $mode)
|
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;
|
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
@ -122,6 +122,18 @@ class acp_ranks
|
||||||
$cache->destroy('_ranks');
|
$cache->destroy('_ranks');
|
||||||
|
|
||||||
add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
|
add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
|
||||||
|
|
||||||
|
if ($request->is_ajax())
|
||||||
|
{
|
||||||
|
$json_response = new phpbb_json_response;
|
||||||
|
$json_response->send(array(
|
||||||
|
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||||
|
'MESSAGE_TEXT' => $user->lang['RANK_REMOVED'],
|
||||||
|
'REFRESH_DATA' => array(
|
||||||
|
'time' => 3
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,6 +45,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'BBCODE_ADDED' => 'BBCode added successfully.',
|
'BBCODE_ADDED' => 'BBCode added successfully.',
|
||||||
'BBCODE_EDITED' => 'BBCode edited successfully.',
|
'BBCODE_EDITED' => 'BBCode edited successfully.',
|
||||||
|
'BBCODE_DELETED' => 'The BBCode has been removed successfully.',
|
||||||
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.',
|
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.',
|
||||||
'BBCODE_HELPLINE' => 'Help line',
|
'BBCODE_HELPLINE' => 'Help line',
|
||||||
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
|
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
|
||||||
|
|
|
@ -363,6 +363,9 @@ phpbb.add_ajax_callback('post_delete', function(el) {
|
||||||
tr.next().find('.up').html('<a href="' + tr.data('up') + '"><img src="./images/icon_up.gif" alt="Move up" title="Move up" /></a>');
|
tr.next().find('.up').html('<a href="' + tr.data('up') + '"><img src="./images/icon_up.gif" alt="Move up" title="Move up" /></a>');
|
||||||
phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up');
|
phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up');
|
||||||
}
|
}
|
||||||
|
}).add_ajax_callback('row_delete', function(el) {
|
||||||
|
var tr = $(el).parents('tr');
|
||||||
|
tr.remove();
|
||||||
}).add_ajax_callback('zebra', function(el, res) {
|
}).add_ajax_callback('zebra', function(el, res) {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
$('.zebra').html(res.MESSAGE_TEXT);
|
$('.zebra').html(res.MESSAGE_TEXT);
|
||||||
|
|
Loading…
Add table
Reference in a new issue