290f671c by Jeff Balicki

switcher

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 6900e051
......@@ -3,7 +3,7 @@
Plugin Name: GTranslate
Plugin URI: https://gtranslate.io/?xyz=998
Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>.
Version: 3.0.3
Version: 3.0.4
Author: Translate AI Multilingual Solutions
Author URI: https://gtranslate.io
Text Domain: gtranslate
......@@ -651,7 +651,12 @@ function RefreshDoWidgetCode() {
}
if(widget_look == 'dropdown' || widget_look == 'lang_names' || widget_look == 'lang_codes' || widget_look == 'globe') {
jQuery('#flag_size_option,#flag_style_option').hide();
jQuery('#flag_style_option').hide();
if(widget_look == 'globe')
jQuery('#flag_size_option').show();
else
jQuery('#flag_size_option').hide();
} else {
jQuery('#flag_style_option').show();
......@@ -1511,9 +1516,9 @@ EOT;
$data['flag_style'] = isset($_POST['flag_style']) ? sanitize_text_field($_POST['flag_style']) : '2d';
$data['globe_size'] = isset($_POST['globe_size']) ? intval($_POST['globe_size']) : 60;
$data['globe_color'] = isset($_POST['globe_color']) ? sanitize_hex_color($_POST['globe_color']) : '#66aaff';
$data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']);
$data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']);
$data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
$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']);
$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']);
$data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? array_map('sanitize_text_field', $_POST['alt_flags']) : array();
$data['select_language_label'] = isset($_POST['select_language_label']) ? sanitize_text_field($_POST['select_language_label']) : 'Select Language';
$data['custom_css'] = isset($_POST['custom_css']) ? wp_kses_post($_POST['custom_css']) : '';
......
......@@ -3,8 +3,8 @@ Contributors: edo888
Author: Translate AI Multilingual Solutions
Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
Requires at least: 2.8.1
Tested up to: 6.2
Stable tag: 3.0.3
Tested up to: 6.3
Stable tag: 3.0.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
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
8. User Dashboard (paid)
== Changelog ==
= 3.0.4 =
* Added protection against XSS by bad acting admins
* Added flag size option for Globe widget look
= 3.0.3 =
* Fix mobile touch-no-click issue for float look in horizontal open direction mode
* 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 {
font-size: 20px !important;
}
}
.admin-bar .back-one-level {
top: 11.125rem;
}
.site-title {
font-size: 2.1875rem;
line-height: 3.125rem;
......@@ -17668,8 +17672,9 @@ select {
}
@media (max-width: 48rem) {
.wpcf7 form.sent .wpcf7-response-output {
padding-left: 0px;
margin-left: -10px;
margin-top: 10px;
padding-left: 0;
margin-left: -15px;
}
}
......@@ -18953,6 +18958,13 @@ ul.sf_date_field .sf-datepicker {
}
}
.admin-bar #advance-search-modal .modal-dialog {
padding-top: 40px;
}
.admin-bar #advance-search-modal .modal-dialog .btn-close {
top: 5rem;
}
.search-results .search-field {
border: 0;
border-bottom: 0.0625rem solid #707070;
......@@ -20128,6 +20140,8 @@ ul.sf_date_field .sf-datepicker {
#gt_float_wrapper {
right: 0rem !important;
width: 80px !important;
overflow: visible;
}
@media screen and (max-width: 62.5rem) {
#gt_float_wrapper {
......@@ -20137,10 +20151,13 @@ ul.sf_date_field .sf-datepicker {
#gt_float_wrapper .gt_float_switcher {
box-shadow: none !important;
border-radius: 0rem 0rem 0.625rem 0.625rem;
overflow: visible;
}
#gt_float_wrapper .gt_float_switcher .gt_options.gt-open {
#gt_float_wrapper .gt_float_switcher .gt_options {
max-height: unset !important;
border-radius: 0rem 0rem 0.625rem 0.625rem;
margin-left: -100px;
width: 180px;
}
#gt_float_wrapper .gt-current-lang img {
display: none;
......@@ -20158,6 +20175,7 @@ ul.sf_date_field .sf-datepicker {
.gt_float_switcher .gt-selected {
background-color: transparent !important;
text-align: left !important;
}
.gt_options {
......@@ -20498,13 +20516,13 @@ ul.sf_date_field .sf-datepicker {
#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle {
z-index: 9999 !important;
right: 115px !important;
}
#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a {
width: 12.5rem;
width: 40px;
box-shadow: none !important;
position: absolute;
right: -16.875rem !important;
}
.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 @@
if (evalType === "above") return y < vpH + st;
};
jQuery(document).ready(function ($) {
var itemToWatch = document.querySelector('.gt_options');
onClassChange(itemToWatch, node => {
node.classList.contains('gt-open') ? $('#pojo-a11y-toolbar').removeClass('pojo-a11y-toolbar-open') : console.log('class removed');
});
trim_text();
$('#relevant-resources').dataTable({
info: false,
......@@ -26309,14 +26313,19 @@
document.addEventListener('wpcf7mailsent', function (event) {
jQuery('.appArea.responsive').hide();
}, true);
// jQuery(document).ready(function($) {
// $(document).on("click", ".pojo-a11y-toolbar-link", function(e){
// console.log('click');
// $('.gt_options').hasClass('gt-open') ? $('.gt_options').removeClass('gt-open') : $('.gt_options').addClass('gt-open');
// });
// });
function onClassChange(element, callback) {
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
callback(mutation.target);
}
});
});
observer.observe(element, {
attributes: true
});
return observer.disconnect;
}
exports.Alert = alert$1;
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) {
jQuery(document).ready(function($) {
var itemToWatch = document.querySelector('.gt_options');
onClassChange(itemToWatch, (node) => {
node.classList.contains('gt-open')
? $('#pojo-a11y-toolbar').removeClass('pojo-a11y-toolbar-open')
: console.log('class removed');
});
trim_text();
$('#relevant-resources').dataTable( {
info: false,
......@@ -99,11 +111,20 @@ document.addEventListener( 'wpcf7mailsent', function( event ) {
}, true );
// jQuery(document).ready(function($) {
// $(document).on("click", ".pojo-a11y-toolbar-link", function(e){
// console.log('click');
// $('.gt_options').hasClass('gt-open') ? $('.gt_options').removeClass('gt-open') : $('.gt_options').addClass('gt-open');
// });
// });
function onClassChange(element, callback) {
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (
mutation.type === 'attributes' &&
mutation.attributeName === 'class'
) {
callback(mutation.target);
}
});
});
observer.observe(element, { attributes: true });
return observer.disconnect;
}
......
......@@ -687,8 +687,9 @@ select {
border-color:transparent;
color: #e00;
@media(max-width: 48rem) {
padding-left: 0px;
margin-left: -10px;
margin-top: 10px;
padding-left: 0;
margin-left: -15px;
}
}
.wpcf7{
......
#gt_float_wrapper{
right: 0rem !important;
width: 80px !important;
@media screen and (max-width: 62.5rem){
top: 0rem !important;
}
overflow: visible;
.gt_float_switcher{
box-shadow: none !important;
border-radius: 0rem 0rem 0.625rem 0.625rem;
overflow: visible;
}
.gt_float_switcher .gt_options.gt-open{
.gt_float_switcher .gt_options{
max-height: unset !important;
border-radius: 0rem 0rem 0.625rem 0.625rem;
margin-left: -100px;
width: 180px;
}
.gt_float_switcher .gt_options.gt-open{
}
.gt-current-lang{
......@@ -33,12 +42,11 @@
.gt_float_switcher .gt-selected{
background-color: transparent !important;
text-align: left !important;
}
.gt_options{
background-color: #fff !important;
padding: 0.625rem 0;
}
.admin-bar{
......
......@@ -450,4 +450,9 @@
font-size: 20px !important;
}
}
}
.admin-bar{
.back-one-level{
top: 11.125rem;
}
}
\ No newline at end of file
......
......@@ -32,12 +32,13 @@
}
#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle{
z-index: 9999 !important;
right: 115px !important;
}
#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a{
width: 12.5rem;
width:40px;
box-shadow:none !important;
position: absolute;
right: -16.875rem!important;
//right: -16.875rem!important;
}
......
......@@ -1034,4 +1034,13 @@ ul.sf_date_field {
@media screen and (max-width: 59.375rem) {
padding-bottom: 20px;
}
}
\ No newline at end of file
}
.admin-bar{
#advance-search-modal .modal-dialog{
padding-top: 40px;
.btn-close{
top: 5rem;
}
}
}
\ No newline at end of file
......
......@@ -2,6 +2,6 @@
Theme Name: MSF CA Child
Author: Tenzing Communications
Template: msf-ca
Version: 1.0.501
Version: 1.0.502
*/
......