luv-assets 1.2.9 → 1.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- function renderSearchHistory(){const $list=$("#search-history-items-js");const history=SearchHistory.getKeywords();if(history.length===0){$("#search-history-js").addClass("d-none");return}$("#search-history-js").removeClass("d-none");$list.empty();history.forEach(keyword=>{const $item=$(`<li><a href="${searchUrl}?q=${encodeURIComponent(keyword)}" class="badge bg-light text-dark text-decoration-none">${keyword}</a></li>`);$list.append($item)})}$(document).ready(function(){$(".luv-nav-item").hover(function(){$(this).addClass("active");$(this).find(".nav-link").addClass("active")},function(){$(this).removeClass("active");$(this).find(".nav-link").removeClass("active")});const $qInput=$("#keywords");const $searchSuggestions=$("#search-suggestions-js");const $searchForm=$("#search-form-js");$qInput.on("focus",function(){SearchHistory.pullFromServer(pullSearchHistoryUrl);renderSearchHistory();$searchSuggestions.removeClass("d-none");$qInput.attr("aria-expanded","true")});$searchForm.on("submit",function(){const q=$input.val().trim();if(!q){e.preventDefault();$input.focus();return false}SearchHistory.save(q,saveSearchHistoryUrl)});$(document).on("click",function(e){if(!$searchForm[0].contains(e.target)){$searchSuggestions.addClass("d-none");$qInput.attr("aria-expanded","false")}});$qInput.on("keydown",function(e){if(e.key==="Escape"){$searchSuggestions.addClass("d-none");$qInput.attr("aria-expanded","false");$qInput.blur()}});$("#removeSearchDialog .btn-primary").click(function(){SearchHistory.clear(removeHistoryUrl);location.reload()});$searchSuggestions.on("click","a",function(e){const q=new URL(this.href).searchParams.get("q");if(q)SearchHistory.save(q,saveSearchHistoryUrl)});$(".lang_currency_submit").on("click",function(){var changeStore=$(".currentLangSelect").val();var currentCurrency=$(".currentCurrencySelect").val();$.ajax({url:"<?= Yii::$service->url->getUrl('cms/home/changecurrency') ?>?currency="+currentCurrency,async:false});var currentUrl=window.location.href;var currentStore=$(".current_lang").val();var redirectUrl=currentUrl.replace("://"+currentStore,"://"+changeStore);redirectUrl=redirectUrl.split("#")[0];window.location.href=redirectUrl})});
1
+ function renderSearchHistory(){const $list=$("#search-history-items-js");const history=SearchHistory.getKeywords();if(history.length===0){$("#search-history-js").addClass("d-none");return}$("#search-history-js").removeClass("d-none");$list.empty();history.forEach(keyword=>{const $item=$(`<li><a href="${searchUrl}?q=${encodeURIComponent(keyword)}" class="badge bg-light text-dark text-decoration-none">${keyword}</a></li>`);$list.append($item)})}$(document).ready(function(){$(".luv-nav-item").hover(function(){$(this).addClass("active");$(this).find(".nav-link").addClass("active")},function(){$(this).removeClass("active");$(this).find(".nav-link").removeClass("active")});const $qInput=$("#keywords");if($qInput.length>0){const $searchSuggestions=$("#search-suggestions-js");const $searchForm=$("#search-form-js");$qInput.on("focus",function(){SearchHistory.pullFromServer(pullSearchHistoryUrl);renderSearchHistory();$searchSuggestions.removeClass("d-none");$qInput.attr("aria-expanded","true")});$searchForm.on("submit",function(){const q=$input.val().trim();if(!q){e.preventDefault();$input.focus();return false}SearchHistory.save(q,saveSearchHistoryUrl)});$(document).on("click",function(e){if(!$searchForm[0].contains(e.target)){$searchSuggestions.addClass("d-none");$qInput.attr("aria-expanded","false")}});$qInput.on("keydown",function(e){if(e.key==="Escape"){$searchSuggestions.addClass("d-none");$qInput.attr("aria-expanded","false");$qInput.blur()}});$("#removeSearchDialog .btn-primary").click(function(){SearchHistory.clear(removeHistoryUrl);location.reload()});$searchSuggestions.on("click","a",function(e){const q=new URL(this.href).searchParams.get("q");if(q)SearchHistory.save(q,saveSearchHistoryUrl)})}$(".lang_currency_submit").on("click",function(){var changeStore=$(".currentLangSelect").val();var currentCurrency=$(".currentCurrencySelect").val();$.ajax({url:"<?= Yii::$service->url->getUrl('cms/home/changecurrency') ?>?currency="+currentCurrency,async:false});var currentUrl=window.location.href;var currentStore=$(".current_lang").val();var redirectUrl=currentUrl.replace("://"+currentStore,"://"+changeStore);redirectUrl=redirectUrl.split("#")[0];window.location.href=redirectUrl})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "luv-assets",
3
3
  "description": "Include Bootstrap's source Sass and individual JavaScript plugins with Webpack.",
4
- "version": "1.2.9",
4
+ "version": "1.2.10",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",