Newer
Older
gitbucket_jkp / src / main / twirl / helper / account.scala.html
@takezoe takezoe on 22 Sep 2013 416 bytes Generalize the account completion field.
@(id: String, width: Int)(implicit context: app.Context)
@import context._
<input type="text" name="@id" id="@id" style="width: @{width}px; margin-bottom: 0px;"/>
<script>
$(function(){
  $('#@id').typeahead({
    source: function (query, process) {
      return $.get('@path/_user/proposals', { query: query },
        function (data) {
          return process(data.options);
        });
    }
  });
});
</script>