grim/port-authority

The start of type ahead for repos

2016-04-11, Gary Kramlich
0e182c67351b
Parents 9b9c59d9fed5
Children 53bfb785d971
The start of type ahead for repos
  • +15 -0
    js/app.js
  • +10 -0
    window.html
  • --- a/js/app.js Mon Apr 11 14:17:59 2016 -0500
    +++ b/js/app.js Mon Apr 11 17:29:22 2016 -0500
    @@ -216,3 +216,18 @@
    selection.addRange(range);
    }
    }
    +
    +$(document).ready(function() {
    + $(".ui.search")
    + .search({
    + apiSettings: {
    + url: "https://registry.hub.docker.com/v1/search?q={query}"
    + },
    + fields: {
    + results: "results",
    + title: "name",
    + url: "http://google.com"
    + },
    + minCharacters: 2
    + });
    +});
    --- a/window.html Mon Apr 11 14:17:59 2016 -0500
    +++ b/window.html Mon Apr 11 17:29:22 2016 -0500
    @@ -26,6 +26,16 @@
    </div>
    </div>
    </div>
    + <div class="row">
    + <div class="column eight wide">
    + <div class="ui search">
    + <div class="ui left icon input">
    + <input class="prompt" placeholder="Repository">
    + <i class="code icon"></i>
    + </div>
    + </div>
    + </div>
    + </div>
    <div class="row" data-ng-if="error">
    <div class="column">
    <div class="ui negative message">