qa
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
7 changed files
with
13 additions
and
35 deletions
| ... | @@ -20745,28 +20745,17 @@ | ... | @@ -20745,28 +20745,17 @@ |
| 20745 | }); | 20745 | }); |
| 20746 | } | 20746 | } |
| 20747 | $(document).on("change", ' #top-news-select input[type="radio"][name="_sft_category[]"]', function (e) { | 20747 | $(document).on("change", ' #top-news-select input[type="radio"][name="_sft_category[]"]', function (e) { |
| 20748 | if (this.value == 'news') { | ||
| 20749 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | ||
| 20750 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | ||
| 20751 | const search = new URLSearchParams(location.search); | 20748 | const search = new URLSearchParams(location.search); |
| 20752 | if ($('html:lang(fr-FR)').length) { | 20749 | if (this.value == 'news') { |
| 20753 | search.set('_sft_category', 'news-fr'); | ||
| 20754 | } else { | ||
| 20755 | search.set('_sft_category', 'news'); | 20750 | search.set('_sft_category', 'news'); |
| 20756 | } | 20751 | } else if (this.value == 'news-fr') { |
| 20757 | location.search = search.toString(); | 20752 | search.set('_sft_category', 'news-fr'); |
| 20758 | } else if (this.value == 'events') { | 20753 | } else if (this.value == 'events') { |
| 20759 | if ($('html:lang(fr-FR)').length) { | ||
| 20760 | search.set('_sft_category', 'events-fr'); | ||
| 20761 | } else { | ||
| 20762 | search.set('_sft_category', 'events'); | 20754 | search.set('_sft_category', 'events'); |
| 20755 | } else if (this.value == 'events-fr') { | ||
| 20756 | search.set('_sft_category', 'events-fr'); | ||
| 20763 | } | 20757 | } |
| 20764 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | ||
| 20765 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | ||
| 20766 | const search = new URLSearchParams(location.search); | ||
| 20767 | search.set('_sft_category', 'events'); | ||
| 20768 | location.search = search.toString(); | 20758 | location.search = search.toString(); |
| 20769 | } | ||
| 20770 | }); | 20759 | }); |
| 20771 | } | 20760 | } |
| 20772 | return { | 20761 | return { | ... | ... |
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.
| ... | @@ -36,8 +36,8 @@ get_header(); | ... | @@ -36,8 +36,8 @@ get_header(); |
| 36 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Events</label></li> | 36 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Events</label></li> |
| 37 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">News</label></li></ul> | 37 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">News</label></li></ul> |
| 38 | <?php }else{ ?> | 38 | <?php }else{ ?> |
| 39 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events-fr'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Événements</label></li> | 39 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events-fr" <?php if($_GET['_sft_category'] == 'events-fr'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Événements</label></li> |
| 40 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news-fr'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">Nouvelles</label></li></ul> | 40 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news-fr" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news-fr'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">Nouvelles</label></li></ul> |
| 41 | 41 | ||
| 42 | <?php }?> | 42 | <?php }?> |
| 43 | </li> | 43 | </li> | ... | ... |
| ... | @@ -106,28 +106,17 @@ var Search = (function($) { | ... | @@ -106,28 +106,17 @@ var Search = (function($) { |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | $(document).on("change",' #top-news-select input[type="radio"][name="_sft_category[]"]', function(e){ | 108 | $(document).on("change",' #top-news-select input[type="radio"][name="_sft_category[]"]', function(e){ |
| 109 | if (this.value == 'news') { | ||
| 110 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | ||
| 111 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | ||
| 112 | const search = new URLSearchParams(location.search); | 109 | const search = new URLSearchParams(location.search); |
| 113 | if ($('html:lang(fr-FR)').length) { | 110 | if (this.value == 'news') { |
| 114 | search.set('_sft_category', 'news-fr'); | ||
| 115 | }else{ | ||
| 116 | search.set('_sft_category', 'news'); | 111 | search.set('_sft_category', 'news'); |
| 117 | } | 112 | }else if (this.value == 'news-fr') { |
| 118 | location.search = search.toString(); | 113 | search.set('_sft_category', 'news-fr'); |
| 119 | }else if (this.value == 'events') { | 114 | }else if (this.value == 'events') { |
| 120 | if ($('html:lang(fr-FR)').length) { | ||
| 121 | search.set('_sft_category', 'events-fr'); | ||
| 122 | }else{ | ||
| 123 | search.set('_sft_category', 'events'); | 115 | search.set('_sft_category', 'events'); |
| 116 | }else if (this.value == 'events-fr') { | ||
| 117 | search.set('_sft_category', 'events-fr'); | ||
| 124 | } | 118 | } |
| 125 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | ||
| 126 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | ||
| 127 | const search = new URLSearchParams(location.search); | ||
| 128 | search.set('_sft_category', 'events'); | ||
| 129 | location.search = search.toString(); | 119 | location.search = search.toString(); |
| 130 | } | ||
| 131 | }); | 120 | }); |
| 132 | 121 | ||
| 133 | 122 | ... | ... |
| ... | @@ -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.15 | 5 | Version: 1.0.16 |
| 6 | */ | 6 | */ |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment