290f671c by Jeff Balicki

switcher

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 6900e051
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 Plugin Name: GTranslate 3 Plugin Name: GTranslate
4 Plugin URI: https://gtranslate.io/?xyz=998 4 Plugin URI: https://gtranslate.io/?xyz=998
5 Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>. 5 Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>.
6 Version: 3.0.3 6 Version: 3.0.4
7 Author: Translate AI Multilingual Solutions 7 Author: Translate AI Multilingual Solutions
8 Author URI: https://gtranslate.io 8 Author URI: https://gtranslate.io
9 Text Domain: gtranslate 9 Text Domain: gtranslate
...@@ -651,7 +651,12 @@ function RefreshDoWidgetCode() { ...@@ -651,7 +651,12 @@ function RefreshDoWidgetCode() {
651 } 651 }
652 652
653 if(widget_look == 'dropdown' || widget_look == 'lang_names' || widget_look == 'lang_codes' || widget_look == 'globe') { 653 if(widget_look == 'dropdown' || widget_look == 'lang_names' || widget_look == 'lang_codes' || widget_look == 'globe') {
654 jQuery('#flag_size_option,#flag_style_option').hide(); 654 jQuery('#flag_style_option').hide();
655
656 if(widget_look == 'globe')
657 jQuery('#flag_size_option').show();
658 else
659 jQuery('#flag_size_option').hide();
655 } else { 660 } else {
656 jQuery('#flag_style_option').show(); 661 jQuery('#flag_style_option').show();
657 662
...@@ -1511,9 +1516,9 @@ EOT; ...@@ -1511,9 +1516,9 @@ EOT;
1511 $data['flag_style'] = isset($_POST['flag_style']) ? sanitize_text_field($_POST['flag_style']) : '2d'; 1516 $data['flag_style'] = isset($_POST['flag_style']) ? sanitize_text_field($_POST['flag_style']) : '2d';
1512 $data['globe_size'] = isset($_POST['globe_size']) ? intval($_POST['globe_size']) : 60; 1517 $data['globe_size'] = isset($_POST['globe_size']) ? intval($_POST['globe_size']) : 60;
1513 $data['globe_color'] = isset($_POST['globe_color']) ? sanitize_hex_color($_POST['globe_color']) : '#66aaff'; 1518 $data['globe_color'] = isset($_POST['globe_color']) ? sanitize_hex_color($_POST['globe_color']) : '#66aaff';
1514 $data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']); 1519 $data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? array_map('sanitize_text_field', $_POST['incl_langs']) : array($data['default_language']);
1515 $data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']); 1520 $data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? array_map('sanitize_text_field', $_POST['fincl_langs']) : array($data['default_language']);
1516 $data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array(); 1521 $data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? array_map('sanitize_text_field', $_POST['alt_flags']) : array();
1517 $data['select_language_label'] = isset($_POST['select_language_label']) ? sanitize_text_field($_POST['select_language_label']) : 'Select Language'; 1522 $data['select_language_label'] = isset($_POST['select_language_label']) ? sanitize_text_field($_POST['select_language_label']) : 'Select Language';
1518 1523
1519 $data['custom_css'] = isset($_POST['custom_css']) ? wp_kses_post($_POST['custom_css']) : ''; 1524 $data['custom_css'] = isset($_POST['custom_css']) ? wp_kses_post($_POST['custom_css']) : '';
......
...@@ -3,8 +3,8 @@ Contributors: edo888 ...@@ -3,8 +3,8 @@ Contributors: edo888
3 Author: Translate AI Multilingual Solutions 3 Author: Translate AI Multilingual Solutions
4 Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate 4 Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
5 Requires at least: 2.8.1 5 Requires at least: 2.8.1
6 Tested up to: 6.2 6 Tested up to: 6.3
7 Stable tag: 3.0.3 7 Stable tag: 3.0.4
8 License: GPLv2 or later 8 License: GPLv2 or later
9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
10 Donate link: https://gtranslate.io/?xyz=998#pricing 10 Donate link: https://gtranslate.io/?xyz=998#pricing
...@@ -248,6 +248,10 @@ If you want us to translate your website professionally or provide you a proofre ...@@ -248,6 +248,10 @@ If you want us to translate your website professionally or provide you a proofre
248 8. User Dashboard (paid) 248 8. User Dashboard (paid)
249 249
250 == Changelog == 250 == Changelog ==
251 = 3.0.4 =
252 * Added protection against XSS by bad acting admins
253 * Added flag size option for Globe widget look
254
251 = 3.0.3 = 255 = 3.0.3 =
252 * Fix mobile touch-no-click issue for float look in horizontal open direction mode 256 * Fix mobile touch-no-click issue for float look in horizontal open direction mode
253 * Fix for invalid input in Custom CSS section which can break the settings interface 257 * Fix for invalid input in Custom CSS section which can break the settings interface
......
...@@ -16863,6 +16863,10 @@ html.mega-menu-primary-off-canvas-open #wpadminbar { ...@@ -16863,6 +16863,10 @@ html.mega-menu-primary-off-canvas-open #wpadminbar {
16863 font-size: 20px !important; 16863 font-size: 20px !important;
16864 } 16864 }
16865 } 16865 }
16866 .admin-bar .back-one-level {
16867 top: 11.125rem;
16868 }
16869
16866 .site-title { 16870 .site-title {
16867 font-size: 2.1875rem; 16871 font-size: 2.1875rem;
16868 line-height: 3.125rem; 16872 line-height: 3.125rem;
...@@ -17668,8 +17672,9 @@ select { ...@@ -17668,8 +17672,9 @@ select {
17668 } 17672 }
17669 @media (max-width: 48rem) { 17673 @media (max-width: 48rem) {
17670 .wpcf7 form.sent .wpcf7-response-output { 17674 .wpcf7 form.sent .wpcf7-response-output {
17671 padding-left: 0px; 17675 margin-top: 10px;
17672 margin-left: -10px; 17676 padding-left: 0;
17677 margin-left: -15px;
17673 } 17678 }
17674 } 17679 }
17675 17680
...@@ -18953,6 +18958,13 @@ ul.sf_date_field .sf-datepicker { ...@@ -18953,6 +18958,13 @@ ul.sf_date_field .sf-datepicker {
18953 } 18958 }
18954 } 18959 }
18955 18960
18961 .admin-bar #advance-search-modal .modal-dialog {
18962 padding-top: 40px;
18963 }
18964 .admin-bar #advance-search-modal .modal-dialog .btn-close {
18965 top: 5rem;
18966 }
18967
18956 .search-results .search-field { 18968 .search-results .search-field {
18957 border: 0; 18969 border: 0;
18958 border-bottom: 0.0625rem solid #707070; 18970 border-bottom: 0.0625rem solid #707070;
...@@ -20128,6 +20140,8 @@ ul.sf_date_field .sf-datepicker { ...@@ -20128,6 +20140,8 @@ ul.sf_date_field .sf-datepicker {
20128 20140
20129 #gt_float_wrapper { 20141 #gt_float_wrapper {
20130 right: 0rem !important; 20142 right: 0rem !important;
20143 width: 80px !important;
20144 overflow: visible;
20131 } 20145 }
20132 @media screen and (max-width: 62.5rem) { 20146 @media screen and (max-width: 62.5rem) {
20133 #gt_float_wrapper { 20147 #gt_float_wrapper {
...@@ -20137,10 +20151,13 @@ ul.sf_date_field .sf-datepicker { ...@@ -20137,10 +20151,13 @@ ul.sf_date_field .sf-datepicker {
20137 #gt_float_wrapper .gt_float_switcher { 20151 #gt_float_wrapper .gt_float_switcher {
20138 box-shadow: none !important; 20152 box-shadow: none !important;
20139 border-radius: 0rem 0rem 0.625rem 0.625rem; 20153 border-radius: 0rem 0rem 0.625rem 0.625rem;
20154 overflow: visible;
20140 } 20155 }
20141 #gt_float_wrapper .gt_float_switcher .gt_options.gt-open { 20156 #gt_float_wrapper .gt_float_switcher .gt_options {
20142 max-height: unset !important; 20157 max-height: unset !important;
20143 border-radius: 0rem 0rem 0.625rem 0.625rem; 20158 border-radius: 0rem 0rem 0.625rem 0.625rem;
20159 margin-left: -100px;
20160 width: 180px;
20144 } 20161 }
20145 #gt_float_wrapper .gt-current-lang img { 20162 #gt_float_wrapper .gt-current-lang img {
20146 display: none; 20163 display: none;
...@@ -20158,6 +20175,7 @@ ul.sf_date_field .sf-datepicker { ...@@ -20158,6 +20175,7 @@ ul.sf_date_field .sf-datepicker {
20158 20175
20159 .gt_float_switcher .gt-selected { 20176 .gt_float_switcher .gt-selected {
20160 background-color: transparent !important; 20177 background-color: transparent !important;
20178 text-align: left !important;
20161 } 20179 }
20162 20180
20163 .gt_options { 20181 .gt_options {
...@@ -20498,13 +20516,13 @@ ul.sf_date_field .sf-datepicker { ...@@ -20498,13 +20516,13 @@ ul.sf_date_field .sf-datepicker {
20498 20516
20499 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle { 20517 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle {
20500 z-index: 9999 !important; 20518 z-index: 9999 !important;
20519 right: 115px !important;
20501 } 20520 }
20502 20521
20503 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a { 20522 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a {
20504 width: 12.5rem; 20523 width: 40px;
20505 box-shadow: none !important; 20524 box-shadow: none !important;
20506 position: absolute; 20525 position: absolute;
20507 right: -16.875rem !important;
20508 } 20526 }
20509 20527
20510 .pojo-a11y-toolbar-overlay { 20528 .pojo-a11y-toolbar-overlay {
......
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.
...@@ -26259,6 +26259,10 @@ ...@@ -26259,6 +26259,10 @@
26259 if (evalType === "above") return y < vpH + st; 26259 if (evalType === "above") return y < vpH + st;
26260 }; 26260 };
26261 jQuery(document).ready(function ($) { 26261 jQuery(document).ready(function ($) {
26262 var itemToWatch = document.querySelector('.gt_options');
26263 onClassChange(itemToWatch, node => {
26264 node.classList.contains('gt-open') ? $('#pojo-a11y-toolbar').removeClass('pojo-a11y-toolbar-open') : console.log('class removed');
26265 });
26262 trim_text(); 26266 trim_text();
26263 $('#relevant-resources').dataTable({ 26267 $('#relevant-resources').dataTable({
26264 info: false, 26268 info: false,
...@@ -26309,14 +26313,19 @@ ...@@ -26309,14 +26313,19 @@
26309 document.addEventListener('wpcf7mailsent', function (event) { 26313 document.addEventListener('wpcf7mailsent', function (event) {
26310 jQuery('.appArea.responsive').hide(); 26314 jQuery('.appArea.responsive').hide();
26311 }, true); 26315 }, true);
26312 26316 function onClassChange(element, callback) {
26313 // jQuery(document).ready(function($) { 26317 const observer = new MutationObserver(mutations => {
26314 // $(document).on("click", ".pojo-a11y-toolbar-link", function(e){ 26318 mutations.forEach(mutation => {
26315 // console.log('click'); 26319 if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
26316 // $('.gt_options').hasClass('gt-open') ? $('.gt_options').removeClass('gt-open') : $('.gt_options').addClass('gt-open'); 26320 callback(mutation.target);
26317 // }); 26321 }
26318 26322 });
26319 // }); 26323 });
26324 observer.observe(element, {
26325 attributes: true
26326 });
26327 return observer.disconnect;
26328 }
26320 26329
26321 exports.Alert = alert$1; 26330 exports.Alert = alert$1;
26322 exports.Button = button; 26331 exports.Button = button;
......
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.
...@@ -35,6 +35,18 @@ window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) { ...@@ -35,6 +35,18 @@ window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) {
35 35
36 jQuery(document).ready(function($) { 36 jQuery(document).ready(function($) {
37 37
38
39 var itemToWatch = document.querySelector('.gt_options');
40
41 onClassChange(itemToWatch, (node) => {
42 node.classList.contains('gt-open')
43 ? $('#pojo-a11y-toolbar').removeClass('pojo-a11y-toolbar-open')
44 : console.log('class removed');
45
46 });
47
48
49
38 trim_text(); 50 trim_text();
39 $('#relevant-resources').dataTable( { 51 $('#relevant-resources').dataTable( {
40 info: false, 52 info: false,
...@@ -99,11 +111,20 @@ document.addEventListener( 'wpcf7mailsent', function( event ) { ...@@ -99,11 +111,20 @@ document.addEventListener( 'wpcf7mailsent', function( event ) {
99 }, true ); 111 }, true );
100 112
101 113
102 // jQuery(document).ready(function($) { 114
103 // $(document).on("click", ".pojo-a11y-toolbar-link", function(e){ 115 function onClassChange(element, callback) {
104 // console.log('click'); 116 const observer = new MutationObserver((mutations) => {
105 // $('.gt_options').hasClass('gt-open') ? $('.gt_options').removeClass('gt-open') : $('.gt_options').addClass('gt-open'); 117 mutations.forEach((mutation) => {
106 // }); 118 if (
107 119 mutation.type === 'attributes' &&
108 // }); 120 mutation.attributeName === 'class'
121 ) {
122 callback(mutation.target);
123 }
124 });
125 });
126 observer.observe(element, { attributes: true });
127 return observer.disconnect;
128 }
129
109 130
......
...@@ -687,8 +687,9 @@ select { ...@@ -687,8 +687,9 @@ select {
687 border-color:transparent; 687 border-color:transparent;
688 color: #e00; 688 color: #e00;
689 @media(max-width: 48rem) { 689 @media(max-width: 48rem) {
690 padding-left: 0px; 690 margin-top: 10px;
691 margin-left: -10px; 691 padding-left: 0;
692 margin-left: -15px;
692 } 693 }
693 } 694 }
694 .wpcf7{ 695 .wpcf7{
......
1 #gt_float_wrapper{ 1 #gt_float_wrapper{
2 right: 0rem !important; 2 right: 0rem !important;
3 width: 80px !important;
3 @media screen and (max-width: 62.5rem){ 4 @media screen and (max-width: 62.5rem){
4 top: 0rem !important; 5 top: 0rem !important;
5 } 6 }
7 overflow: visible;
6 .gt_float_switcher{ 8 .gt_float_switcher{
7 box-shadow: none !important; 9 box-shadow: none !important;
8 border-radius: 0rem 0rem 0.625rem 0.625rem; 10 border-radius: 0rem 0rem 0.625rem 0.625rem;
11
12 overflow: visible;
13
9 } 14 }
10 .gt_float_switcher .gt_options.gt-open{ 15 .gt_float_switcher .gt_options{
11 max-height: unset !important; 16 max-height: unset !important;
12 border-radius: 0rem 0rem 0.625rem 0.625rem; 17 border-radius: 0rem 0rem 0.625rem 0.625rem;
18 margin-left: -100px;
19 width: 180px;
20 }
21 .gt_float_switcher .gt_options.gt-open{
13 22
14 } 23 }
15 .gt-current-lang{ 24 .gt-current-lang{
...@@ -33,12 +42,11 @@ ...@@ -33,12 +42,11 @@
33 42
34 .gt_float_switcher .gt-selected{ 43 .gt_float_switcher .gt-selected{
35 background-color: transparent !important; 44 background-color: transparent !important;
45 text-align: left !important;
36 } 46 }
37 .gt_options{ 47 .gt_options{
38 background-color: #fff !important; 48 background-color: #fff !important;
39 padding: 0.625rem 0; 49 padding: 0.625rem 0;
40
41
42 } 50 }
43 51
44 .admin-bar{ 52 .admin-bar{
......
...@@ -450,4 +450,9 @@ ...@@ -450,4 +450,9 @@
450 font-size: 20px !important; 450 font-size: 20px !important;
451 } 451 }
452 } 452 }
453 }
454 .admin-bar{
455 .back-one-level{
456 top: 11.125rem;
457 }
453 } 458 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -32,12 +32,13 @@ ...@@ -32,12 +32,13 @@
32 } 32 }
33 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle{ 33 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle{
34 z-index: 9999 !important; 34 z-index: 9999 !important;
35 right: 115px !important;
35 } 36 }
36 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a{ 37 #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a{
37 width: 12.5rem; 38 width:40px;
38 box-shadow:none !important; 39 box-shadow:none !important;
39 position: absolute; 40 position: absolute;
40 right: -16.875rem!important; 41 //right: -16.875rem!important;
41 42
42 } 43 }
43 44
......
...@@ -1034,4 +1034,13 @@ ul.sf_date_field { ...@@ -1034,4 +1034,13 @@ ul.sf_date_field {
1034 @media screen and (max-width: 59.375rem) { 1034 @media screen and (max-width: 59.375rem) {
1035 padding-bottom: 20px; 1035 padding-bottom: 20px;
1036 } 1036 }
1037 }
...\ No newline at end of file ...\ No newline at end of file
1037 }
1038
1039 .admin-bar{
1040 #advance-search-modal .modal-dialog{
1041 padding-top: 40px;
1042 .btn-close{
1043 top: 5rem;
1044 }
1045 }
1046 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
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.501 5 Version: 1.0.502
6 */ 6 */
7 7
......