]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
toaster: disable/enable "Add layer" button according to input's content
authorElliot Smith <elliot.smith@intel.com>
Tue, 19 Apr 2016 16:28:40 +0000 (17:28 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Apr 2016 20:10:58 +0000 (21:10 +0100)
commitdbb4f0282ded361baf9e5a0346e134bece5314b9
tree30d932ed7d16195589ead9c1cb71ea1be3381191
parentb99e1012f0ad1dc82a769df15a232280c8e57b9e
toaster: disable/enable "Add layer" button according to input's content

In the import layer page, the "Add layer" button in the layer dependencies
section doesn't accurately reflect whether the layer name in the
corresponding input can be added. A partial or empty layer name can
leave the button active, such that when it is clicked, a
previously-selected layer can be accidentally added.

Fix by keeping track of the items currently available in the typeahead,
only activating the "Add layer" button when the input matches the name
of one of those items.

[YOCTO #8511]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/static/js/importlayer.js
lib/toaster/toastergui/static/js/libtoaster.js