@@ -1,32 +1,18 @@
<style>
/* Глобальный шрифт 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 {
.cell-top-bar span, .asset-name, #mass_action_select {
font - size : 1 3 px ! important ;
}
.blueBtn {
font - size : 1 1 px ! important ;
padding : 2 px 1 0 px ! important ; / * У м е н ь ш а е м в е р т и к а л ь н ы й о т с т у п * /
height : 2 8 px ! important ; / * Ф и к с и р у е м в ы с о т у , ч т о б ы о н а н е п р ы г а л а * /
line - height : 2 4 px ! important ; / * Ц е н т р и р у е м т е к с т п о в е р т и к а л и * /
cursor : pointer ;
}
/* Верстка таблицы */
.tableStatic tbody td { vertical - align : top ! important ; padding : 8 px 1 0 px ! important ; }
/* КОЛОНКА А В Т О Р А */
.author-column { width : 2 4 0 px ! important ; min - width : 2 4 0 px ; position : relative ; }
.author-data-container { display : flex ; flex - direction : column ; gap : 8 px ; }
.author-info-row { display : flex ; align - items : center ; gap : 1 2 px ; }
/* Компактная строка */
.tableStatic tbody td { vertical - align : middle ! important ; padding : 4 px 1 0 px ! important ; }
/* А В А Т А Р */
.admin-avatar-box { width : 4 5 px ; height : 4 5 px ; flex - shrink : 0 ; }
.admin-avatar-box img { width : 4 5 px ; height : 4 5 px ; border - radius : 5 0 % ; object - fit : cover ; border : 1 px solid # ddd ; }
.mod_comment_avatar_letter { width : 4 5 px ; height : 4 5 px ; border - radius : 5 0 % ; display : flex ; align - items : center ; justify - content : center ; font - weight : bold ; color : # fff ; text - transform : uppercase ; font - size : 1 8 px ! important ; }
.admin-avatar-box { width : 3 4 px ; height : 3 4 px ; flex - shrink : 0 ; }
.admin-avatar-box img { width : 3 4 px ; height : 3 4 px ; border - radius : 5 0 % ; object - fit : cover ; border : 1 px solid # ddd ; }
.mod_comment_avatar_letter { width : 3 4 px ; height : 3 4 px ; border - radius : 5 0 % ; display : flex ; align - items : center ; justify - content : center ; font - weight : bold ; color : # fff ; text - transform : uppercase ; font - size : 1 4 px ! important ; }
/* Цвета для букв аватара */
.av-c1 { background - color : # 6 c5ce7 ; } .av-c2 { background - color : # 2 ecc71 ; }
@@ -35,39 +21,115 @@
.av-c7 { background - color : # d63031 ; } .av-c8 { background - color : # 6 3 6 e72 ; }
.av-c9 { background - color : # fdcb6e ; } .av-c10 { background - color : # fd79a8 ; }
/* ЗВЕЗДЫ РЕЙТИНГА А В Т О Р А (Screenshot_13 ) */
.author-stars { color : # ff9800 ; font - size : 1 6 px ; letter - spacing : 0 px ; margin : 2 px 0 ; l ine - heigh t: 1 ; }
/* ЗВЕЗДЫ РЕЙТИНГА А В Т О Р А (справа от имени ) */
.author-stars { color : # ff9800 ; font - size : 1 4 px ; letter - spacing : 0 px ; display : inline - block ; marg in- lef t: 8 px ; }
.star-grey { color : # ccc ! important ; }
/* Мета-данные */
.meta-sub-text { color : # 6 6 6 ; line - height : 1.6 ; }
.meta-ip { color : # 9 9 9 ; }
.meta-edit { color : # d35400 ; font - weight : bold ; background : # fff5e6 ; padding : 0 4 px ; border - radius : 3 px ; display : inline - block ; }
/* Контент комментария */
.comment-scroll-box { max - height : 2 0 0 px ; overflow - y : auto ; line - height : 1.6 ; color : # 3 3 3 ; margin : 1 0 px 0 ; padding - right : 1 0 px ; }
/* З е б р а и Hover */
.row-odd { background - color : # ffffff ! important ; }
.row-even { background - color : # f1f6fa ! important ; }
.status-badge { font - size : 1 0 px ; padding : 1 px 4 px ; border - radius : 3 px ; font - weight : bold ; text - transform : uppercase ; border : 1 px solid ; }
.bg-del-adm { background : # ffebee ; color : # c62828 ; border - color : # ffcdd2 ; }
.bg-del-aut { background : # f5f5f5 ; color : # 7 5 7 5 7 5 ; border - color : # e0e0e0 ; font - style : italic ; }
.row-hidden { background - color : # fff4f4 ! important ; }
.tableStatic tbody tr:hover td { background - color : # edf3f7 ! important ; transition : background 0.1 s ease ; }
/* Линия вложенности (Screenshot_14) */
.reply-wrapper { border - left : 3 px solid # 3 4 9 8d b ; padding - left : 1 5 px ; position : relative ; }
/* Контейнер для веера */
.files-bundle {
display : flex ;
align - items : center ;
justify - content : center ;
height : 3 4 px ;
}
/* Панели */
.cell-top-bar { display : flex ; align - items : center ; gap : 1 2 px ; border - bottom : 1 px dashed # ddd ; padding - bottom : 8 px ; }
.cell-top-bar > div:last-child { margin - left : auto ! important ; }
.public-rating-row { display : flex ; align - items : center ; gap : 8 px ; margin - top : 1 0 px ; border - top : 1 px solid # f0f0f0 ; padding - top : 8 px ; }
.star-public { color : # FFD700 ; font - size : 1 4 px ; }
/* Базовый стиль для миниатюр в стопке */
.thumb-stack {
width : 2 8 px ;
height : 2 8 px ;
border : 2 px solid # fff ;
border - radius : 4 px ;
object - fit : cover ;
box - shadow : 0 1 px 3 px rgba ( 0 , 0 , 0 , 0.2 ) ;
margin - left : - 1 5 px ; / * Н а л о ж е н и е к а р т и н о к д р у г н а д р у г а * /
transition : all 0.2 s ease ;
cursor : pointer ;
position : relative ;
}
/* Первая картинка в стопке без отступа */
.thumb-stack:first-child { margin - left : 0 ; }
/* Эффект при наведении на конкретную картинку */
.thumb-stack:hover {
transform : scale ( 4.5 ) ;
z - index : 9 9 9 ;
margin : 0 4 0 px ; / * Р а з д в и г а е м с о с е д е й , ч т о б ы н е п е р е к р ы в а л и з у м * /
box - shadow : 0 5 px 1 5 px rgba ( 0 , 0 , 0 , 0.5 ) ;
}
/* Иконка файла в стиле стопки */
.file-stack {
width : 2 8 px ; height : 2 8 px ; background : # f8f9fa ;
display : flex ; align - items : center ; justify - content : center ;
font - size : 8 px ; font - weight : bold ; border : 2 px solid # fff ;
border - radius : 4 px ; color : # 5 5 5 ; box - shadow : 0 1 px 3 px rgba ( 0 , 0 , 0 , 0.2 ) ;
margin - left : - 1 5 px ; transition : all 0.2 s ease ;
}
.file-stack:hover { transform : scale ( 1.5 ) ; z - index : 1 0 0 ; }
/* Стиль индикатора статуса */
/* Базовый стиль кружка */
.status-dot {
width : 1 0 px ;
height : 1 0 px ;
border - radius : 5 0 % ;
display : inline - block ;
}
/* Зеленый - просто светится */
.dot-active {
background - color : # 2 ecc71 ;
box - shadow : 0 0 6 px # 2 ecc71 ;
}
/* Красный - ПУЛЬСИРУЕТ */
.dot-hidden {
background - color : # e74c3c ;
animation : pulse - red 1.5 s infinite ;
}
/* Эффект пульсации */
@keyframes pulse-red {
0 % {
transform : scale ( 0.95 ) ;
box - shadow : 0 0 0 0 rgba ( 2 3 1 , 7 6 , 6 0 , 0.7 ) ;
}
7 0 % {
transform : scale ( 1 ) ;
box - shadow : 0 0 0 1 0 px rgba ( 2 3 1 , 7 6 , 6 0 , 0 ) ;
}
1 0 0 % {
transform : scale ( 0.95 ) ;
box - shadow : 0 0 0 0 rgba ( 2 3 1 , 7 6 , 6 0 , 0 ) ;
}
}
/* Стиль для аватара удаленного пользователя */
.avatar-deleted {
background - color : # bdc3c7 ! important ; / * С е р ы й ц в е т * /
color : # fff ! important ;
font - size : 1 8 px ! important ;
}
/* Плашки для текста удаленных комментариев */
.comment-deleted-info {
display : inline - flex ;
align - items : center ;
padding : 4 px 1 0 px ;
border - radius : 4 px ;
font - size : 1 2 px ;
font - weight : 5 0 0 ;
gap : 6 px ;
}
.del-adm { background : # fff5f5 ; color : # c0392b ; border : 1 px solid # fadbd8 ; }
.del-aut { background : # f8f9fa ; color : # 7f 8 c8d ; border : 1 px solid # e5e8e8 ; font - style : italic ; }
/* Файлы */
.comment-assets-inline { display : flex ; flex - wrap : wrap ; gap : 1 5 px ; margin : 1 2 px 0 ; }
.asset-item { width : 9 0 px ; text - align : center ; }
.asset-thumb { width : 9 0 px ; height : 7 0 px ; border : 1 px solid # ccc ; border - radius : 5 px ; background : # fff ; display : flex ; align - items : center ; justify - content : center ; overflow : hidden ; }
.asset-thumb img { width : 1 0 0 % ; height : 1 0 0 % ; object - fit : cover ; }
.asset-name { display : block ; width : 9 0 px ; overflow : hidden ; text - overflow : ellipsis ; white - space : nowrap ; text - align : center ; font - size : 1 2 px ! important ; color : # 5 5 5 ; margin - top : 4 px ; }
</style>
<div class="title"><h5> { #COMMENT_MODULE_NAME# } (В с е г о : { $docs | count } )</h5></div>
@@ -81,125 +143,157 @@
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
<thead>
<tr>
<td width="4 0"><input type="checkbox" id="selectAll" onclick="checkAll(this)" /></td>
<td width="5 0">ID</td>
<td class="author-column">Данные Автора </td>
<td>Текст комментария и файлы </td>
<td width="3 0"><input type="checkbox" id="selectAll" onclick="checkAll(this)" /></td>
<td width="4 0">ID</td>
<td width="30">Статус </td>
<td width="220">Автор и Рейтинг </td>
<td width="110">IP адрес</td>
<td width="130">Дата Создания / Редактирования</td>
<td>Текст комментария</td>
<td width="100">Файлы</td>
<td width="140" align="right">Действия</td>
</tr>
</thead>
<tbody>
{ if $docs }
{ 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 } ">
{ assign var = "is_deleted" value = false }
{ if $row.comment_author_name = = '__DELETED__' | | $row.comment_author_name = = 'Удалено' } { assign var = "is_deleted" value = true } { /if }
<tr class=" { if $row.comment_status = = '0' } row-hidden deleted-row { 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 align="center">
{ if $row.comment_status = = '1' }
<span class="status-dot dot-active" title="Активен"></span>
{ else }
<span class="status-dot dot-hidden" title="Скрыт"></span>
{ /if }
</td>
<td class="author-column" >
<div class="author-data-container" style="margin-left: { $row.depth_level * 2 5 } 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; color:#2c3e50;"> { $row.comment_author_name | escape } </span>
</div>
<div class="meta-sub-text" >
<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 }
<div class="meta-ip">🌐 { $row.comment_author_ip } </div >
</div>
<td>
<div style="display: flex; align-items: center; gap: 10 px;">
<div class="admin-avatar-box ">
{ if $is_deleted }
<div class="mod_comment_avatar_letter avatar-deleted">?</div>
{ else }
{ 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 }
{ /if }
</div >
<div style="white-space: nowrap; ">
<span style="font-weight:bold; color: { if $is_deleted } #95a5a6 { else } #2c3e50 { /if } ;">
{ if $is_deleted } Пользователь удален { else } { $row.comment_author_name | escape } { /if }
</span >
{ if ! $is_deleted }
<span 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 }
</span>
{ /if }
</div>
</div>
</td>
<td align="center" style="color:#666; font-family:monospace;">
<div style="color:#999; font-size:11px; line-height:1.2; font-family:monospace;"> { $row.comment_author_ip } </div>
</td>
<td>
<div style="font-size:11px; line-height:1.2;">
<div> { $row.date_pub } </div>
{ if $row.date_edit }
<div style="color:#d35400;">ред. { $row.date_edit } </div>
{ /if }
</div>
</td>
<td>
<div class=" { if $row.depth_level > 0 } reply-wrapper { /if } " style="margin-left: { $row.depth_level * 2 5 } px;">
<div class="cell-top-bar ">
{ if $row.par ent_id > 0 }
<span style="background:#e1f5fe; color:#0288d1; padding:2px 8px; border-radius:3px; font-weight:bold; font-size: 10px !important;">О Т В Е Т Н А # { $row.par ent_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 : 3 5 }
</a>
<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 ' }
<a class="i con_sprite ico_unlock_no" title="Скрыть" href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=set_status_0&id= { $row.CId } &cp= { $sess } "></a >
<td>
<div style="display: flex; flex-direction: column; gap: 4 px;">
<div style="margin-bottom: 2px; ">
<a href="index.php?id= { $row.docum ent_id } " target="_blank" style="color:#2980b9; font-weight:bold; text-decoration:none; border-bottom: 1px solid #d1d1d1; font-size: 12px;">
{ $row.document_title | default : "Документ #`$row.docum ent_id`" }
</a>
</div >
<div style="display: flex; align-items: center; gap: 8px;">
{ if $row.parent_id > 0 }
<span style="background:#e1f5fe; color:#0288d1; padding:1px 5px; border-radius:3px; font-weight:bold; font-size: 10px !important;">Ответ на комментарий # { $row.parent_id } »</span >
{ /if }
<div class="comment-text-cell ">
{ if $row.comment_text = = '__DEL_BY_ADM__' }
<div class="comment-deleted-info del-adm">
<span style="font-size:14px;">🚫</span> Комментарий удален администратором
</div>
{ else if $row.comment_text = = '__DEL_BY_AUT__ ' }
<div class="comment-deleted-info del-aut" >
<span style="font-size:14px;">🗑️</span> Автор удалил свой комментарий
</div>
{ else }
<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=" { if $row.has_children } Удалить только этот текст (сохранить ветку) { else } Удалить физически { /if } "
href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=delete&admin_action_type=soft&id= { $row.CId } &cp= { $sess } "></a>
{ if $row.has_children }
<a class="icon_sprite ico_delete ico_delete_all ConfirmDelete"
title="УДАЛИТЬ ВСЮ В Е Т К У ФИЗИЧЕСКИ (вместе с ответами)"
href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=delete&admin_action_type=full&id= { $row.CId } &cp= { $sess } "></a>
{ $row.comment_text | strip_tags | truncate : 1 3 0 }
{ /if }
</div>
</div>
</div>
</div>
</td>
<div class="comment-scroll-box"> { $row.comment_text | nl2br } </div >
<td align="center" >
<div class="files-bundle">
{ if $row.images }
{ foreach from = $row.images item = img name = img_loop }
{ if $smarty.foreach.img_loop.iteration < 5 } { * Показываем максимум 4 превью в стопке * }
<a href=" { $ABS_PATH } uploads/comments/ { $img.orig_name } " target="_blank" style="text-decoration:none;">
<img src=" { $ABS_PATH } uploads/comments/ { $img.orig_name } " class="thumb-stack" title=" { $img.clean_name } ">
</a>
{ /if }
{ /foreach }
{ if $row.images | count > = 5 }
<span style="font-size:10px; color:#999; margin-left:5px;">+ { $row.images | count - 4 } </span>
{ /if }
{ /if }
{ if $row.files }
{ foreach from = $row.files item = f }
<a href=" { $ABS_PATH } uploads/comments/ { $f.orig_name } " target="_blank" class="file-stack" title=" { $f.clean_name } ">
{ $f.ext | upper }
</a>
{ /foreach }
{ /if }
</div>
</td>
{ if $row.images | | $row.files }
<div class="comment-assets-inline ">
{ 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 } ">
<img src=" { $ABS_PATH } uploads/comments/ { $img.orig_name } " / >
</a>
</div >
<span class="asset-name" title=" { $img.clean_name } "> { $img.clean_name | truncate : 1 5 : "..." : 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="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 | truncate : 1 5 : "..." : true } </span>
</div>
{ /foreach }
</div>
<td align="right">
<div style="display: flex; justify-content: flex-end; gap: 6px; ">
{ if ! $is_deleted }
{ if $row.comment_status = = '1' }
<a class="icon_sprite ico_unlock_no" title="Скрыть" href="index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=set_status_0&id= { $row.CId } &cp= { $sess } "></a >
{ else }
<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 >
{ if $row.has_children }
<a class="icon_sprite ico_delete ConfirmDelete" title="Скрыть текст (сохранить ветку)"
href="index.php?do=modules&action=modedit&mod=comment&moduleaction=admin_del&admin_action_type=soft&Id= { $row.CId } &cp= { $sess } "></a>
{ /i f}
{ /if }
<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="color:#999;">(Голосов: { $row.r_count | default : 0 } )</span>
</div>
<a class="icon_sprite ico_delete ico_delete_all ConfirmDelete" title="УДАЛИТЬ ПОЛНОСТЬЮ"
href="index.php?do=modules&action=modedit&mod=comment&moduleaction=admin_del&admin_action_type=full&Id= { $row.CId } &cp= { $sess } "></a >
</div>
</td>
</tr>
{ /foreach }
{ else }
<tr>
<td colspan="4 ">
<ul class="messages">
<li class="highlight yellow"><strong>Сообщение:</strong><br />Нет комментариев.</li>
</ul>
</td>
</tr>
<tr>
<td colspan="9 ">
<ul class="messages">
<li class="highlight yellow"><strong>Сообщение:</strong><br />Нет комментариев.</li>
</ul>
</td>
</tr>
{ /if }
</tbody>
</table>
<div class="tfoot">
<div class="left" style="padding:15px;">
<select id="mass_action_select" style="padding:5px;" >
<select id="mass_action_select">
<option value="">Выберите действие...</option>
<option value="set_status_1">Опубликовать</option>
<option value="set_status_0">Скрыть</option>
@@ -211,11 +305,7 @@
</div>
{ if $page_nav }
<div class="pagination">
<ul class="pages">
{ $page_nav }
</ul>
</div>
<div class="pagination"><ul class="pages"> { $page_nav } </ul></div>
{ /if }
<script type="text/javascript">
@@ -223,16 +313,42 @@ function checkAll(master) {
var checkboxes = document . getElementsByClassName ( 'row-checkbox' ) ;
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 ) { jA ler t( 'Выберите действие!' , 'Внимание' ) ; return ; }
var select = document . getElementById ( 'mass_action_select' ) ;
var action = se lec t. value ;
/ / К р а с и в о е у в е д о м л е н и е , е с л и н е в ы б р а л и д е й с т в и е
if ( ! action ) {
jAlert ( 'Выберите действие из списка!' , 'Внимание' ) ;
return ;
}
var checkboxes = document . getElementsByClassName ( 'row-checkbox' ) ;
var ids = [ ] ;
for ( var i = 0 ; i < checkboxes . length ; i + + ) { if ( checkboxes [ i ] . checked ) ids . push ( checkboxes [ i ] . value ) ; }
if ( id s. length = = = 0 ) { jAlert ( 'Ничего не выбрано!' , 'Ошибка' ) ; return ; }
var url = 'index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=' + action + '&ids=' + ids . join ( ',' ) + '&cp={$sess}' ;
for ( var i = 0 ; i < checkboxes . length ; i + + ) {
if ( checkboxe s[ i ] . checked ) ids . push ( checkboxes [ i ] . value ) ;
}
/ / К р а с и в о е у в е д о м л е н и е , е с л и н е в ы б р а л и ч е к б о к с ы
if ( ids . length = = = 0 ) {
jAlert ( 'Вы не выбрали ни одного комментария для обработки.' , 'Ошибка' ) ;
return ;
}
var cp = '{$sess}' ;
var url = '' ;
if ( action = = = 'delete' ) {
jConfirm ( 'Удалить выбранные элементы?' , 'Подтверждение' , function ( r ) { if ( r ) window . location . href = url ; } ) ;
} else { window . location . href = url ; }
var idParams = ids . map ( function ( id ) { return 'id[]=' + id ; } ) . join ( '&' ) ;
url = 'index.php?do=modules&action=modedit&mod=comment&moduleaction=admin_del&' + idParams + '&cp=' + cp ;
} else {
url = 'index.php?do=modules&action=modedit&mod=comment&moduleaction=1&admin_action=' + action + '&ids=' + ids . join ( ',' ) + '&cp=' + cp ;
}
/ / К р а с и в о е п о д т в е р ж д е н и е
jConfirm ( 'Выполнить выбранное действие для ' + ids . length + ' эл.?' , 'Подтверждение' , function ( r ) {
if ( r ) window . location . href = url ;
} ) ;
}
</script>