luci-app-adblock: use placeholder in query tool 2136/head
authorAndrei Troie <andreitroie90@gmail.com>
Fri, 7 Sep 2018 22:56:23 +0000 (23:56 +0100)
committerAndrei Troie <andreitroie90@gmail.com>
Fri, 7 Sep 2018 22:59:20 +0000 (23:59 +0100)
Use the placeholder property on the textbox in the query tool so it's more convenient.

Signed-off-by: Andrei Troie <andreitroie90@gmail.com>
applications/luci-app-adblock/luasrc/view/adblock/query.htm

index 2cf7e5baaf04b86fc1d713a712e80d43ffbbdf7e..88108c3f21dc71a043662b4b6467d0bff8aeb0d7 100644 (file)
@@ -11,7 +11,7 @@ This is free software, licensed under the Apache License, Version 2.0
 
        function update_status(data)
        {
-               var domain = data.value;
+               var domain = data.value || data.placeholder;
                var input  = document.getElementById('query_input');
                var output = document.getElementById('query_output');
 
@@ -48,7 +48,7 @@ This is free software, licensed under the Apache License, Version 2.0
                <div class="cbi-section">
                        <div class="cbi-section-descr"><%:This form allows you to query active block lists for certain domains, e.g. for whitelisting.%></div>
                        <div style="width:33%; float:left;">
-                               <input type="text" value="google.com" name="input" />
+                               <input type="text" placeholder="google.com" name="input" />
                                <input type="button" value="<%:Query%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.input)" />
                        </div>
                        <br style="clear:both" />