From 84fb8cf2aa0cd62f6d26eb905124333113f988ca Mon Sep 17 00:00:00 2001 From: merelendor Date: Fri, 9 Dec 2022 18:43:15 +0300 Subject: [PATCH] fix for js init order, fix for ilsa update reindex, fix for pagination --- .../evolution/callback.button/component.php | 6 ++---- local/ilsa_update.php | 9 ++++++++- local/templates/evolution/js/main.js | 16 ++++++++++++++-- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/local/components/evolution/callback.button/component.php b/local/components/evolution/callback.button/component.php index 5dcd3ce..3c5bab0 100644 --- a/local/components/evolution/callback.button/component.php +++ b/local/components/evolution/callback.button/component.php @@ -22,11 +22,9 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true)))) $arResult['ALLOW'] = false; $arResult['SEARCH'] = $_REQUEST['search']; - print "\n"; - - $sort = Array("ID" => "DESC"); + $sort = Array("SORT" => "ASC"); $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CALLBACK_SCHEDULE); - $options = Array("nPageSize" => 1); + $options = []; $schedule_res = CIBlockElement::GetList($sort, $filter, false, $options); while ($schedule_element = $schedule_res->GetNextElement()) diff --git a/local/ilsa_update.php b/local/ilsa_update.php index d6f49dd..a3c308e 100644 --- a/local/ilsa_update.php +++ b/local/ilsa_update.php @@ -771,7 +771,12 @@ print "\n\n".$trace."\n\n"; /* search reindex start -------------------------------------------------------------*/ -CSearch::ReIndexAll(false); +$reindex_handler = false; +$reindex_handler = CSearch::ReIndexAll(false, 60, $reindex_handler); +while(is_array($reindex_handler)) +{ + $reindex_handler = CSearch::ReIndexAll(false, 60, $reindex_handler); +} /* search reindex end -------------------------------------------------------------*/ @@ -1803,6 +1808,7 @@ file_put_contents("/home/bitrix/www/sitemap.xml", $sitemap_index); /* sitemap catalog file end -------------------------------------------------------------*/ +/* \Bitrix\Main\Mail\Event::send([ "EVENT_NAME" => "ILSA_UPDATE", "LID" => "s1", @@ -1810,6 +1816,7 @@ file_put_contents("/home/bitrix/www/sitemap.xml", $sitemap_index); "MESSAGE" => $traceback_message, ) ]); +*/ die(); diff --git a/local/templates/evolution/js/main.js b/local/templates/evolution/js/main.js index 0b9ef00..3642073 100644 --- a/local/templates/evolution/js/main.js +++ b/local/templates/evolution/js/main.js @@ -20,6 +20,11 @@ function is_email(email) } $(document).ready(function() +{ + setTimeout(function(){ init(); }, 50); +}); + +function init() { $('a[href*="#order"]').each(function() { $(this).on("click", function(e) { @@ -33,7 +38,14 @@ $(document).ready(function() // Main menu toggle $(".nav_toggle").on("click", function() { - $("#menu_list").toggleClass("open"); + if($("#menu_list").hasClass("open")) + { + $("#menu_list").removeClass("open"); + } + else + { + $("#menu_list").addClass("open"); + } }); let cookies = getCookieValue('Policy'); @@ -274,4 +286,4 @@ $(document).ready(function() }); } } -}); \ No newline at end of file +} \ No newline at end of file