Merge pull request #13009 from MrPetovan/bug/13006-frio-admin-settings

[frio] Fix jS error that was preventing further script execution in theme settings
This commit is contained in:
Michael Vogel 2023-04-18 08:32:58 +02:00 committed by GitHub
commit 98595b6a2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,10 +192,11 @@
// Create colorpickers // Create colorpickers
$("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color, #frio_login_bg_color").colorpicker({format: 'hex', align: 'left'}); $("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color, #frio_login_bg_color").colorpicker({format: 'hex', align: 'left'});
if ($("#id_frio_background_image").length) {
// show image options when user starts to type the address of the image // show image options when user starts to type the address of the image
$("#id_frio_background_image").keyup(function(){ $("#id_frio_background_image").keyup(function () {
var elText = $(this).val(); const elText = $(this).val();
if(elText.length !== 0) { if (elText.length !== 0) {
$("#frio_bg_image_options").show(); $("#frio_bg_image_options").show();
} else { } else {
$("#frio_bg_image_options").hide(); $("#frio_bg_image_options").hide();
@ -203,9 +204,10 @@
}); });
// show the image options if there is already an image // show the image options if there is already an image
if($("#id_frio_background_image").val().length != 0) { if ($("#id_frio_background_image").val().length != 0) {
$("#frio_bg_image_options").show(); $("#frio_bg_image_options").show();
} }
}
}); });
</script> </script>