Newer
Older
GitBucket / src / main / twirl / gitbucket / core / helper / account.scala.html
@Naoki Takezoe Naoki Takezoe on 2 Mar 2015 438 bytes Change package name
@(id: String, width: Int)(implicit context: gitbucket.core.controller.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>