diff --git a/templates/layerindex/editlayer.html b/templates/layerindex/editlayer.html index c79d488..a06c317 100644 --- a/templates/layerindex/editlayer.html +++ b/templates/layerindex/editlayer.html @@ -1,11 +1,12 @@ {% extends "base.html" %} {% load i18n %} +{% load static %} {% comment %} layerindex-web - layer editing form page template - Copyright (C) 2013 Intel Corporation + Copyright (C) 2013-2018 Intel Corporation Licensed under the MIT license, see COPYING.MIT for details {% endcomment %} @@ -52,8 +53,12 @@
{% if field.name == 'deps' %} +
+ + +
- +
{% for deplayer in deplistlayers %} {% if deplayer.id in form.checked_deps %} @@ -382,6 +387,11 @@ return false; } + function clearLayerSearch() { + $("#layersearchtext").val(''); + $(".layerstable > tbody > tr").show(); + } + $(document).ready(function() { $('.maintainerform').hide() @@ -408,5 +418,18 @@ if( ! firstfield.val() ) firstfield.focus() }); + + $("#layersearchtext").on("input", function() { + var value = $(this).val().toLowerCase(); + $(".layerstable > tbody > tr").filter(function() { + $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) + }); + }); + + $("#layersearchclear").click(function(){ + clearLayerSearch(); + $("#layersearchtext").focus(); + }); + {% endblock %}