qa
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
6 changed files
with
27 additions
and
7 deletions
| ... | @@ -20691,16 +20691,23 @@ | ... | @@ -20691,16 +20691,23 @@ |
| 20691 | } else { | 20691 | } else { |
| 20692 | $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" ></li>').appendTo(jQuery('#advance-search-modal .searchandfilter ul:first-child ')); | 20692 | $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" ></li>').appendTo(jQuery('#advance-search-modal .searchandfilter ul:first-child ')); |
| 20693 | } | 20693 | } |
| 20694 | if ($('html:lang(fr-FR)').length && $('#search-wrapper:not(.news-search)').length) { | ||
| 20695 | $('.wpml-ls-link').attr('href', document.location.origin + '/search/'); | ||
| 20696 | } else { | ||
| 20697 | $('.wpml-ls-link').attr('href', document.location.origin + '/search/?lang=fr'); | ||
| 20698 | } | ||
| 20699 | if ($('html:lang(fr-FR)').length && $('.news-search').length) { | ||
| 20700 | $('.wpml-ls-link').attr('href', document.location.origin + '/news/'); | ||
| 20701 | } else { | ||
| 20702 | $('.wpml-ls-link').attr('href', document.location.origin + '/news/?lang=fr'); | ||
| 20703 | } | ||
| 20694 | $(document).on("click", ".search-filter-reset-custom", function (e) { | 20704 | $(document).on("click", ".search-filter-reset-custom", function (e) { |
| 20695 | e.preventDefault(); | 20705 | e.preventDefault(); |
| 20696 | $(this).closest('.searchandfilter')[0].reset(); | 20706 | $(this).closest('.searchandfilter')[0].reset(); |
| 20697 | $('#top-search').val(); | 20707 | $('#top-search').val(); |
| 20698 | return false; | 20708 | return false; |
| 20699 | }); | 20709 | }); |
| 20700 | 20710 | $(document).on("click", "#search-wrapper:not(.news-search) .search-filter-reset", function (e) { | |
| 20701 | //$('.search-filter-reset').unbind('click'); | ||
| 20702 | |||
| 20703 | $(document).on("click", "search-wrapper:not(.news-search) .search-filter-reset", function (e) { | ||
| 20704 | e.preventDefault(); | 20711 | e.preventDefault(); |
| 20705 | const searchParams = new URLSearchParams(window.location.search); | 20712 | const searchParams = new URLSearchParams(window.location.search); |
| 20706 | var lang = searchParams.get('lang'); | 20713 | var lang = searchParams.get('lang'); | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -39,6 +39,19 @@ var Search = (function($) { | ... | @@ -39,6 +39,19 @@ var Search = (function($) { |
| 39 | }else{ | 39 | }else{ |
| 40 | $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" ></li>').appendTo( jQuery( '#advance-search-modal .searchandfilter ul:first-child ' ) ); | 40 | $('<li class="sf-field-reset"><input type="submit" class="search-filter-reset-custom" value="CLEAR ALL" ></li>').appendTo( jQuery( '#advance-search-modal .searchandfilter ul:first-child ' ) ); |
| 41 | } | 41 | } |
| 42 | |||
| 43 | if ($('html:lang(fr-FR)').length && $('#search-wrapper:not(.news-search)').length) { | ||
| 44 | $('.wpml-ls-link').attr('href', document.location.origin + '/search/'); | ||
| 45 | }else{ | ||
| 46 | $('.wpml-ls-link').attr('href', document.location.origin + '/search/?lang=fr'); | ||
| 47 | } | ||
| 48 | |||
| 49 | if ($('html:lang(fr-FR)').length && $('.news-search').length) { | ||
| 50 | $('.wpml-ls-link').attr('href', document.location.origin + '/news/'); | ||
| 51 | }else{ | ||
| 52 | $('.wpml-ls-link').attr('href', document.location.origin + '/news/?lang=fr'); | ||
| 53 | } | ||
| 54 | |||
| 42 | $(document).on("click", ".search-filter-reset-custom", function(e){ | 55 | $(document).on("click", ".search-filter-reset-custom", function(e){ |
| 43 | e.preventDefault(); | 56 | e.preventDefault(); |
| 44 | $(this).closest('.searchandfilter')[0].reset(); | 57 | $(this).closest('.searchandfilter')[0].reset(); |
| ... | @@ -46,9 +59,9 @@ var Search = (function($) { | ... | @@ -46,9 +59,9 @@ var Search = (function($) { |
| 46 | return false; | 59 | return false; |
| 47 | }); | 60 | }); |
| 48 | 61 | ||
| 49 | //$('.search-filter-reset').unbind('click'); | 62 | |
| 50 | 63 | ||
| 51 | $(document).on("click", "search-wrapper:not(.news-search) .search-filter-reset", function(e){ | 64 | $(document).on("click", "#search-wrapper:not(.news-search) .search-filter-reset", function(e){ |
| 52 | e.preventDefault(); | 65 | e.preventDefault(); |
| 53 | const searchParams = new URLSearchParams(window.location.search) | 66 | const searchParams = new URLSearchParams(window.location.search) |
| 54 | var lang = searchParams.get('lang') | 67 | var lang = searchParams.get('lang') | ... | ... |
| ... | @@ -2,5 +2,5 @@ | ... | @@ -2,5 +2,5 @@ |
| 2 | Theme Name: MSF CA Child | 2 | Theme Name: MSF CA Child |
| 3 | Author: Tenzing Communications | 3 | Author: Tenzing Communications |
| 4 | Template: msf-ca | 4 | Template: msf-ca |
| 5 | Version: 1.0.47 | 5 | Version: 1.0.48 |
| 6 | */ | 6 | */ |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment