comparison globalneighbors/templates/index.html @ 12:6d89ea94930b

add passthrough fileserver for autocomplete
author Jeff Hammel <k0scist@gmail.com>
date Sun, 25 Jun 2017 13:18:13 -0700
parents d1b99c695511
children 94af113e498a
comparison
equal deleted inserted replaced
11:d1b99c695511 12:6d89ea94930b
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Global Neighbors</title> 4 <title>Global Neighbors</title>
5 <script src="https://code.jquery.com/jquery-1.12.4.js"></script> 5 <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
6 <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 6 <!-- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
7 <!-- <script> -->
8 <!-- $( function() { -->
9 <!-- $( "#cities" ).autocomplete({ -->
10 <!-- source: "/cities", -->
11 <!-- autoFocus: true, -->
12 <!-- minLength: 3, -->
13 <!-- delay: 1500 -->
14 <!-- }); -->
15 <!-- }); -->
16 <!-- </script> -->
17 <script src="/js/jquery.easy-autocomplete.min.js"></script>
18 <link rel="stylesheet" type="text/css" href="/css/style.css"/>
19 <link rel="stylesheet" type="text/css" href="/css/easy-autocomplete.css"/>
7 <script> 20 <script>
8 $( function() { 21 $( function() {
9 $( "#cities" ).autocomplete({ 22 var options = {
10 source: "/cities", 23 url: "/cities",
11 autoFocus: true, 24 list: {
12 minLength: 3, 25 match: {
13 delay: 1500 26 enabled: true
14 }); 27 }
28 }
29 };
30 $( "#cities" ).easyAutocomplete(options);
15 }); 31 });
16 </script> 32 </script>
17 <link rel="stylesheet" type="text/css" href="/css/style.css"/>
18 </head> 33 </head>
19 <body> 34 <body>
20 <h1>Global Neighbors</h1> 35 <h1>Global Neighbors</h1>
21 <h2>Serving {{ n_cities }} cities</h2> 36 <h2>Serving {{ n_cities }} cities</h2>
22 37