]> git.mxchange.org Git - friendica.git/commitdiff
theme-settings: better show/hide image options js
authorrabuzarus <>
Thu, 28 Apr 2016 21:20:54 +0000 (23:20 +0200)
committerrabuzarus <>
Thu, 28 Apr 2016 21:20:54 +0000 (23:20 +0200)
templates/theme_settings.tpl

index 7625e66ab0be2c627af76cc802a15ef4396463ad..05e64c4d18a908b65db1580aa7a7f53cf1a4e2e4 100644 (file)
                $("#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) {