обновление до версии 1.2.6
This commit is contained in:
parent
3e7410319d
commit
2d394d48f2
@ -14,6 +14,8 @@
|
||||
|
||||
##### Changelog:
|
||||
|
||||
##### 01.07.2017 - обновление модуля - версия 1.2.6 - Добавлен лимит вывода событий при перелистывании месяцев в календаре (лимит не распространяется на клик по дате с событиями)
|
||||
|
||||
##### 25.06.2017 - обновление модуля - версия 1.2.5 - Добавлен выбор формата даты для публичной части календаря, проверка условий при создании календаря
|
||||
|
||||
##### 15.05.2017 - обновление модуля - версия 1.2.4 - Исправлено: jQuery Form Styler - ограничивал раскрытие select по высоте; Исправлено ленг файл .php будет подключаться, в зависимости от языка Администратора (в админ-панели) и Пользователя (в публичной части)
|
||||
|
@ -135,7 +135,8 @@ class Unicalendar
|
||||
uca_link = '" . $_POST['uca_link'] . "',
|
||||
uca_day = '" . $_POST['uca_day'] . "',
|
||||
uca_scroll = '" . $_POST['uca_scroll'] . "',
|
||||
uca_descript = '" . $_POST['uca_descript'] . "'
|
||||
uca_descript = '" . $_POST['uca_descript'] . "',
|
||||
uca_events_limit = '" . $_POST['uca_events_limit'] . "'
|
||||
");
|
||||
|
||||
// Получаем обновленные данные календаря
|
||||
@ -152,20 +153,21 @@ class Unicalendar
|
||||
}
|
||||
foreach ( $unicalendars as $k=>$v )
|
||||
{
|
||||
$uca_id = $v['id'];
|
||||
$uca_dfrm = $v['uca_date_format'];
|
||||
$uevents = $v['uca_events'];
|
||||
$urubric_id = $v['uca_rubric_id'];
|
||||
$udoc_id = $v['uca_doc_id'];
|
||||
$uca_day = $v['uca_day'];
|
||||
$uca_scroll = $v['uca_scroll'];
|
||||
$uca_link = $v['uca_link'];
|
||||
$uca_descript = $v['uca_descript'];
|
||||
$uca_id = $v['id'];
|
||||
$uca_dfrm = $v['uca_date_format'];
|
||||
$uevents = $v['uca_events'];
|
||||
$urubric_id = $v['uca_rubric_id'];
|
||||
$udoc_id = $v['uca_doc_id'];
|
||||
$uca_day = $v['uca_day'];
|
||||
$uca_scroll = $v['uca_scroll'];
|
||||
$uca_link = $v['uca_link'];
|
||||
$uca_descript = $v['uca_descript'];
|
||||
$uca_events_limit = $v['uca_events_limit'];
|
||||
}
|
||||
// Если выбрали вывести все документы из заданной рубрики - документы с Id=1 (Главная) и 404 страница - выводиться не будут!
|
||||
if ($uevents !='' && $uevents == '1'){
|
||||
$sql = $AVE_DB->Query("
|
||||
SELECT Id, document_alias, document_title, document_published, document_meta_description
|
||||
SELECT Id, document_alias, document_title, document_published, document_expire, document_meta_description
|
||||
FROM " . PREFIX . "_documents
|
||||
WHERE rubric_id = '" . $urubric_id . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."'
|
||||
");
|
||||
@ -177,10 +179,10 @@ class Unicalendar
|
||||
//получаем данные всех документов из заданной рубрики циклом, формируем строку JSON
|
||||
foreach ( $results as $k=>$v )
|
||||
{
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$rubric_count .= $v['Id']." OR Id=";
|
||||
}
|
||||
$js_data_files = "$(function(){"."var data".$uca_id." = [".$uni_data."]; $(\"#eventCalendar".$uca_id."\").eventCalendar({jsonData: data".$uca_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
$js_data_files = "$(function(){"."var data".$uca_id." = [".$uni_data."]; $(\"#eventCalendar".$uca_id."\").eventCalendar({jsonData: data".$uca_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
|
||||
// Получаем Id документов в категории на момент создания календаря и записываем значение в БД
|
||||
$rubric_count ='Id='.$rubric_count;
|
||||
@ -209,7 +211,7 @@ class Unicalendar
|
||||
// Если выбрали вывести выбранные документы из заданной рубрики - документы с Id=1 (Главная) и 404 страница - выводиться не будут!
|
||||
if ($uevents !='' && $uevents == '2'){
|
||||
$sql = $AVE_DB->Query("
|
||||
SELECT Id, document_alias, document_title, document_published, document_meta_description
|
||||
SELECT Id, document_alias, document_title, document_published, document_expire, document_meta_description
|
||||
FROM " . PREFIX . "_documents
|
||||
WHERE rubric_id = '" . $urubric_id . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."' AND ".$udoc_id."
|
||||
");
|
||||
@ -221,10 +223,10 @@ class Unicalendar
|
||||
//получаем данные выбранных документов из заданной рубрики циклом, формируем строку JSON
|
||||
foreach ( $results as $k=>$v )
|
||||
{
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$rubric_count .= $v['Id'].",";
|
||||
}
|
||||
$js_data_files = "$(function(){"."var data".$uca_id." = [".$uni_data."]; $(\"#eventCalendar".$uca_id."\").eventCalendar({jsonData: data".$uca_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
$js_data_files = "$(function(){"."var data".$uca_id." = [".$uni_data."]; $(\"#eventCalendar".$uca_id."\").eventCalendar({jsonData: data".$uca_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
|
||||
// Создаем js файл для календаря с названием dataXXX.js - где XXX = Id календаря
|
||||
$fdir = "/modules/unicalendar/js/data-files/";
|
||||
@ -270,7 +272,7 @@ class Unicalendar
|
||||
if($uevents == 2)
|
||||
{
|
||||
$sql = $AVE_DB->Query("
|
||||
SELECT Id, document_alias, document_title, document_published, document_meta_description
|
||||
SELECT Id, document_alias, document_title, document_published, document_expire, document_meta_description
|
||||
FROM " . PREFIX . "_documents
|
||||
WHERE rubric_id = '" . $urubric_id . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."'
|
||||
");
|
||||
@ -319,7 +321,8 @@ class Unicalendar
|
||||
uca_link = '" . $_POST['uca_link'] . "',
|
||||
uca_day = '" . $_POST['uca_day'] . "',
|
||||
uca_scroll = '" . $_POST['uca_scroll'] . "',
|
||||
uca_descript = '" . $_POST['uca_descript'] . "'
|
||||
uca_descript = '" . $_POST['uca_descript'] . "',
|
||||
uca_events_limit = '" . $_POST['uca_events_limit'] . "'
|
||||
WHERE id = '" . $unicalendar_id . "'
|
||||
");
|
||||
$as = array();
|
||||
@ -340,19 +343,20 @@ class Unicalendar
|
||||
}
|
||||
foreach ( $unicalendars as $k=>$v )
|
||||
{
|
||||
$uevents = $v['uca_events'];
|
||||
$uca_dfrm = $v['uca_date_format'];
|
||||
$urubric_id = $v['uca_rubric_id'];
|
||||
$udoc_id = $v['uca_doc_id'];
|
||||
$uca_day = $v['uca_day'];
|
||||
$uca_scroll = $v['uca_scroll'];
|
||||
$uca_link = $v['uca_link'];
|
||||
$uca_descript = $v['uca_descript'];
|
||||
$uevents = $v['uca_events'];
|
||||
$uca_dfrm = $v['uca_date_format'];
|
||||
$urubric_id = $v['uca_rubric_id'];
|
||||
$udoc_id = $v['uca_doc_id'];
|
||||
$uca_day = $v['uca_day'];
|
||||
$uca_scroll = $v['uca_scroll'];
|
||||
$uca_link = $v['uca_link'];
|
||||
$uca_descript = $v['uca_descript'];
|
||||
$uca_events_limit = $v['uca_events_limit'];
|
||||
}
|
||||
// Если выбрали вывести все документы из заданной рубрики - документы с Id=1 (Главная) и 404 страница - выводиться не будут!
|
||||
if ($uevents !='' && $uevents == '1'){
|
||||
$sql = $AVE_DB->Query("
|
||||
SELECT Id, document_alias, document_title, document_published, document_meta_description
|
||||
SELECT Id, document_alias, document_title, document_published, document_expire, document_meta_description
|
||||
FROM " . PREFIX . "_documents
|
||||
WHERE rubric_id = '" . $urubric_id . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."'
|
||||
");
|
||||
@ -364,10 +368,10 @@ class Unicalendar
|
||||
//получаем данные всех документов из заданной рубрики циклом, формируем строку JSON
|
||||
foreach ( $results as $k=>$v )
|
||||
{
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$rubric_count .= $v['Id']." OR Id=";
|
||||
}
|
||||
$js_data_files = "$(function(){"."var data".$unicalendar_id." = [".$uni_data."]; $(\"#eventCalendar".$unicalendar_id."\").eventCalendar({jsonData: data".$unicalendar_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
$js_data_files = "$(function(){"."var data".$unicalendar_id." = [".$uni_data."]; $(\"#eventCalendar".$unicalendar_id."\").eventCalendar({jsonData: data".$unicalendar_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
|
||||
// Получаем Id документов в категории на момент создания календаря и записываем значение в БД
|
||||
$rubric_count ='Id='.$rubric_count;
|
||||
@ -396,7 +400,7 @@ class Unicalendar
|
||||
// Если выбрали вывести выбранные документы из заданной рубрики - документы с Id=1 (Главная) и 404 страница - выводиться не будут!
|
||||
if ($uevents !='' && $uevents == '2'){
|
||||
$sql = $AVE_DB->Query("
|
||||
SELECT Id, document_alias, document_title, document_published, document_meta_description
|
||||
SELECT Id, document_alias, document_title, document_published, document_expire, document_meta_description
|
||||
FROM " . PREFIX . "_documents
|
||||
WHERE rubric_id = '" . $urubric_id . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."' AND ".$udoc_id."
|
||||
");
|
||||
@ -408,10 +412,10 @@ class Unicalendar
|
||||
//получаем данные выбранных документов из заданной рубрики циклом, формируем строку JSON
|
||||
foreach ( $results as $k=>$v )
|
||||
{
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"description\": \"".$v['document_meta_description']."\", \"url\": \"".$v['document_alias']."\" },";
|
||||
$rubric_count .= $v['Id'].",";
|
||||
}
|
||||
$js_data_files = "$(function(){"."var data".$unicalendar_id." = [".$uni_data."]; $(\"#eventCalendar".$unicalendar_id."\").eventCalendar({jsonData: data".$unicalendar_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
$js_data_files = "$(function(){"."var data".$unicalendar_id." = [".$uni_data."]; $(\"#eventCalendar".$unicalendar_id."\").eventCalendar({jsonData: data".$unicalendar_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
|
||||
|
||||
// Создаем js файл для календаря с названием dataXXX.js - где XXX = Id календаря
|
||||
$fdir = "/modules/unicalendar/js/data-files/";
|
||||
@ -455,7 +459,7 @@ class Unicalendar
|
||||
{
|
||||
global $AVE_DB;
|
||||
$sql = $AVE_DB->Query("
|
||||
SELECT Id, document_alias, document_title, document_published, document_meta_description
|
||||
SELECT Id, document_alias, document_title, document_published, document_expire, document_meta_description
|
||||
FROM " . PREFIX . "_documents
|
||||
WHERE rubric_id = '" . $_POST['b'] . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."'
|
||||
");
|
||||
@ -466,7 +470,7 @@ class Unicalendar
|
||||
}
|
||||
foreach ( $u_sel_doc as $k=>$v )
|
||||
{
|
||||
echo "<tr class='noborder'><td align='center'><input type='checkbox' class='my-checkbox' name='u_chek".$v['Id']."' value='".$v['Id']."'></td>"."<td align='center'>".$v['Id']."</td>"."<td>".$v['document_title']."</td>"."<td align='center'>".$v['document_published'] = pretty_date(strftime(TIME_FORMAT, $v['document_published']))."</td></tr>";
|
||||
echo "<tr class='noborder'><td align='center'><input type='checkbox' class='my-checkbox' name='u_chek".$v['Id']."' value='".$v['Id']."'></td>"."<td align='center'>".$v['Id']."</td>"."<td>".$v['document_title']."</td>"."<td align='center'>".$v['document_published'] = pretty_date(strftime(TIME_FORMAT, $v['document_published']))."</td>"."<td align='center'>".$v['document_expire'] = pretty_date(strftime(TIME_FORMAT, $v['document_expire']))."</td></tr>";
|
||||
}
|
||||
}
|
||||
if (isset($_POST['check_rel'])) // если пришел запрос-проверка актуальности календаря (не будет выведен документ с Id=1 это Главная страница и документ Ошибка 404)
|
||||
|
@ -34,6 +34,7 @@ UCA_WEEK_START_MONDAY = "С понедельника"
|
||||
UCA_WEEK_START_SUNDAY = "С воскресенья"
|
||||
UCA_SCROLL_BAR = "Включить полосу прокрутки в событиях"
|
||||
UCA_DESCRIPTION = "Раскрывать содержимое всех событий сразу после загрузки"
|
||||
UCA_EVENTS_LIMIT = "Лимит вывода событий при перелистывании месяцев"
|
||||
UCA_EDIT = "Редактировать"
|
||||
UCA_DELETE = "Удалить"
|
||||
UCA_EDIT_CALEND = "Редактирование календаря "
|
||||
@ -52,6 +53,7 @@ UCA_REFRECH_DOC_RUBRIC = "Обновить список документов и
|
||||
UCA_ID_INF = "Id"
|
||||
UCA_TITLE_INF = "Название документа"
|
||||
UCA_DATE_INF = "Дата создания"
|
||||
UCA_DATE_EXPIRE = "Дата истечения"
|
||||
UCA_SELECT_ALL_INF = "Выбрать/Снять все чекбоксы"
|
||||
UCA_RELEV = "Актуальность"
|
||||
UCA_ALERT_RELEV_YES = "Ок - данные календаря актуальны"
|
||||
|
@ -14,7 +14,7 @@ if (defined('ACP'))
|
||||
{
|
||||
$modul['ModuleName'] = 'Универсальный календарь событий';
|
||||
$modul['ModuleSysName'] = 'unicalendar';
|
||||
$modul['ModuleVersion'] = '1.2.5';
|
||||
$modul['ModuleVersion'] = '1.2.6';
|
||||
$modul['ModuleDescription'] = '<br>Модуль позволяет создавать различные календари событий. <br> Для вывода календаря используйте системный тег <strong>[mod_unicalendar:XXX]</strong>';
|
||||
$modul['ModuleAutor'] = 'Repellent';
|
||||
$modul['ModuleCopyright'] = '© AVE.cms Team 2017';
|
||||
|
@ -31,6 +31,7 @@ $module_sql_install[] = "CREATE TABLE `CPPREFIX_module_unicalendar` (
|
||||
`uca_day` varchar(10) NOT NULL,
|
||||
`uca_scroll` varchar(10) NOT NULL,
|
||||
`uca_descript` varchar(10) NOT NULL,
|
||||
`uca_events_limit` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;";
|
||||
|
||||
@ -66,5 +67,10 @@ $module_sql_update[] = "
|
||||
$module_sql_update[] = "
|
||||
ALTER TABLE `CPPREFIX_module_unicalendar`
|
||||
ADD IF NOT EXISTS `uca_date_format` varchar(255) NOT NULL
|
||||
AFTER `uca_title`";
|
||||
AFTER `uca_title`";
|
||||
// Обновление таблицы в версии модуля v1.2.6
|
||||
$module_sql_update[] = "
|
||||
ALTER TABLE `CPPREFIX_module_unicalendar`
|
||||
ADD IF NOT EXISTS `uca_events_limit` int(10) unsigned NOT NULL
|
||||
AFTER `uca_descript`";
|
||||
?>
|
@ -98,7 +98,13 @@
|
||||
<input type="radio" name="u_descript" class="u_descript" value="false" {if $unicalendars.uca_descript == 'false'} checked="checked" {/if}>
|
||||
<label for="">{#UCA_NO#}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="noborder">
|
||||
<td width="180">{#UCA_EVENTS_LIMIT#}</td>
|
||||
<td>
|
||||
<input name="uca_events_limit" type="text" id="uca_events_limit" value="{$unicalendars.uca_events_limit|escape}" style="width:32px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="noborder">
|
||||
<td width="180"><div style="padding-bottom: 8px; padding-top: 8px;">{#UCA_EVENTS#}</div></td>
|
||||
<td id="uca_result">
|
||||
@ -195,7 +201,13 @@
|
||||
<input type="radio" name="u_descript" class="u_descript" value="false" {if $unicalendars.uca_descript == 'false'} checked="checked" {/if}>
|
||||
<label for="">{#UCA_NO#}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="noborder">
|
||||
<td width="180">{#UCA_EVENTS_LIMIT#}</td>
|
||||
<td>
|
||||
<input name="uca_events_limit" type="text" id="uca_events_limit" value="{$unicalendars.uca_events_limit|escape}" style="width:32px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="noborder">
|
||||
<td width="180"><div style="padding-bottom: 8px; padding-top: 8px;">{#UCA_EVENTS#}</div></td>
|
||||
<td id="uca_result">
|
||||
@ -216,8 +228,10 @@
|
||||
<thead>
|
||||
<tr class="noborder">
|
||||
<td align="center">{#UCA_EVENTS_SELECT_DOC#}</td>
|
||||
<td align="center">Id</td><td align="center">Название документа</td>
|
||||
<td align="center">Дата создания</td>
|
||||
<td align="center">{#UCA_ID_INF#}</td>
|
||||
<td align="center">{#UCA_TITLE_INF#}</td>
|
||||
<td align="center">{#UCA_DATE_INF#}</td>
|
||||
<td align="center">{#UCA_DATE_EXPIRE#}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -233,6 +247,7 @@
|
||||
<td align='center'>{$unidocs.Id}</td>
|
||||
<td>{$unidocs.document_title}</td>
|
||||
<td align='center'>{$unidocs.document_published|date_format:$TIME_FORMAT|pretty_date}</td>
|
||||
<td align='center'>{$unidocs.document_expire|date_format:$TIME_FORMAT|pretty_date}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</span>
|
||||
@ -322,6 +337,11 @@
|
||||
$('#uca_title').val('');
|
||||
{rdelim});// END обнуляем значение value у input Название календаря при событии focus
|
||||
|
||||
// START обнуляем значение value у input Лимит вывода событий при событии focus
|
||||
$('#uca_events_limit').focus(function(){ldelim}
|
||||
$('#uca_events_limit').val('');
|
||||
{rdelim});// END обнуляем значение value у input Лимит вывода событий при событии focus
|
||||
|
||||
// START получаем значение радиокнопки формат даты и пишем в input значение
|
||||
$(".u_date_format").on('change', function() {ldelim}
|
||||
$('#uca_date_format').val('');
|
||||
@ -398,6 +418,7 @@
|
||||
var uca_day = $('#uca_day').val();
|
||||
var uca_scroll = $('#uca_scroll').val();
|
||||
var uca_descript = $('#uca_descript').val();
|
||||
var uca_events_limit = $('#uca_events_limit').val();
|
||||
var uca_rubric_id = $('#uca_rubric_id').val();
|
||||
var uca_rubric_title = $('#uca_rubric_title').val();
|
||||
var uca_doc_id = $('#uca_doc_id').val();
|
||||
@ -411,7 +432,7 @@
|
||||
$.ajax({ldelim}
|
||||
type: 'POST',
|
||||
url: 'index.php?do=modules&action=modedit&mod=unicalendar&moduleaction=edit_save&id={$unicalendars.id}&cp={$sess}',
|
||||
data: {ldelim}uca_events:uca_events,uca_title:uca_title,uca_date_format:uca_date_format,uca_link:uca_link,uca_day:uca_day,uca_scroll:uca_scroll,uca_descript:uca_descript,uca_rubric_id:uca_rubric_id,uca_rubric_title:uca_rubric_title,uca_doc_id:uca_doc_id{rdelim},
|
||||
data: {ldelim}uca_events:uca_events,uca_title:uca_title,uca_date_format:uca_date_format,uca_link:uca_link,uca_day:uca_day,uca_scroll:uca_scroll,uca_descript:uca_descript,uca_events_limit:uca_events_limit,uca_rubric_id:uca_rubric_id,uca_rubric_title:uca_rubric_title,uca_doc_id:uca_doc_id{rdelim},
|
||||
success: function(data) {ldelim}
|
||||
$('#ed_title').html(uca_title);
|
||||
$('#title_rub').html(' '+uca_rubric_title);
|
||||
|
@ -220,7 +220,13 @@
|
||||
<input type="radio" name="u_descript" class="u_descript" value="false" checked="checked">
|
||||
<label for="">{#UCA_NO#}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="noborder">
|
||||
<td width="180">{#UCA_EVENTS_LIMIT#}</td>
|
||||
<td>
|
||||
<input name="uca_events_limit" type="text" id="uca_events_limit" value="5" style="width:32px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="noborder">
|
||||
<td width="180">{#UCA_EVENTS#}</td>
|
||||
<td>
|
||||
@ -258,6 +264,12 @@
|
||||
</div>
|
||||
{/if}
|
||||
<script>
|
||||
|
||||
// START обнуляем значение value у input Лимит вывода событий при событии focus
|
||||
$('#uca_events_limit').focus(function(){ldelim}
|
||||
$('#uca_events_limit').val('');
|
||||
{rdelim});// END обнуляем значение value у input Лимит вывода событий при событии focus
|
||||
|
||||
// START Получаем значениe value выбранного option - События календаря
|
||||
$('#uca_events_sel').change(function(){ldelim}
|
||||
$('#uca_events').val('');
|
||||
@ -306,7 +318,7 @@
|
||||
var post_doc = '';
|
||||
var uca_inp_res = $("#uca_result option:selected").val();
|
||||
var uca_inptxt_res = $("#uca_result option:selected").text();
|
||||
$('#tr_uca_res').after('<table id="tr_uca_res_doc" cellpadding="0" cellspacing="0" width="100%" class="tableStatic mainForm"><colgroup><col width="180" /><col width="*" /></colgroup><col width="*" /></colgroup><col width="*" /><thead><tr class="noborder"><td align="center">{#UCA_EVENTS_SELECT_DOC#}</td><td align="center">{#UCA_ID_INF#}</td><td align="center">{#UCA_TITLE_INF#}</td><td align="center">{#UCA_DATE_INF#}</td></tr></thead><tbody><tr id="result_doc"><td width="180" align="center"><label class="code" style="padding-bottom:4px;">{#UCA_SELECT_ALL_INF#} <input type="checkbox" id="check_all"></label></td></tr></tbody></table>');
|
||||
$('#tr_uca_res').after('<table id="tr_uca_res_doc" cellpadding="0" cellspacing="0" width="100%" class="tableStatic mainForm"><colgroup><col width="180" /><col width="*" /></colgroup><col width="*" /></colgroup><col width="*" /><thead><tr class="noborder"><td align="center">{#UCA_EVENTS_SELECT_DOC#}</td><td align="center">{#UCA_ID_INF#}</td><td align="center">{#UCA_TITLE_INF#}</td><td align="center">{#UCA_DATE_INF#}</td><td align="center">{#UCA_DATE_EXPIRE#}</td></tr></thead><tbody><tr id="result_doc"><td width="180" align="center"><label class="code" style="padding-bottom:4px;">{#UCA_SELECT_ALL_INF#} <input type="checkbox" id="check_all"></label></td></tr></tbody></table>');
|
||||
$('#uca_rubric_id').val(uca_inp_res);
|
||||
$('#uca_rubric_title').val(uca_inptxt_res);
|
||||
uca_doc_request = uca_inp_res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user