[Toaster] [PATCH] toaster: disable add layer button on click

Belen Barros Pena belen.barros.pena at linux.intel.com
Tue Feb 16 03:16:41 PST 2016


From: Belen Barros Pena <belen.barros.pena at intel.com>

The 'add layer' button in the project configuration page remains enabled
after you add a layer. If you click it again, the same layer you just
added is added again.

This patch disables the 'add layer' button on click, to avoid this bit
of weirdness.

[YOCTO #8905]

Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
---
 bitbake/lib/toaster/toastergui/static/js/projectpage.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/bitbake/lib/toaster/toastergui/static/js/projectpage.js
index 4a482d7..0666bde 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projectpage.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projectpage.js
@@ -116,6 +116,8 @@ function projectPageInit(ctx) {
     addRmLayer(layerObj, true);
     /* Reset the text input */
     layerAddInput.val("");
+    /* Disable the add layer button*/
+    layerAddBtn.attr("disabled", "disabled");
   });
 
   function addRmLayer(layerObj, add){
-- 
2.5.4 (Apple Git-61)



More information about the toaster mailing list