diff options
author | Belen Barros Pena <belen.barros.pena@intel.com> | 2015-10-14 13:43:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-16 14:13:22 +0100 |
commit | 596c219bf42c20f2ac6281a1216d3d6cdadc7031 (patch) | |
tree | b1c7c521d669cd3e74765409da8cd7e903b5800b | |
parent | 24e5a178e1a6539b10580285ff83be28cc933b82 (diff) | |
download | poky-596c219bf42c20f2ac6281a1216d3d6cdadc7031.tar.gz |
bitbake: toaster: Disable add layer button when input is empty
The 'add layer' button in the project configuration page
is enabled when you select a layer from the type ahead.
However, if you delete the layer name, the 'add layer'
button remains enabled, and if you click it, the last
selected layer from the type ahead will be added to the
project.
It is probably better to disable the 'add layer' button
when the input field is empty.
[YOCTO #8449]
(Bitbake rev: d4820f16c76398400ddd573db03c654c51d40c1b)
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectpage.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/bitbake/lib/toaster/toastergui/static/js/projectpage.js index 30989a016c..b0fe4510a9 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectpage.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectpage.js | |||
@@ -103,6 +103,12 @@ function projectPageInit(ctx) { | |||
103 | layerAddBtn.removeAttr("disabled"); | 103 | layerAddBtn.removeAttr("disabled"); |
104 | }); | 104 | }); |
105 | 105 | ||
106 | layerAddInput.keyup(function() { | ||
107 | if ($(this).val().length == 0) { | ||
108 | layerAddBtn.attr("disabled", "disabled") | ||
109 | } | ||
110 | }); | ||
111 | |||
106 | layerAddBtn.click(function(e){ | 112 | layerAddBtn.click(function(e){ |
107 | e.preventDefault(); | 113 | e.preventDefault(); |
108 | var layerObj = currentLayerAddSelection; | 114 | var layerObj = currentLayerAddSelection; |