72 lines
2.8 KiB
Smarty
72 lines
2.8 KiB
Smarty
<div class="widget first">
|
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic mainForm">
|
|
<thead>
|
|
<tr>
|
|
<td style="padding-left: 10px;">Старый URL (Алиас)</td>
|
|
<td width="80" align="center">HTTP Код</td>
|
|
<td width="40" align="center">Удал.</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$history_list item=h}
|
|
<tr id="history-row-{$h.id}">
|
|
<td style="padding-left: 10px;"><span class="dgrey">{$h.module_alias}</span></td>
|
|
<td align="center"><span class="blue"><b>{$h.module_alias_header}</b></span></td>
|
|
<td align="center">
|
|
<a href="javascript:void(0);"
|
|
class="icon_sprite ico_delete deleteHistory"
|
|
data-id="{$h.id}"
|
|
title="Удалить из истории"></a>
|
|
</td>
|
|
</tr>
|
|
{foreachelse}
|
|
<tr>
|
|
<td colspan="3" align="center" style="padding: 30px;">
|
|
<span class="lred">История редиректов пуста</span>
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3" style="padding: 15px 10px;">
|
|
<a href="javascript:void(0);" class="button redBtn CloseHistory">Закрыть окно</a>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
{literal}
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
var a_id = '{/literal}{$alias_id}{literal}';
|
|
|
|
$(document).off('click', '.CloseHistory').on('click', '.CloseHistory', function(e){
|
|
e.preventDefault();
|
|
$('#ajax-dialog-alias-history-' + a_id).dialog('destroy').remove();
|
|
});
|
|
|
|
$('.deleteHistory').off('click').on('click', function(){
|
|
var h_id = $(this).data('id');
|
|
var $row = $('#history-row-' + h_id);
|
|
|
|
jConfirm('Удалить этот редирект из истории?', 'Подтверждение', function(r) {
|
|
if(r) {
|
|
$.post('index.php?do=modules&action=alias_history_delete&ajax=1', {
|
|
id: h_id,
|
|
cp: '{/literal}{$sess}{literal}'
|
|
}, function(data){
|
|
if(data && data.status == 'success') {
|
|
$row.css("background-color", "#fee").fadeOut(400, function(){ $(this).remove(); });
|
|
$.jGrowl("Запись удалена", {theme: "accept"});
|
|
} else {
|
|
$.jGrowl("Ошибка при удалении", {theme: "error"});
|
|
}
|
|
}, 'json');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{/literal} |