From ad2611c92eac6f03f597611b5f5337ac5490570c Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 28 Apr 2016 23:20:54 +0200 Subject: [PATCH] theme-settings: better show/hide image options js --- templates/theme_settings.tpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/theme_settings.tpl b/templates/theme_settings.tpl index 7625e66ab..05e64c4d1 100644 --- a/templates/theme_settings.tpl +++ b/templates/theme_settings.tpl @@ -31,11 +31,14 @@ $("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color").colorpicker({format: 'hex', align: 'left'}); // show image options when user user starts to type the address of the image - if($("#id_frio_background_image").val() == "") { - $("#id_frio_background_image").on('input',function(e){ + $("#id_frio_background_image").keyup(function(){ + var elText = $(this).val(); + if(elText.length !== 0) { $("#frio_bg_image_options").show(); - }); - } + } else { + $("#frio_bg_image_options").hide(); + } + }); // show the image options is there is allready an image if($("#id_frio_background_image").val().length != 0) {