view 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
line wrap: on
line source

<!DOCTYPE html>
<html>
  <head>
    <title>Global Neighbors</title>
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <!-- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
    <!-- <script> -->
    <!--   $( function() { -->
    <!--   $( "#cities" ).autocomplete({ -->
    <!--   source: "/cities", -->
    <!--   autoFocus: true, -->
    <!--   minLength: 3, -->
    <!--   delay: 1500 -->
    <!--   }); -->
    <!--   }); -->
    <!-- </script> -->
    <script src="/js/jquery.easy-autocomplete.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="/css/easy-autocomplete.css"/>
    <script>
      $( function() {
      var options = {
      url: "/cities",
      list: {
		match: {
			enabled: true
		}
	}
      };
      $( "#cities" ).easyAutocomplete(options);
      });
    </script>
  </head>
  <body>
    <h1>Global Neighbors</h1>
    <h2>Serving {{ n_cities }} cities</h2>

    <div class="ui-widget">
      <label for="cities">Enter a city: </label>
      <input id="cities"/>
    </div>

  </body>
</html>