правка вывода в админке вторая

This commit is contained in:
2026-01-15 20:47:25 +05:00
parent 99ed8eb8a3
commit 6493a7d5c1
2 changed files with 190 additions and 156 deletions

View File

@@ -1341,37 +1341,62 @@ function commentAdminListShow($tpl_dir)
$action = $_REQUEST['admin_action'] ?? '';
$items = [];
// Собираем ID из разных источников для универсальности
if (!empty($_REQUEST['ids'])) {
// Если пришли ID через запятую (массово)
$items = explode(',', $_REQUEST['ids']);
} elseif (!empty($_REQUEST['id'])) {
// Если пришел один ID (иконка)
$items = (is_array($_REQUEST['id'])) ? $_REQUEST['id'] : [$_REQUEST['id']];
}
if (!empty($action) && !empty($items)) {
$ids = array_map('intval', $items);
$id_list = implode(',', $ids);
// --- СОБИРАЕМ ВСЕ ID ПОТОМКОВ (ЛЮБАЯ ГЛУБИНА) ---
$all_ids_to_process = $ids;
$current_parents = $ids;
while (!empty($current_parents)) {
$parent_list = implode(',', $current_parents);
// Получаем результат запроса
$res = $AVE_DB->Query("SELECT Id FROM " . PREFIX . "_module_comment_info WHERE parent_id IN ($parent_list)");
$found_children = [];
// Перебираем результат построчно через стандартный FetchAssocArray
if ($res) {
while ($row_child = $res->FetchAssocArray()) {
$found_children[] = (int)$row_child['Id'];
}
}
if (!empty($found_children)) {
$all_ids_to_process = array_merge($all_ids_to_process, $found_children);
$current_parents = $found_children;
} else {
$current_parents = [];
}
}
$all_ids_to_process = array_unique($all_ids_to_process);
$final_id_list = implode(',', $all_ids_to_process);
// ------------------------------------------------
switch ($action) {
case 'approve':
case 'set_status_1':
$AVE_DB->Query("UPDATE " . PREFIX . "_module_comment_info SET comment_status = '1' WHERE Id IN ($id_list)");
$AVE_DB->Query("UPDATE " . PREFIX . "_module_comment_info SET comment_status = '1' WHERE Id IN ($final_id_list)");
break;
case 'unapprove':
case 'set_status_0':
$AVE_DB->Query("UPDATE " . PREFIX . "_module_comment_info SET comment_status = '0' WHERE Id IN ($id_list)");
$AVE_DB->Query("UPDATE " . PREFIX . "_module_comment_info SET comment_status = '0' WHERE Id IN ($final_id_list)");
break;
case 'delete':
$AVE_DB->Query("DELETE FROM " . PREFIX . "_module_comment_info WHERE Id IN ($id_list)");
$AVE_DB->Query("DELETE FROM " . PREFIX . "_module_comment_info WHERE Id IN ($final_id_list)");
break;
}
header("Location: index.php?do=modules&action=modedit&mod=comment&moduleaction=1&cp=" . $session_id);
exit;
}
// --- ОРИГИНАЛЬНАЯ ЛОГИКА ВЫВОДА ---
// --- ЛОГИКА ВЫВОДА (С ПАГИНАЦИЕЙ) ---
$num = $AVE_DB->Query("SELECT COUNT(*) FROM " . PREFIX . "_module_comment_info")->GetCell();
$limit = $this->_limit;
$seiten = ceil($num / $limit);
@@ -1385,7 +1410,7 @@ function commentAdminListShow($tpl_dir)
LIMIT " . (int)$start . "," . (int)$limit
);
$docs = array();
$all_items = array();
$format = "%d %B %Y, %H:%M";
while ($row = $sql->FetchAssocArray()) {
@@ -1400,36 +1425,25 @@ function commentAdminListShow($tpl_dir)
$row['avatar_color_index'] = (abs(crc32($name)) % 12) + 1;
}
// --- ОБРАБОТКА ФАЙЛОВ ДЛЯ АДМИНКИ ---
$row['images'] = [];
$row['files'] = [];
if (!empty($row['comment_file'])) {
$img_exts = ['jpg', 'jpeg', 'png', 'gif', 'webp'];
$all_files = explode(',', $row['comment_file']);
foreach ($all_files as $f_name) {
$f_name = trim($f_name);
if (!$f_name) continue;
$ext = strtolower(pathinfo($f_name, PATHINFO_EXTENSION));
// Чистим имя (убираем временную метку _12345678)
$clean_name = preg_replace('/_[0-9]+(?=\.[a-z0-9]+$)/i', '', $f_name);
$file_data = [
'orig_name' => $f_name,
'clean_name' => $clean_name,
'ext' => $ext
];
if (in_array($ext, $img_exts)) {
$row['images'][] = $file_data;
} else {
$row['files'][] = $file_data;
// ОБРАБОТКА ФАЙЛОВ
$row['images'] = [];
$row['files'] = [];
if (!empty($row['comment_file'])) {
$img_exts = ['jpg', 'jpeg', 'png', 'gif', 'webp'];
$all_files = explode(',', $row['comment_file']);
foreach ($all_files as $f_name) {
$f_name = trim($f_name);
if (!$f_name) continue;
$ext = strtolower(pathinfo($f_name, PATHINFO_EXTENSION));
$clean_name = preg_replace('/_[0-9]+(?=\.[a-z0-9]+$)/i', '', $f_name);
$file_data = ['orig_name' => $f_name, 'clean_name' => $clean_name, 'ext' => $ext];
if (in_array($ext, $img_exts)) {
$row['images'][] = $file_data;
} else {
$row['files'][] = $file_data;
}
}
}
}
// ------------------------------------
$row['CId'] = $row['Id'];
$row['comment_text'] = stripslashes($row['comment_text']);
@@ -1443,7 +1457,47 @@ function commentAdminListShow($tpl_dir)
$row['r_count'] = (int)($row['rating_count'] ?? 0);
$row['star_public'] = ($row['r_count'] > 0) ? round($row['rating_sum'] / $row['r_count']) : 0;
$docs[] = $row;
$all_items[$row['Id']] = $row;
}
// --- ПОСТРОЕНИЕ ДЕРЕВА ---
$child_map = [];
foreach ($all_items as $id => $item) {
$p_id = (int)$item['parent_id'];
if ($p_id > 0) $child_map[$p_id][] = $id;
}
$docs = [];
$processed = [];
$buildTree = function($parent_id, $level) use (&$buildTree, &$docs, &$processed, &$all_items, &$child_map) {
if (isset($child_map[$parent_id])) {
foreach ($child_map[$parent_id] as $child_id) {
if (!in_array($child_id, $processed)) {
$item = $all_items[$child_id];
$item['depth_level'] = $level;
$docs[] = $item;
$processed[] = $child_id;
$buildTree($child_id, $level + 1);
}
}
}
};
foreach ($all_items as $id => $item) {
if ($item['parent_id'] == 0 && !in_array($id, $processed)) {
$item['depth_level'] = 0;
$docs[] = $item;
$processed[] = $id;
$buildTree($id, 1);
}
}
foreach ($all_items as $id => $item) {
if (!in_array($id, $processed)) {
$item['depth_level'] = 0;
$docs[] = $item;
}
}
$AVE_Template->assign([

View File

@@ -1,69 +1,73 @@
<style>
.tableStatic tbody td { vertical-align: middle !important; padding: 10px 8px !important; font-size: 12px; }
.author-data-container { display: flex; flex-direction: column; gap: 2px; }
.author-info-row { display: flex; align-items: center; margin-bottom: 2px; }
.admin-avatar-box { width: 28px; height: 28px; flex-shrink: 0; margin-right: 8px; }
.admin-avatar-box img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.mod_comment_avatar_letter { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; font-size: 12px; text-transform: uppercase; }
/* Глобальный шрифт 13px */
.tableStatic, .tableStatic tbody td, .author-data-container,
.meta-sub-text, .comment-scroll-box, .cell-top-bar a,
.cell-top-bar span, .asset-name, #mass_action_select{
font-size: 13px !important;
}
.blueBtn {
font-size: 11px !important;
padding: 2px 10px !important; /* Уменьшаем вертикальный отступ */
height: 28px !important; /* Фиксируем высоту, чтобы она не прыгала */
line-height: 24px !important; /* Центрируем текст по вертикали */
cursor: pointer;
}
/* Верстка таблицы */
.tableStatic tbody td { vertical-align: top !important; padding: 8px 10px !important; }
/* КОЛОНКА АВТОРА */
.author-column { width: 240px !important; min-width: 240px; position: relative; }
.author-data-container { display: flex; flex-direction: column; gap: 8px; }
.author-info-row { display: flex; align-items: center; gap: 12px; }
/* АВАТАР */
.admin-avatar-box { width: 45px; height: 45px; flex-shrink: 0; }
.admin-avatar-box img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.mod_comment_avatar_letter { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; text-transform: uppercase; font-size: 18px !important; }
/* Цвета для букв аватара */
.av-c1 { background-color: #6c5ce7; } .av-c2 { background-color: #2ecc71; }
.av-c3 { background-color: #e67e22; } .av-c4 { background-color: #e91e63; }
.av-c5 { background-color: #00cec9; } .av-c6 { background-color: #0984e3; }
.av-c7 { background-color: #d63031; } .av-c8 { background-color: #636e72; }
.av-c9 { background-color: #fdcb6e; } .av-c10 { background-color: #fd79a8; }
.av-c11 { background-color: #a29bfe; } .av-c12 { background-color: #273c75; }
.meta-sub-text { font-size: 10px; color: #888; line-height: 1.4; }
.meta-ip { color: #aaa; font-style: normal; }
.meta-edit { color: #d35400; font-weight: bold; }
.comment-scroll-box { max-height: 90px; overflow-y: auto; font-size: 13px; line-height: 1.5; color: #333; padding-right: 10px; scrollbar-width: thin; margin-bottom: 8px; }
.comment-scroll-box::-webkit-scrollbar { width: 4px; }
.comment-scroll-box::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.star-yellow { color: #FFB400; font-size: 13px; }
.star-grey { color: #eee; }
.star-public-filled { color: #FFD700; }
.cell-layout { display: flex; flex-direction: column; gap: 5px; min-height: 100px; justify-content: space-between; }
.cell-top-bar { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; border-bottom: 1px dashed #eee; padding-bottom: 4px; }
.cell-bottom-bar { display: flex; align-items: center; gap: 8px; margin-top: 5px; border-top: 1px solid #f9f9f9; padding-top: 4px; }
/* ЗВЕЗДЫ РЕЙТИНГА АВТОРА (Screenshot_13) */
.author-stars { color: #ff9800; font-size: 16px; letter-spacing: 0px; margin: 2px 0; line-height: 1; }
.star-grey { color: #ccc !important; }
/* Мета-данные */
.meta-sub-text { color: #666; line-height: 1.6; }
.meta-ip { color: #999; }
.meta-edit { color: #d35400; font-weight: bold; background: #fff5e6; padding: 0 4px; border-radius: 3px; display: inline-block; }
/* ПРЕВЬЮ В ТАБЛИЦЕ */
.comment-assets-inline { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; padding: 5px 0; }
.asset-item { width: 80px; flex: 0 0 80px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.asset-thumb { width: 80px; height: 60px; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; background: #fafafa; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-name { font-size: 11px; color: #444; font-weight: 500; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; display: block; }
/* Контент комментария */
.comment-scroll-box { max-height: 200px; overflow-y: auto; line-height: 1.6; color: #333; margin: 10px 0; padding-right: 10px; }
/* ФИКС ДЛЯ ОГРОМНЫХ ФОТО В FANCYBOX */
.fancybox-can-zoom_in .fancybox-content { cursor: pointer; }
.fancybox-image, .fancybox-spaceball { max-width: 90vw !important; max-height: 85vh !important; margin: auto; }
/* 1. Ограничиваем контентную область */
#fancybox-content {
max-width: 950px !important;
max-height: 750px !important;
width: auto !important;
height: auto !important;
}
/* Зебра и Hover */
.row-odd { background-color: #ffffff !important; }
.row-even { background-color: #f1f6fa !important; }
.row-hidden { background-color: #fff4f4 !important; }
.tableStatic tbody tr:hover td { background-color: #edf3f7 !important; transition: background 0.1s ease; }
/* 2. Картинка внутри должна слушаться контейнера */
#fancybox-img {
max-width: 100% !important;
max-height: 100% !important;
width: auto !important;
height: auto !important;
object-fit: contain; /* Сохраняет пропорции без искажений */
}
/* 3. Ограничиваем внешнюю рамку, чтобы она не улетала за экран */
#fancybox-wrap {
max-width: 970px !important;
width: auto !important;
}
/*сдвинуть кнопки показать/скрыть редакт и удаление в самое право */
.cell-top-bar > div:last-child {
margin-left: auto !important;
}
/* Линия вложенности (Screenshot_14) */
.reply-wrapper { border-left: 3px solid #3498db; padding-left: 15px; position: relative; }
/* Панели */
.cell-top-bar { display: flex; align-items: center; gap: 12px; border-bottom: 1px dashed #ddd; padding-bottom: 8px; }
.cell-top-bar > div:last-child { margin-left: auto !important; }
.public-rating-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; border-top: 1px solid #f0f0f0; padding-top: 8px; }
.star-public { color: #FFD700; font-size: 14px; }
/* Файлы */
.comment-assets-inline { display: flex; flex-wrap: wrap; gap: 15px; margin: 12px 0; }
.asset-item { width: 90px; text-align: center; }
.asset-thumb { width: 90px; height: 70px; border: 1px solid #ccc; border-radius: 5px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-name { display: block; width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 12px !important; color: #555; margin-top: 4px; }
</style>
<div class="title"><h5>{#COMMENT_MODULE_NAME#} (Всего: {$docs|count})</h5></div>
@@ -77,30 +81,31 @@
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
<thead>
<tr>
<td width="30"><input type="checkbox" id="selectAll" onclick="checkAll(this)" /></td>
<td width="40">ID</td>
<td width="175">Данные Автора</td>
<td width="40"><input type="checkbox" id="selectAll" onclick="checkAll(this)" /></td>
<td width="50">ID</td>
<td class="author-column">Данные Автора</td>
<td>Текст комментария и файлы</td>
</tr>
</thead>
<tbody>
{if $docs}
{foreach from=$docs item=row}
<tr {if $row.comment_status == "0"}style="background-color: #fff4f4;"{/if}>
{foreach from=$docs item=row name=zebraloop}
<tr class="{if $row.comment_status == '0'}row-hidden{elseif $smarty.foreach.zebraloop.iteration % 2 == 0}row-even{else}row-odd{/if}">
<td align="center"><input class="row-checkbox" type="checkbox" value="{$row.CId}" /></td>
<td align="center"><strong>{$row.CId}</strong></td>
<td>
<div class="author-data-container">
<td class="author-column">
<div class="author-data-container" style="margin-left: {$row.depth_level * 25}px;">
<div class="author-info-row">
<div class="admin-avatar-box">
{if $row.avatar}<img src="{$row.avatar}">{else}
<div class="mod_comment_avatar_letter av-c{$row.avatar_color_index}">{$row.first_letter}</div>{/if}
</div>
<span style="font-weight:bold; font-size:12px; color:#2c3e50;">{$row.comment_author_name|escape}</span>
<span style="font-weight:bold; color:#2c3e50;">{$row.comment_author_name|escape}</span>
</div>
<div class="meta-sub-text">
<div class="star-yellow">
{section name=s start=1 loop=6}{if $smarty.section.s.index <= $row.user_rating}{else}<span class="star-grey"></span>{/if}{/section}
<div class="author-stars">
{section name=s start=1 loop=6}{if $smarty.section.s.index <= $row.user_rating}{else}<span class="star-grey"></span>{/if}{/section}
</div>
<div>📅 {$row.date_pub}</div>
{if $row.date_edit}<div class="meta-edit">📝 ред. {$row.date_edit}</div>{/if}
@@ -108,15 +113,20 @@
</div>
</div>
</td>
<td>
<div class="cell-layout">
<div class="{if $row.depth_level > 0}reply-wrapper{/if}" style="margin-left: {$row.depth_level * 25}px;">
<div class="cell-top-bar">
<a href="{$ABS_PATH}index.php?id={$row.document_id}" target="_blank" style="color:#2980b9; font-weight:bold; text-decoration:underline; font-size: 11px;">
{$row.document_title|default:"Документ"|truncate:25}
{if $row.parent_id > 0}
<span style="background:#e1f5fe; color:#0288d1; padding:2px 8px; border-radius:3px; font-weight:bold; font-size: 10px !important;">ОТВЕТ НА #{$row.parent_id}</span>
{/if}
<a href="{$ABS_PATH}index.php?id={$row.document_id}" target="_blank" style="color:#2980b9; font-weight:bold; text-decoration:underline;">
{$row.document_title|default:"Документ"|truncate:35}
</a>
<a href="{$ABS_PATH}index.php?id={$row.document_id}#comment-{$row.CId}" target="_blank" style="color:#27ae60; font-weight:bold; font-size:11px;">[#] к отзыву</a>
<div style="display: flex; gap: 6px; align-items: center; border-left: 1px solid #ddd; padding-left: 8px; margin-left: 5px;">
<span style="font-size:10px; font-weight:bold; color:{if $row.comment_status=='1'}#27ae60{else}#e74c3c{/if};">
<a href="{$ABS_PATH}index.php?id={$row.document_id}#comment-{$row.CId}" target="_blank" style="color:#27ae60; font-weight:bold;">[#] Посмотреть</a>
<div style="display: flex; gap: 8px; align-items: center; border-left: 1px solid #ddd; padding-left: 10px;">
<span style="font-weight:bold; color:{if $row.comment_status=='1'}#27ae60{else}#e74c3c{/if};">
{if $row.comment_status=='1'}Одобрен{else}Скрыт{/if}
</span>
{if $row.comment_status == '1'}
@@ -125,7 +135,7 @@
<a class="icon_sprite ico_unlock" title="Одобрить" href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=set_status_1&id={$row.CId}&cp={$sess}"></a>
{/if}
<a class="icon_sprite ico_edit" title="Редактировать" href="javascript:void(0);" onClick="windowOpen('index.php?do=modules&action=modedit&mod=comment&moduleaction=admin_edit&pop=1&docid={$row.document_id}&Id={$row.CId}','700','700','1');"></a>
<a class="icon_sprite ico_delete ConfirmDelete" title="Удалить" name="Вы уверены что хотите удалить комментарий?" dir="Подтверждение удаления" href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=delete&id={$row.CId}&cp={$sess}"></a>
<a class="icon_sprite ico_delete ConfirmDelete" title="Удалить" href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=delete&id={$row.CId}&cp={$sess}"></a>
</div>
</div>
@@ -136,30 +146,29 @@
{foreach from=$row.images item=img}
<div class="asset-item">
<div class="asset-thumb">
<a href="{$ABS_PATH}uploads/comments/{$img.orig_name}" class="view fancy" rel="gallery-{$row.CId}" title="{$img.clean_name}">
<a href="{$ABS_PATH}uploads/comments/{$img.orig_name}" class="view fancy" rel="gallery-{$row.CId}">
<img src="{$ABS_PATH}uploads/comments/{$img.orig_name}" />
</a>
</div>
<span class="asset-name" title="{$img.clean_name}">{$img.clean_name}</span>
<span class="asset-name" title="{$img.clean_name}">{$img.clean_name|truncate:15:"...":true}</span>
</div>
{/foreach}
{foreach from=$row.files item=f}
<div class="asset-item">
<a href="{$ABS_PATH}uploads/comments/{$f.orig_name}" target="_blank" class="asset-thumb" style="text-decoration: none; color: #333; flex-direction: column; background: #fcfcfc;">
<span style="font-size: 11px; font-weight: bold; color: #2980b9; margin-bottom: 2px;">{$f.ext|upper}</span>
<i class="icon_sprite ico_download"></i>
<a href="{$ABS_PATH}uploads/comments/{$f.orig_name}" target="_blank" class="asset-thumb" style="flex-direction: column; text-decoration:none; background:#f9f9f9;">
<span style="font-weight: bold; color: #2980b9;">{$f.ext|upper}</span>
</a>
<span class="asset-name" title="{$f.clean_name}">{$f.clean_name}</span>
<span class="asset-name" title="{$f.clean_name}">{$f.clean_name|truncate:15:"...":true}</span>
</div>
{/foreach}
</div>
{/if}
<div class="cell-bottom-bar">
<div class="star-yellow">
{section name=s start=1 loop=6}{if $smarty.section.s.index <= $row.star_public}<span class="star-public-filled">★</span>{else}<span class="star-grey">☆</span>{/if}{/section}
<div class="public-rating-row">
<div class="star-public">
{section name=s start=1 loop=6}{if $smarty.section.s.index <= $row.star_public}{else}<span class="star-grey">☆</span>{/if}{/section}
</div>
<span style="font-size:11px; color:#999;">(Голосов: {$row.r_count|default:0})</span>
<span style="color:#999;">(Голосов: {$row.r_count|default:0})</span>
</div>
</div>
</td>
@@ -173,7 +182,7 @@
<div class="tfoot">
<div class="left" style="padding:15px;">
<select id="mass_action_select" style="padding:5px; border:1px solid #ccc; border-radius:3px;">
<select id="mass_action_select" style="padding:5px;">
<option value="">Выберите действие...</option>
<option value="set_status_1">Опубликовать</option>
<option value="set_status_0">Скрыть</option>
@@ -186,49 +195,20 @@
</div>
<script type="text/javascript">
// Функция выделения всех чекбоксов (то, что пропало)
function checkAll(master) {
var checkboxes = document.getElementsByClassName('row-checkbox');
for (var i = 0; i < checkboxes.length; i++) {
checkboxes[i].checked = master.checked;
}
for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = master.checked; }
}
// Функция массовых действий с красивыми окнами
function runMassAction() {
var action = document.getElementById('mass_action_select').value;
// Если действие не выбрано
if (!action) {
jAlert('Выберите действие из списка!', 'Внимание');
return;
}
if (!action) { jAlert('Выберите действие!', 'Внимание'); return; }
var checkboxes = document.getElementsByClassName('row-checkbox');
var ids = [];
// Собираем ID отмеченных строк
for (var i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].checked) {
ids.push(checkboxes[i].value);
}
}
// Если ничего не выбрано
if (ids.length === 0) {
jAlert('Вы не выбрали ни одного комментария для обработки!', 'Ошибка');
return;
}
for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) ids.push(checkboxes[i].value); }
if (ids.length === 0) { jAlert('Ничего не выбрано!', 'Ошибка'); return; }
var url = 'index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=' + action + '&ids=' + ids.join(',') + '&cp={$sess}';
// Подтверждение для удаления, остальное сразу
if (action === 'delete') {
jConfirm('Вы уверены, что хотите удалить выбранные элементы (' + ids.length + ' шт.)?', 'Подтверждение удаления', function(r) {
if(r) window.location.href = url;
});
} else {
window.location.href = url;
}
jConfirm('Удалить выбранные элементы?', 'Подтверждение', function(r) { if(r) window.location.href = url; });
} else { window.location.href = url; }
}
</script>