mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 08:25:42 +02:00
[ticket/10272] AJAXified the bots page in the ACP.
PHPBB3-10272
This commit is contained in:
parent
fc7cb6a70b
commit
e7e09f8da2
@ -76,9 +76,9 @@
|
|||||||
<!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
<!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
<td style="width: 50%;">{bots.BOT_NAME}</td>
|
<td style="width: 50%;">{bots.BOT_NAME}</td>
|
||||||
<td style="width: 15%; white-space: nowrap;" align="center"> {bots.LAST_VISIT} </td>
|
<td style="width: 15%; white-space: nowrap;" align="center"> {bots.LAST_VISIT} </td>
|
||||||
<td style="text-align: center;"> <a href="{bots.U_ACTIVATE_DEACTIVATE}">{bots.L_ACTIVATE_DEACTIVATE}</a> </td>
|
<td style="text-align: center;"> <a href="{bots.U_ACTIVATE_DEACTIVATE}" data-ajax="style_act_deact">{bots.L_ACTIVATE_DEACTIVATE}</a> </td>
|
||||||
<td style="text-align: center;"> <a href="{bots.U_EDIT}">{L_EDIT}</a> </td>
|
<td style="text-align: center;"> <a href="{bots.U_EDIT}">{L_EDIT}</a> </td>
|
||||||
<td style="text-align: center;"> <a href="{bots.U_DELETE}">{L_DELETE}</a> </td>
|
<td style="text-align: center;"> <a href="{bots.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a> </td>
|
||||||
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td>
|
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END bots -->
|
<!-- END bots -->
|
||||||
|
@ -24,7 +24,7 @@ class acp_bots
|
|||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $cache;
|
global $config, $db, $user, $auth, $template, $cache, $request;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||||
|
|
||||||
$action = request_var('action', '');
|
$action = request_var('action', '');
|
||||||
@ -353,6 +353,14 @@ class acp_bots
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->is_ajax() && ($action == 'activate' || $action == 'deactivate'))
|
||||||
|
{
|
||||||
|
$json_response = new phpbb_json_response;
|
||||||
|
$json_response->send(array(
|
||||||
|
'text' => $user->lang['BOT_' . (($action == 'activate') ? 'DE' : '') . 'ACTIVATE'],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
$s_options = '';
|
$s_options = '';
|
||||||
$_options = array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE');
|
$_options = array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE');
|
||||||
foreach ($_options as $value => $lang)
|
foreach ($_options as $value => $lang)
|
||||||
|
@ -228,6 +228,10 @@ phpbb.ajaxify = function(options, refresh, callback) {
|
|||||||
{
|
{
|
||||||
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dark.fadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof phpbb.ajax_callbacks[callback] === 'function')
|
if (typeof phpbb.ajax_callbacks[callback] === 'function')
|
||||||
{
|
{
|
||||||
@ -249,6 +253,10 @@ phpbb.ajaxify = function(options, refresh, callback) {
|
|||||||
{
|
{
|
||||||
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dark.fadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof phpbb.ajax_callbacks[callback] === 'function')
|
if (typeof phpbb.ajax_callbacks[callback] === 'function')
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user