2439b51a by Jeff Balicki

qa

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent ba5eedf7
...@@ -20691,16 +20691,6 @@ ...@@ -20691,16 +20691,6 @@
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 if ($('#search-wrapper:not(.news-search)').length) {
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 if ($('.news-search').length) {
20702 $('.wpml-ls-link').attr('href', document.location.origin + '/news/?lang=fr');
20703 }
20704 $(document).on("click", ".search-filter-reset-custom", function (e) { 20694 $(document).on("click", ".search-filter-reset-custom", function (e) {
20705 e.preventDefault(); 20695 e.preventDefault();
20706 $(this).closest('.searchandfilter')[0].reset(); 20696 $(this).closest('.searchandfilter')[0].reset();
...@@ -26444,6 +26434,16 @@ ...@@ -26444,6 +26434,16 @@
26444 if (evalType === "above") return y < vpH + st; 26434 if (evalType === "above") return y < vpH + st;
26445 }; 26435 };
26446 jQuery(document).ready(function ($) { 26436 jQuery(document).ready(function ($) {
26437 if ($('html:lang(fr-FR)').length && $('#search-wrapper:not(.news-search)').length) {
26438 $('.wpml-ls-link').attr('href', document.location.origin + '/search/');
26439 } else if ($('#search-wrapper:not(.news-search)').length) {
26440 $('.wpml-ls-link').attr('href', document.location.origin + '/search/?lang=fr');
26441 }
26442 if ($('html:lang(fr-FR)').length && $('.news-search').length) {
26443 $('.wpml-ls-link').attr('href', document.location.origin + '/news/');
26444 } else if ($('.news-search').length) {
26445 $('.wpml-ls-link').attr('href', document.location.origin + '/news/?lang=fr');
26446 }
26447 trim_text(); 26447 trim_text();
26448 $('#relevant-resources').dataTable({ 26448 $('#relevant-resources').dataTable({
26449 info: false, 26449 info: false,
......
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.
...@@ -40,18 +40,6 @@ var Search = (function($) { ...@@ -40,18 +40,6 @@ var Search = (function($) {
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 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 if($('#search-wrapper:not(.news-search)').length){
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 if($('.news-search').length){
52 $('.wpml-ls-link').attr('href', document.location.origin + '/news/?lang=fr');
53 }
54
55 $(document).on("click", ".search-filter-reset-custom", function(e){ 43 $(document).on("click", ".search-filter-reset-custom", function(e){
56 e.preventDefault(); 44 e.preventDefault();
57 $(this).closest('.searchandfilter')[0].reset(); 45 $(this).closest('.searchandfilter')[0].reset();
...@@ -59,8 +47,6 @@ var Search = (function($) { ...@@ -59,8 +47,6 @@ var Search = (function($) {
59 return false; 47 return false;
60 }); 48 });
61 49
62
63
64 $(document).on("click", "#search-wrapper:not(.news-search) .search-filter-reset", function(e){ 50 $(document).on("click", "#search-wrapper:not(.news-search) .search-filter-reset", function(e){
65 e.preventDefault(); 51 e.preventDefault();
66 const searchParams = new URLSearchParams(window.location.search) 52 const searchParams = new URLSearchParams(window.location.search)
......
...@@ -4,7 +4,6 @@ import LazyLoad from "vanilla-lazyload"; ...@@ -4,7 +4,6 @@ import LazyLoad from "vanilla-lazyload";
4 import DataTable from 'datatables.net-dt'; 4 import DataTable from 'datatables.net-dt';
5 5
6 6
7 //import "./_menu_mobile";
8 import "./_search"; 7 import "./_search";
9 import "./_header_menu"; 8 import "./_header_menu";
10 import "./_side_menu"; 9 import "./_side_menu";
...@@ -37,7 +36,17 @@ window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) { ...@@ -37,7 +36,17 @@ window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) {
37 36
38 jQuery(document).ready(function($) { 37 jQuery(document).ready(function($) {
39 38
39 if ($('html:lang(fr-FR)').length && $('#search-wrapper:not(.news-search)').length) {
40 $('.wpml-ls-link').attr('href', document.location.origin + '/search/');
41 }else if($('#search-wrapper:not(.news-search)').length){
42 $('.wpml-ls-link').attr('href', document.location.origin + '/search/?lang=fr');
43 }
40 44
45 if ($('html:lang(fr-FR)').length && $('.news-search').length) {
46 $('.wpml-ls-link').attr('href', document.location.origin + '/news/');
47 }else if($('.news-search').length){
48 $('.wpml-ls-link').attr('href', document.location.origin + '/news/?lang=fr');
49 }
41 50
42 trim_text(); 51 trim_text();
43 $('#relevant-resources').dataTable( { 52 $('#relevant-resources').dataTable( {
......
...@@ -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.56 5 Version: 1.0.57
6 */ 6 */
...\ No newline at end of file ...\ No newline at end of file
......