+ обновление до версии v1.2.1
This commit is contained in:
README.md
unicalendar
@ -39,6 +39,7 @@
|
||||
<col width="1">
|
||||
<col width="*">
|
||||
<col width="*">
|
||||
<col width="100">
|
||||
<col width="184">
|
||||
<col width="1">
|
||||
<col width="1">
|
||||
@ -49,6 +50,7 @@
|
||||
<td>Id</td>
|
||||
<td>{#UCA_TITLE#}</td>
|
||||
<td>{#UCA_EVENTS#}</td>
|
||||
<td>Актуальность</td>
|
||||
<td>{#UCA_CP_TAG#}</td>
|
||||
<td colspan="3">{#UCA_ACTIONS#}</td>
|
||||
</tr>
|
||||
@ -72,6 +74,11 @@
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td align="center">
|
||||
<input type="hidden" name="uca_count_js_{$unicalendar.id}" id="uca_count_js_{$unicalendar.id}" value="" />
|
||||
<input type="hidden" name="uca_count_real_{$unicalendar.id}" id="uca_count_real_{$unicalendar.id}" value="" />
|
||||
<div id="count_wrap_{$unicalendar.id}" class="toprightDir" style="" title=""></div>
|
||||
</td>
|
||||
<td align="center">
|
||||
<div class="pr12" style="display: table; position: relative; text-align: right;">
|
||||
<input style="width: 130px;" id="uca_{$unicalendar.id}" name="textfield" type="text" readonly value="[mod_unicalendar:{$unicalendar.id}]" size="17" />
|
||||
@ -87,8 +94,49 @@
|
||||
<a class="btn redBtn ConfirmDelete" dir="{#UCA_DELETE_UNICLN#}" name="{#UCA_DELETE_UNICLN_A#}" href="index.php?do=modules&action=modedit&mod=unicalendar&moduleaction=delunicalendar&id={$unicalendar.id}&cp={$sess}">{#UCA_DELETE#}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if !$unicalendars}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// START ПРОВЕРКА АКТУАЛЬНОСТИ ДАННЫХ В КАЛЕНДАРЯХ
|
||||
$.ajax({ldelim}
|
||||
type: 'POST',
|
||||
url: 'index.php?do=modules&action=modedit&mod=unicalendar&moduleaction=events_new&cp={$sess}',
|
||||
async: true,
|
||||
data: {ldelim}all_doc:'all_doc', tstamp: new Date().getTime(), r_id:'{$unicalendar.uca_rubric_id}' {if $unicalendar.uca_events == 2} , udoc_id:'AND {$unicalendar.uca_doc_id}' {/if} {rdelim},
|
||||
success: function(data) {ldelim}
|
||||
$('#uca_count_js_{$unicalendar.id}').val('');
|
||||
$('#uca_count_real_{$unicalendar.id}').val('');
|
||||
$('#uca_count_js_{$unicalendar.id}').val({$unicalendar.uca_rub_doc_count});
|
||||
$('#uca_count_real_{$unicalendar.id}').val(data);
|
||||
var uca_count_js_{$unicalendar.id} = $("#uca_count_js_{$unicalendar.id}").val();
|
||||
var uca_count_real_{$unicalendar.id} = $("#uca_count_real_{$unicalendar.id}").val();
|
||||
if (uca_count_js_{$unicalendar.id} == uca_count_real_{$unicalendar.id})// количество документов в рубрике равно количеству документов в файле
|
||||
{ldelim}
|
||||
$('#count_wrap_{$unicalendar.id}').prop('style', 'width:18px;height:18px;background:green;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;');
|
||||
$('#count_wrap_{$unicalendar.id}').prop('title', '{#UCA_ALERT_RELEV_YES#}');// выводим подсказку - Ок - данные календаря актуальны
|
||||
{rdelim}
|
||||
else if (uca_count_js_{$unicalendar.id} > uca_count_real_{$unicalendar.id})// количество документов в рубрике меньше количества документов в файле
|
||||
{ldelim}
|
||||
$('#count_wrap_{$unicalendar.id}').prop('style', 'width:18px;height:18px;background:red;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;');
|
||||
$('#count_wrap_{$unicalendar.id}').prop('title', '{#UCA_ALERT_RELEV_BAD#}');// выводим подсказку -Внимание - события в календаре неактуальны! На момент создания календаря документов в рубрике было больше, чем на текущий момент, это приводит к тому, что календарь содержит события, ведущие на страницу с ошибкой 404! Для устранения - пересохраните календарь!
|
||||
{rdelim}
|
||||
else if (uca_count_js_{$unicalendar.id} < uca_count_real_{$unicalendar.id})// количество документов в рубрике больше количества документов в файле
|
||||
{ldelim}
|
||||
$('#count_wrap_{$unicalendar.id}').prop('style', 'width:18px;height:18px;background:orange;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;');
|
||||
$('#count_wrap_{$unicalendar.id}').prop('title', '{#UCA_ALERT_RELEV_WAR#}');// Предупреждение - события в календаре неактуальны! На момент создания календаря документов в рубрике было меньше, чем на текущий момент. Для устранения - пересохраните календарь.
|
||||
{rdelim};
|
||||
{rdelim},
|
||||
error: function(xhr, str){ldelim}
|
||||
$.jGrowl("{#SaveError#}", {ldelim}
|
||||
header: '{#SentData#}',
|
||||
theme: 'error'
|
||||
{rdelim});
|
||||
{rdelim}
|
||||
{rdelim}); // END ПРОВЕРКА АКТУАЛЬНОСТИ ДАННЫХ В КАЛЕНДАРЯХ
|
||||
|
||||
</script>
|
||||
{/foreach}
|
||||
{if !$unicalendars}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<ul class="messages">
|
||||
@ -189,6 +237,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
// START Получаем значениe value выбранного option - События календаря
|
||||
$('#uca_events_sel').change(function(){ldelim}
|
||||
$('#uca_events').val('');
|
||||
|
Reference in New Issue
Block a user